C4 架构图 / C4 Architecture Diagrams
本目录用 C4 模型分层次描述 Rr:系统上下文、容器、组件,以及部署和动态视图。
This directory uses the C4 Model to describe Rr through context, container, component, deployment, and dynamic views.
阅读顺序 / Reading Order
| 读者 / Audience | 推荐顺序 / Recommended Order |
|---|---|
| 应用开发者 / Application developers | Context → Containers → Dynamic: PUT Request → Dynamic: Shard Routing |
| 框架贡献者 / Framework contributors | Containers → Components (all, including Console BFF) → Dynamic (all) |
| 运维 / SRE / Operators | Context → Containers → Components: Console → Deployment → Dynamic: Leader Election, Snapshot Transfer |
图谱目录 / Diagram Index
第 1 级:上下文 / Level 1: Context
- context.md — 系统上下文:Rr 的边界、用户和外部系统。
System context: Rr's boundary, users, and external systems.
第 2 级:容器 / Level 2: Containers
- containers.md — 容器:可部署单元与通信协议。
Containers: deployable units and communication protocols.
第 3 级:组件 / Level 3: Components
- components-server.md — rr-server 内部组件。
rr-server internals. - components-raft.md — rr-raft 多组共识引擎。
Multi-Raft engine. - components-router.md — 路由与配置。
Routing and configuration. - components-network.md — gRPC 传输层。
gRPC transport. - components-console.md —
rr-admin console只读 BFF:连接管理、按连接隔离采集、证据缓存与可选历史。
Read-onlyrr-admin consoleBFF: connection management, isolated per-connection collection, evidence caches, and optional history.
部署 / Deployment
- deployment.md — 三节点拓扑、端口、存储与监控。
Three-node topology, ports, storage, and monitoring.
动态视图 / Dynamic
- dynamic-put-request.md — 客户端写入与 leader 重定向。
Client write with leader redirect. - dynamic-leader-election.md — Raft 领导者选举。
Raft leader election. - dynamic-snapshot-transfer.md — 快照传输。
Snapshot transfer. - dynamic-shard-routing.md — 分片到 group 的路由。
Partition-to-group routing. - dynamic-config-update.md — 配置变更传播。
Config update propagation.
C4 符号 / C4 Notation
| 符号 / Symbol | 含义 / Meaning |
|---|---|
| Person | 人类角色 / Human actor |
| System | 软件系统的顶层抽象 / Top-level software system |
| Container | 可独立运行的部署单元 / Independently runnable unit |
| Component | 容器内的逻辑模块 / Logical module inside a container |
| Rel | 带意图和技术标注的有向关系 / Directed relationship with intent and technology |
注意:C4 的 Container 不是 Docker container;它可以是一个二进制、服务器进程或加载 rr-client 的应用进程。
Note: A C4 Container is not necessarily a Docker container; it can be a binary, a server process, or an application process using rr-client.
相关架构文档 / Related Architecture Documents
- overview.md — 架构概览。
Architecture overview. - crate-map.md — Crate 依赖。
Crate dependencies. - data-flow.md — 数据流。
Data flow. - multi-raft.md — 多 Raft 架构。
Multi-Raft architecture. - networking.md — 网络。
Networking. - storage.md — 存储。
Storage.