A Rust-based peer-to-peer decentralized file sharing application.
- Peer Discovery & Networking: Powered by rust-libp2p for robust decentralized communication.
- gRPC API: File operations exposed via tonic for easy integration.
- Multi-threaded Transfers: Efficient uploads/downloads using tokio.
- Data Integrity: Merkle tree verification with rs_merkle ensures files are untampered and complete.
- Efficient Metadata Storage: Uses serde_cbor for compact binary encoding of file metadata.
- Persistent System State: rust-rocksdb for reliable, high-performance storage.
- Fault Tolerance: Automatic recovery and partition handling.
- Modular Architecture: Easily extend or customize components.
- Rust (latest stable)
cargo build --release
cargo run --releaseStart multiple nodes to form your P2P network:
cargo run --release -- --base-path ./node1 --grpc-port 8888 start
cargo run --release -- --base-path ./node2 --grpc-port 9999 startSend a PublishFile gRPC request to localhost:8888 (node 1).
Send a Download gRPC request to localhost:9999 (node 2), using the fileId from node 1's logs after publishing.
Hint: The gRPC interface is defined in proto/dfs.proto.
- Add support for file versioning.
- Develop a web-based management dashboard.
- Write comprehensive tests and benchmarks.
- Add documentation for API usage.
Generated by cloc:
❯ cloc src
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Rust 18 411 86 2582
-------------------------------------------------------------------------------
SUM: 18 411 86 2582
-------------------------------------------------------------------------------
This project is licensed under the MIT License.