How omisha123/cdcs works
CDCS is a distributed file-storage and caching system. A client uploads through the HTTP orchestrator, which coordinates Reed–Solomon sharding, shard placement on storage nodes, and metadata persistence and replication; downloads fetch shards and can reconstruct missing data. The graph also preserves the cache, node monitoring/failover, Raft membership/status, and metrics capabilities described in the README. Source excerpts confirm key runtime entry points and storage/cache behavior; some orchestration links are documented only in the README, and unsampled implementation details are not inferred.
Main entry points: backend.go File orchestrator · main.go HTTP gateway · server.go Storage gRPC service · cdcs.go Cluster RPC client
Components 15
API and orchestration
- HTTP gateway
main.go - File orchestrator
backend.go
Shard storage
- Reed–Solomon coding
reedsolomon.go - Cluster RPC client
cdcs.go - Storage gRPC service
server.go - 2Q cache
engine_2Q.go - Shard files
server.go - Storage nodes
node.go
Metadata consensus
- Raft HTTP API
raftapi.go - Raft node and FSM
raft.go - Persistent metadata
backend.go
Operations and observability
- Metrics and status
backend.go - Node health and recovery
backend.go
Other components
- Client
- Prometheus / Grafana
Connections 17
- Client → HTTP gateway: sends requests
README.md - HTTP gateway → File orchestrator: routes uploads
main.go - HTTP gateway → File orchestrator: routes downloads
main.go - File orchestrator → Reed–Solomon coding: encodes and reconstructs
README.md - File orchestrator → Cluster RPC client: places and fetches shards
README.md - Cluster RPC client → Storage gRPC service: calls shard RPCs
cdcs.go - Storage gRPC service → Shard files: reads and writes
server.go - Storage gRPC service → 2Q cache: caches shard data
server.go - File orchestrator → Persistent metadata: persists file metadata
backend.go - File orchestrator → Raft HTTP API: replicates metadata
README.md - Raft HTTP API → Raft node and FSM: applies commands
raftapi.go - Raft node and FSM → Persistent metadata: replicates metadata state
README.md - File orchestrator → Node health and recovery: detects and reroutes failures
backend.go - Node health and recovery → Cluster RPC client: checks node reachability
backend.go - HTTP gateway → Metrics and status: exposes status and metrics
main.go - Metrics and status → Prometheus / Grafana: exports metrics for
README.md - Storage nodes → Storage gRPC service: hosts shard service
README.md