Show HN: SierraDB – A Distributed Event Store Built in Rust
a day ago
- #rust
- #event-sourcing
- #distributed-systems
- SierraDB is a distributed event store built in Rust, designed to address gaps in event sourcing databases.
- Event sourcing requires specific guarantees like append-only storage, gapless sequence numbers, and efficient stream reading, which general-purpose databases struggle with.
- SierraDB is built in Rust for predictable performance without garbage collection pauses, ensuring consistent latencies.
- It uses RESP3 for communication, making it compatible with any language that has a Redis client.
- SierraDB supports horizontal scaling with a partition model, allowing for growth from a single node to hundreds.
- Built-in subscriptions simplify projections and event handlers by streaming events from any point in history.
- Core architecture includes partitions, buckets, and segments, ensuring immutable data and efficient indexing.
- The database guarantees gapless, monotonic sequence numbers per partition, crucial for optimistic locking.
- Cross-stream transactions are possible by sharing partition keys, enabling atomic appends to multiple streams.
- Distributed consensus is achieved with a quorum-based write protocol and a watermark system for consistent reads.
- SierraDB uses libp2p for inter-node communication and Kameo, an actor framework, for fault tolerance.
- The database includes SierraDB Inspector, a web interface for exploring events and running projections.
- Docker images are available for easy setup, and contributions are welcome to improve documentation and tests.