Event sourcing journal layer

(Nikita Melkozerov) #1

Hi folks,

I’ve implemented an event sourcing journal for akka-persistence using FoundationDB:

Some features which were possible due to FoundationDB:

  • Database push for live queries, it allows ~30ms lag between persisting the event and its appearance in read query stream.

  • Safe event insertion mode, if it’s enabled, event writes calls will return an exception if two writers will write an event with the same persistenceId and sequenceNr . It should prevent the journal corruption in case of split brains.

  • Two ways to build secondary event index: a reference to an existing event or a whole copy of the existing event. It helps if you want to be flexible between the amount of used storage space and performance of your reads.