akka / akka-meta

This repository is dedicated to high-level feature discussions and for persisting design decisions.
Apache License 2.0
201 stars 23 forks source link

Event sourcing for Akka Streams #51

Open krasserm opened 7 years ago

krasserm commented 7 years ago

I just published a proposal how to add event sourcing to Akka Streams. It proposes an EventSourcing graph stage that, when joined with an event log, is a stream-based equivalent to a PersistentActor but with type-safety and back-pressure for the whole event sourcing message flow. The proposal also implements a stream API on top of Akka Persistence journals and Apache Kafka to define a public interface for event logs.

Please note that this proposal is not a complete specification but rather illustrates some initial ideas and verifies them with a prototype implementation. In its current state, it should mainly serve as a basis to discuss the general approach (rather than implementation details). The proposal might become a later contribution if there is enough interest.

krasserm commented 7 years ago

The proposal is now extended for supporting behavior changes for request and event handlers. The approach is comparable with that of typed actors except that handler results are returned in addition to new behavior.