How sairajeshramaraju/distributed-file-grid works
Distributed File Grid is a replicated, chunk-based file-storage system. Applications use the client to upload, download, and list files through the Head Server, which coordinates metadata and storage-node transfers; downloads verify replica hashes and support consensus/read-repair. Separate services handle cluster membership, health telemetry, and ZooKeeper coordination. The graph also preserves the documented metrics and dashboard capabilities. Edges are limited to relationships stated in the README or visible in supplied excerpts; several implementation details were not sampled.
Main entry points: head_server.cpp Head Server · cluster_server.cpp Cluster Server · health_checker.cpp Health Checker · client.cpp Client CLI
Components 24
File Operations
- Client CLI
src/client/client.cpp - Head Server
src/head_server/head_server.cpp - Upload Handling
src/head_server/file_upload.cpp - Metadata Store
src/head_server/redis_handler.hpp - Redis
- Transfer Protocol
src/proto/v1/file_transfer.proto
Cluster Services
- Control API
src/head_server/control_api.hpp - Chunk Storage
src/cluster_server/chunk_service.cpp - Cluster Server
src/cluster_server/cluster_server.cpp - Server Registry
src/common/include/dfg/server_registry.hpp - Health Monitor
src/common/include/dfg/health_monitor.hpp - Health Checker
src/health_checker/health_checker.cpp - Heartbeat Protocol
src/proto/v1/heartbeat.proto
Coordination
- ZooKeeper Monitor
src/zk_monitor/zk_monitor.cpp - ZooKeeper Client
src/common/src/zookeeper_client.cpp - ZooKeeper Ensemble
Observability
- Head Metrics
src/head_server/metrics.hpp - Cluster Metrics
src/cluster_server/metrics_exporter.hpp - Grafana Dashboards
deploy/docker/dashboards/dfg_overview.json - Prometheus
Shared Runtime
- SHA-256
src/common/include/dfg/sha256.hpp - System Metrics
src/common/include/dfg/system_info.hpp - Async Networking
src/common/include/dfg/async_net.hpp
Other components
- User Applications
Connections 26
- User Applications → Client CLI: invokes
README.md - Client CLI → Head Server: streams operations
README.md - Head Server → Upload Handling: handles uploads
README.md - Upload Handling → Metadata Store: records placement
src/head_server/file_upload.cpp - Head Server → Metadata Store: reads metadata
src/head_server/head_server.cpp - Head Server → Cluster Server: transfers chunks
README.md - Cluster Server → Chunk Storage: serves chunks
README.md - Client CLI → SHA-256: verifies chunks
src/client/client.cpp - Chunk Storage → SHA-256: computes digests
src/cluster_server/chunk_service.cpp - Head Server → Control API: exposes management
README.md - Control API → Server Registry: registers servers
src/head_server/control_api.hpp - Control API → Health Monitor: registers health
src/head_server/control_api.hpp - Cluster Server → Health Checker: sends heartbeats
README.md - Health Checker → ZooKeeper Client: checks membership
src/health_checker/health_checker.cpp - ZooKeeper Monitor → ZooKeeper Client: coordinates election
- ZooKeeper Client → ZooKeeper Ensemble: coordinates
README.md - Cluster Server → System Metrics: samples metrics
- Health Checker → System Metrics: reads metrics
src/health_checker/health_checker.cpp - Head Server → Head Metrics: exports metrics
README.md - Cluster Server → Cluster Metrics: exports metrics
README.md - Health Checker → Prometheus: exports metrics
README.md - Prometheus → Grafana Dashboards: feeds dashboards
README.md - Metadata Store → Redis: persists optionally
README.md - Transfer Protocol → Head Server: defines transfers
- Heartbeat Protocol → Health Checker: defines telemetry
- Cluster Server → Async Networking: uses networking