Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 1.65 KB

2019.08.09_expectations_for_an_event_store.md

File metadata and controls

38 lines (32 loc) · 1.65 KB

Expectations

What I expect from some system managing storage of streams of events, intended to be used in an event-sourced system.

  • ability to create streams
  • ability to delete streams
  • ability to use optimistic locking on stream level
  • ability to write a batch of events in one stream atomically and durably
  • ability to read events from one stream
  • ability to read all events in the store ( the so called "$all" stream)
  • ability to read forward and backward
  • ability to read from some position in a stream or from the "$all" stream
  • ability to remove events before some position in a stream
  • ability to remove events before some time
  • ability to have subscription (though I might consider it a bonus)
  • ability to read events from a stream in commit order
  • ability to read events from "$all" stream in commit order
  • ability to have metadata on stream level
  • ability to have metadata on stream level even if the stream does not exists yet
  • ability to have metadata on events
  • idempotent writes (more on that later)
  • support for high-availability scenarios
  • support for at least write quorums and causally consistent, monotonic reads

other functionalities are bonuses, some bonuses are evil

Examples of bonuses

  • ACL on streams
  • server side managed subscriptions
  • system streams
    • deleted streams

Examples of evil bonuses

  • Transactional write on multiple streams:

    • you can avoid it by carefully designing your streams [Note the year is 2024: I may have changed my mind about this since a few years ago]
  • allowing to participate in Distributed Transactions

    • e.g. writing to a stream and updating a read model in another storage atomically