glide-dev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseValkey 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 benchmarksglide-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 benchmarksCore Architecture
核心架构
| Topic | Reference |
|---|---|
| Three-layer design, FFI mechanisms, module structure, runtime model, command flow, key structs | core-architecture |
| Connection model: multiplexing, inflight limiting, timeouts, reconnection, lazy connect, read-only mode | connection-internals |
| PubSub synchronizer: desired vs actual state, reconciliation loop, resubscription | pubsub-internals |
| Cluster topology: slot map, node discovery, MOVED/ASK handling, failover detection | cluster-internals |
| 主题 | 参考文档 |
|---|---|
| 三层设计、FFI机制、模块结构、运行时模型、命令流、核心结构体 | core-architecture |
| 连接模型:多路复用、飞行请求限制、超时、重连、懒加载连接、只读模式 | connection-internals |
| PubSub同步器:期望状态与实际状态比对、协调循环、重新订阅 | pubsub-internals |
| 集群拓扑:槽位映射、节点发现、MOVED/ASK处理、故障转移检测 | cluster-internals |
Language Bindings
语言绑定
| Language | Mechanism | Native Lib | IPC |
|---|---|---|---|
| Python async | PyO3 | | Unix socket |
| Python sync | CFFI | | FFI calls |
| Java | JNI | | JNI calls |
| Node.js | NAPI v2 | | Unix socket |
| Go | CGO | | FFI calls |
| Topic | Reference |
|---|---|
| Adding commands: protobuf definition, Rust handler, language wrappers, tests | adding-commands |
| Build and test for each language | build-and-test |
| 语言 | 实现机制 | 原生库位置 | 进程间通信方式 |
|---|---|---|---|
| Python异步版 | PyO3 | | Unix套接字 |
| Python同步版 | CFFI | | FFI调用 |
| Java | JNI | | JNI调用 |
| Node.js | NAPI v2 | | Unix套接字 |
| Go | CGO | | FFI调用 |
| 主题 | 参考文档 |
|---|---|
| 新增命令:protobuf定义、Rust处理逻辑、多语言包装、测试 | adding-commands |
| 各语言的构建与测试流程 | build-and-test |