- DDB is a simple in-memory distributed database that provides a key-value store with support for replication and fault tolerance.
- It is not designed to be a production-ready database, but rather a learning tool for understanding distributed systems.
- Tools and Protocols
- Language: Golang
- Consensus: PBFT
- Storage: In-memory
- Networking: HTTP
- Purpose: Learning exercise
- Reference: This is implemented referring this
-
Basic Functionality We've created a basic distributed key-value store using PBFT consensus. This implementation covers:
- A thread-safe in-memory key-value store
- PBFT message structures and state management
- HTTP-based network communication
- Core PBFT consensus logic (normal case operation)
- Client interaction API
Some important aspects are simplified or omitted for clarity:
- View changes: The implementation focuses on the normal case
- Checkpointing: Basic state cleaning is included but not full checkpoint handling
- Message authentication: We don't implement full cryptographic signatures
- Error handling: Some error cases are simplified
- Client session handling: We don't track client request timestamps for duplicate filtering
-
Next Steps
To evolve this implementation, we could:
- Add proper view change handling
- Implement full checkpoint synchronization
- Add proper cryptographic signatures
- Improve client handling with request sequence tracking
- Add persistence to the key-value store
- Enhance error handling and recovery