
Database
event sourcing with PostgreSQL database.
Events table- a globally ordered ledgerOptimistic Locking- for concurrency controlConstrains- no misspelled event types, immutable by default
No additional tools, frameworks, or programming languages are required at this level.
Stream it
event-streaming with PostgreSQL database.
Concurrent Consumers- for efficient streamingPool the DB/Push from DB- two techniques for database pooling and/or pushing eventsAt-Least-Once Delivery- to ensure reliabilityPersisted Streams- track the progress


Alternative
A Key-Value (KV) database is a NoSQL system that stores data as key-value pairs, enabling extremely fast reads and writes.
Databases like FoundationDB, DenoKV, DynamoDB, TiKV provide a strongly consistent, transactional KV core that can serve as the foundation for higher-level abstractions such as event-sourced models.
eventsByStreamId.(streamId).(eventId)- appending events to their respective streamsevents.(eventId)- appending events to the global streamlastStreamEvent.(streamId)- implementing optimistic locking by tracking the version/sequence of each stream
Unlock Event Sourcing
Build simple, event-driven systems on a flexible Key-Value (KV) foundation - no rigid transactional boundaries required.
- Each combination of type and tags has its own
lastEvent.(eventType).(tag1)...(tagN)key. - That key acts as a version marker for that specific combination.
- When you write an event affecting that combination, you check the version (optimistic locking) and update it.
Result: Dynamic consistency boundaries, high throughput, and full control over your event store - all without sacrificing reliability.

Demo Applications
| Language | Source Code |
|---|---|
| Kotlin (Spring) | |
| Kotlin (Ktor) | |
| TypeScript | |
| TypeScript (Deno KV and Dynamic Consistency Boundaries) | |
| Rust (Actix-Web Server) | |
| Rust (PostgreSQL Extension) |