| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
HyDFS is a hybrid distributed file system (HyDFS) and key-value store inspired by ideas from Cassandra (consistent-hash ring + replication) and HDFS (chunked storage with manifests). The implementation is in Go and is intended to run across multiple VMs. The project combines two coordinated subsystems:
Key implementation points:
config.json # System configuration file (cluster knobs and runtime parameters)
README.md # Project documentation
dataset/ # Test datasets and sample files used for experiments
business_*.txt # sample input files used by evaluation scripts
text_*.txt # text files of various sizes for throughput/latency tests
llm/ # LLM notes and chat logs
chat.txt # conversation / notes
setup/ # Scripts for VM setup and orchestration
setup.bash # Local single-VM setup/install script
vm_setup.bash # Multi-VM orchestration script (setup/start/stop)
start_server.bash # Starts servers/daemons across nodes
kill.bash # Kills running test processes / daemons
src/ # Source code (Go)
go.mod # Go module file (dependencies)
config/
config.go # Configuration structures, parsing, DTO and live-apply logic
ctl/
hydfsctl_daemon.go # hydfs control client/daemon: CLI for file ops and test orchestration
hydfs/
cmd/
hydfsd/
hydfs_daemon.go # HyDFS daemon entrypoint for storage node (starts HTTP + replica manager)
server/
http_server.go # HTTP API used for client/replica endpoints (upload, download, replica management)
ring/
replica_manager.go # Plans local push/GC on ring changes and executes re-replication via HTTPMover
ring_manager.go # Builds/updates the logical token ring from membership information
ring.go # Ring utilities: tokens, predecessor/successor, node iteration
routing/
router.go # Maps file tokens to replica set (replica selection logic)
storage/
chunk_store.go # Low-level chunk storage (read/write chunk blobs)
file_enumerator.go # Enumerates files & tokens for re-replication and GC
file_store.go # High-level file store: manifest+chunks management and stream IO
fs_paths.go # Filesystem layout and path helpers for manifests/chunks
manifest.go # Manifest structure and deterministic append/merge logic (append ops)
utils/
ascii_ring.go # ASCII helpers for pretty-printing ring/token maps
ids.go # ID/token utilities and hashing helpers
main/
main.go # Local hydfs/membership binary (convenience runner)
membership/
daemon/
config_diff.go # Utilities to compute and log config diffs
daemon.go # Membership daemon: starts gossip/pingack loops, introducer, HTTP admin
node/
nodeid.go # NodeID, endpoint and timestamp helpers
protocol/
common/
inflight.go # Inflight tracker used by ping/ack for nonce/timeouts
peers.go # Peer selection helpers used by both gossip and ping/ack
gossip/
loop.go # Gossip protocol loop: periodic gossip + recv and merge
pingack/
loop.go # Ping/Ack protocol loop: periodic ping, ACK handling, inflight tracking
store/
membership.go # Membership store: entries, incarnation, merge rules and snapshot
subscriber.go # Subscriber interface for components that react to membership changes
suspicion/
manager.go # Suspicion manager: scanner that marks suspect/fail and issues GC/cleanup
transport/
udp.go # UDP wrapper used by both protocols (Read/Write helpers)
utils/
colors.go # Terminal color constants used in logging
wire/
codec.go # Wire encoding/decoding of membership messages (ping/ack/gossip)
utils/
utils.go # Generic helpers (DNS resolution, string utilities)
To get started with hydfs-g33, follow these steps:
git clone <your-repo-url> cd hydfs-g33
cd src # Install Go dependencies go mod tidy
Use the provided scripts in the setup/ directory to initialize and start the system:
# Setup VMs and environment bash setup/vm_setup.bash # Start the server bash setup/start_server.bash
On each VM, run the setup script to install dependencies and clone the repo:
cd setup bash setup.bash
Or, to automate setup and startup across all VMs from one machine:
bash vm_setup.bash setup # Setup all VMs bash vm_setup.bash start # Start servers on all VMs
If the automation scripts were run, the hydfs daemon will already be running on each VM. You can attach to the session (if using tmux):
sudo tmux -S /tmp/tmux-cs-425-mp3.sock attach-session -t cs-425-shared-mp3
Or run directly:
--> if introducer:
sudo tmux -S /tmp/tmux-cs-425-mp3.sock new-session -d -s cs-425-shared-mp3 "cd /home/mp3/hydfs-g33/src/main && go run main.go -is-introducer"
--> else:
sudo tmux -S /tmp/tmux-cs-425-mp3.sock new-session -d -s cs-425-shared-mp3 "cd /home/mp3/hydfs-g33/src/main && go run main.go -introducer=fa25-cs425-3301.cs.illinois.edu:6000"
To interact with the hydfs daemon, you can use the hydfsctl daemon located in src/ctl/hydfsctl_daemon.go. This tool allows you to send commands and queries to the running hydfs daemon.
sudo tmux -S /tmp/tmux-cs-425-mp3-ctl.sock attach-session -t cs-425-shared-mp3-ctl
Or run directly:
sudo tmux -S /tmp/tmux-cs-425-mp3-ctl.sock new-session -d -s cs-425-shared-mp3-ctl "cd /home/mp3/hydfs-g33/src/ctl && go run hydfsctl_daemon.go -is-ctl-client"
The hydfs daemon provides the following features:
Membership and failure events are logged and can be monitored via the daemon output. Configuration is managed via config.json and command-line flags.
The hydfs daemon supports various commands for file operations and system management. Use the hydfsctl daemon to send commands to the hydfs daemon.
create <localfilename> <HyDFSfilename>
append <localfilename> <HyDFSfilename>
get <HyDFSfilename> <localfilename>
merge <HyDFSfilename>
ls <HyDFSfilename>
liststore
getfromreplica <VMAddress> <HyDFSfilename> <localfilename>
list_mem_ids
multiappend <HyDFSfilename> <VMi> <VMj> ... <localfilei> <localfilej> ...
multicreate n <localfile> ...
help
exit | quit
The HTTP server (port 8080) exposes several endpoints for monitoring and controlling the distributed group membership system. Example usage with curl:
--> Example VM address used here: http://fa25-cs425-3301.cs.illinois.edu:8080
curl http://fa25-cs425-3301.cs.illinois.edu:8080/get | python -m json.tool --sort-keyscurl http://fa25-cs425-3301.cs.illinois.edu:8080/set | python -m json.tool --sort-keyscurl http://fa25-cs425-3301.cs.illinois.edu:8080/list_mem | python -m json.tool --sort-keyscurl http://fa25-cs425-3301.cs.illinois.edu:8080/list_self | python -m json.tool --sort-keyscurl http://fa25-cs425-3301.cs.illinois.edu:8080/display_suspects | python -m json.tool --sort-keyscurl http://fa25-cs425-3301.cs.illinois.edu:8080/display_protocol | python -m json.tool --sort-keyscurl http://fa25-cs425-3301.cs.illinois.edu:8080/leave | python -m json.tool --sort-keyscurl -s -X POST http://fa25-cs425-3301.cs.illinois.edu:8080/switch -d '{"protocol":"pingack","suspicion":"disabled"}' -H 'content-type: application/json' | python -m json.tool --sort-keyscurl -s -X POST http://fa25-cs425-3301.cs.illinois.edu:8080/switch -d '{"protocol":"gossip","suspicion":"disabled"}' -H 'content-type: application/json' | python -m json.tool --sort-keyscurl -s -X POST http://fa25-cs425-3301.cs.illinois.edu:8080/switch -d '{"protocol":"pingack","suspicion":"enabled","suspicion_time":"1s"}' -H 'content-type: application/json' | python -m json.tool --sort-keyscurl -s -X POST http://fa25-cs425-3301.cs.illinois.edu:8080/switch -d '{"protocol":"gossip","suspicion":"enabled","suspicion_time":"1s"}' -H 'content-type: application/json' | python -m json.tool --sort-keysThese endpoints allow you to query and modify the system state, view membership and suspicion lists, and control protocol settings at runtime.
Contributions are welcome!
| Back | FazBrowse Home | New Git URL |