A distributed file storage system built in Golang, designed for efficient, secure, and scalable peer-to-peer (P2P) file storage and retrieval.
This system ensures data integrity, encryption, and optimized storage using a content-addressable storage (CAS) model.
- Fully decentralized file sharing using a TCP-based transport layer.
- Each peer can act as both a client and server, supporting dynamic participation.
- Implements SHA-1 hashing for deterministic file identification.
- Guarantees deduplication and efficient lookup of files by content hash.
- Files are AES-encrypted before distribution.
- Supports key-based decryption, ensuring confidentiality and controlled access.
- Allows multiple nodes to store and retrieve chunks of data.
- Resilient to node failures and supports horizontal scalability as peers join or leave the network.
- Structured file path transformation for organized storage.
- Efficient deletion and cleanup mechanisms to maintain system health.
- Language: Go (Golang)
- Networking: TCP sockets
- Hashing: SHA-1
- Encryption: AES
- Storage Model: Content-Addressable Storage (CAS)
- Go 1.21 or higher
- Git
git clone https://github.com/sarthak21-negi/distributed-file-storage.git
cd distributed-file-storage
go mod tidy
go run main.go