Skip to content

i95n/jpgstreamstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jPgStreamStore

Build Status

fancy, sophisticated persistence handling

jpgstreamstore is a small library targeted at building scalable event-sourced applications on top of PostgreSQL. It has simple API, heavily inspired by Greg Young's Event Store.

Features

  • Fully ACID compliant
  • Optimistic concurrency support
  • Custom stream and event properties
  • Small concise API, no (callback hell, rose futures, broken promisses)
  • Global event stream for HA replication
  • Duplicate event detection (based on identity)[todo]
  • Friendly for multi-tenant designs
  • Zero transitive dependencies

Design

jpgstreamstore is just a thin layer (library, not a server) on top of PostgreSQL. It implements low-level mechanics for dealing with event streams, and all heavy-weight lifting is done by underlying provider.

The api is stateless and all exposed objects are immutable, once fully constructed. jpgstreamstore doesn't dictate payload serialization protocol, so you are free to choose any protocol you want.

Optimistic concurrency is implemented by always including stream version with every write, making it impossible to append to a stream without first having a latest version.

Schema

Schema

Usage

Essentials
  • Stream store bootstrap [see]
  • Writing to stream [see]
  • Reading from stream [see]
  • Optimistic concurrency [see]
  • Replication [see]

Contribute

This is a volunteer effort. If you use it and you like it, let us know whos-using, and also help by spreading the word!

License

Copyright 2018. Released under the UNLICENSE.

Releases

No releases published

Packages

No packages published

Languages