How raka-coder/mini-dfs-container works
DFS-X is a mini distributed file system: users invoke a CLI to upload, list, inspect, verify, download, and delete files. Upload coordinates chunk placement and replication through the master, streams chunks to DataNodes, then commits metadata; downloads resolve live replicas and retrieve chunks. The master also tracks node health and repairs under-replicated data. Benchmarking and monitoring are additional product capabilities. Relationships for unsampled download, benchmark, and monitoring details are limited to README statements and the source index.
Main entry points: master/server.py Master RPC · datanode/server.py Chunk RPC · cli.py CLI Commands · replication.py Replica Repair
Components 20
Client Operations
- CLI Commands
client/cli.py - Upload
client/upload.py - Download Verify
client/download.py - Dataset Generation
client/gendata.py - Benchmark
client/bench.py
Master Coordination
- Master RPC
master/server.py - Chunk Placement
master/placement.py - Failure Detection
master/failure.py - Replica Repair
master/replication.py - Cluster State
master/state.py - Metadata Store
master/store.py
DataNode Storage
- Chunk RPC
datanode/server.py - Heartbeat Reports
datanode/heartbeat.py
Shared Runtime
- Runtime Config
common/config.py - Checksum Utilities
common/checksum.py
Monitoring
- Scrape Config
monitoring/prometheus.yml - Prometheus
- Dashboard Config
monitoring/grafana/dashboards/dfsx.json - Grafana
Other components
- User
Connections 31
- User → CLI Commands: invokes
README.md - CLI Commands → Upload: dispatches
client/cli.py - CLI Commands → Download Verify: dispatches
client/cli.py - CLI Commands → Dataset Generation: dispatches
client/cli.py - CLI Commands → Benchmark: dispatches
client/cli.py - Upload → Master RPC: allocates and commits
client/upload.py - Upload → Chunk RPC: streams chunks
client/upload.py - Upload → Checksum Utilities: computes digests
client/upload.py - Download Verify → Master RPC: requests locations
README.md - Download Verify → Chunk RPC: reads chunks
README.md - Download Verify → Checksum Utilities: verifies digests
client/download.py - Master RPC → Chunk Placement: selects targets
master/server.py - Master RPC → Cluster State: updates state
master/server.py - Master RPC → Metadata Store: persists metadata
master/server.py - Master RPC → Failure Detection: starts detector
master/server.py - Master RPC → Replica Repair: starts repair
master/server.py - Failure Detection → Cluster State: tracks node health
master/failure.py - Replica Repair → Cluster State: scans replica state
master/replication.py - Replica Repair → Chunk Placement: chooses repair target
master/replication.py - Replica Repair → Chunk RPC: dispatches replica copy
master/replication.py - Replica Repair → Metadata Store: saves replicas
master/replication.py - Chunk RPC → Heartbeat Reports: starts reporter
datanode/server.py - Heartbeat Reports → Master RPC: reports health and blocks
datanode/heartbeat.py - Chunk RPC → Chunk RPC: replicates peer chunks
README.md - Scrape Config → Prometheus: configures scraping
README.md - Prometheus → Master RPC: scrapes metrics
README.md - Prometheus → Chunk RPC: scrapes metrics
README.md - Dashboard Config → Grafana: configures dashboard
README.md - Grafana → Prometheus: queries metrics
README.md - Runtime Config → Master RPC: supplies settings
master/server.py - Runtime Config → Chunk RPC: supplies settings
datanode/server.py