glide-dev

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Valkey GLIDE Contributor Reference

Valkey GLIDE 贡献者参考

Routing

导航

  • Rust core, connection management, protocol -> Core Architecture
  • Python bindings, PyO3, CFFI -> Language Bindings
  • Java bindings, JNI -> Language Bindings
  • Node.js bindings, NAPI -> Language Bindings
  • Go bindings, CGO, FFI -> Language Bindings
  • PubSub synchronizer, subscription management -> PubSub Internals
  • Cluster topology, slot mapping, failover -> Cluster Internals
  • Adding a new command -> Adding Commands
  • Build environment, prerequisites, testing, test utils, cluster setup -> Build & Test
  • Rust核心、连接管理、协议 -> 核心架构
  • Python绑定、PyO3、CFFI -> 语言绑定
  • Java绑定、JNI -> 语言绑定
  • Node.js绑定、NAPI -> 语言绑定
  • Go绑定、CGO、FFI -> 语言绑定
  • PubSub同步器、订阅管理 -> PubSub内部实现
  • 集群拓扑、槽位映射、故障转移 -> 集群内部实现
  • 新增命令 -> 新增命令指南
  • 构建环境、前置依赖、测试、测试工具、集群搭建 -> 构建与测试

Repository Structure

仓库结构

glide-core/     # Rust core - connection, protocol, clustering, PubSub sync
  src/client/   # Client implementation, connection pool
  src/pubsub/   # PubSub synchronizer (desired vs actual state)
  src/protobuf/ # Protobuf definitions for IPC
ffi/            # C FFI layer for Python sync and Go
logger_core/    # Rust logging infrastructure
python/         # Python wrappers (async via PyO3, sync via CFFI)
java/           # Java wrappers via JNI
node/           # Node.js wrappers via NAPI v2
go/             # Go wrappers via CGO + FFI
utils/          # Test utilities, cluster management scripts
benchmarks/     # Performance benchmarks
glide-core/     # Rust core - connection, protocol, clustering, PubSub sync
  src/client/   # Client implementation, connection pool
  src/pubsub/   # PubSub synchronizer (desired vs actual state)
  src/protobuf/ # Protobuf definitions for IPC
ffi/            # C FFI layer for Python sync and Go
logger_core/    # Rust logging infrastructure
python/         # Python wrappers (async via PyO3, sync via CFFI)
java/           # Java wrappers via JNI
node/           # Node.js wrappers via NAPI v2
go/             # Go wrappers via CGO + FFI
utils/          # Test utilities, cluster management scripts
benchmarks/     # Performance benchmarks

Core Architecture

核心架构

TopicReference
Three-layer design, FFI mechanisms, module structure, runtime model, command flow, key structscore-architecture
Connection model: multiplexing, inflight limiting, timeouts, reconnection, lazy connect, read-only modeconnection-internals
PubSub synchronizer: desired vs actual state, reconciliation loop, resubscriptionpubsub-internals
Cluster topology: slot map, node discovery, MOVED/ASK handling, failover detectioncluster-internals
主题参考文档
三层设计、FFI机制、模块结构、运行时模型、命令流、核心结构体core-architecture
连接模型:多路复用、飞行请求限制、超时、重连、懒加载连接、只读模式connection-internals
PubSub同步器:期望状态与实际状态比对、协调循环、重新订阅pubsub-internals
集群拓扑:槽位映射、节点发现、MOVED/ASK处理、故障转移检测cluster-internals

Language Bindings

语言绑定

LanguageMechanismNative LibIPC
Python asyncPyO3
python/glide-async/
Unix socket
Python syncCFFI
ffi/
FFI calls
JavaJNI
java/src/lib.rs
JNI calls
Node.jsNAPI v2
node/rust-client/
Unix socket
GoCGO
ffi/
FFI calls
TopicReference
Adding commands: protobuf definition, Rust handler, language wrappers, testsadding-commands
Build and test for each languagebuild-and-test
语言实现机制原生库位置进程间通信方式
Python异步版PyO3
python/glide-async/
Unix套接字
Python同步版CFFI
ffi/
FFI调用
JavaJNI
java/src/lib.rs
JNI调用
Node.jsNAPI v2
node/rust-client/
Unix套接字
GoCGO
ffi/
FFI调用
主题参考文档
新增命令:protobuf定义、Rust处理逻辑、多语言包装、测试adding-commands
各语言的构建与测试流程build-and-test