Jaguar-dart / cqrs

Command Query Responsibility Separation framework for Dart
Other
9 stars 4 forks source link

Event store ? #1

Open ghost opened 6 years ago

ghost commented 6 years ago

Any thoughts ? This card is really clean thanks to dart. In golang it's messier.

tejainece commented 6 years ago

I think EventStore is handled by Repository. Repository persists events in some storage engine and also retrieves them so Aggregate can build the domain model.

There is an example in-memory repository here: https://github.com/Jaguar-dart/cqrs/blob/master/lib/repository/repository.dart#L21

What is missing right now is serialization so that repository can store events in some nosql.

Also event bus is currently missing. Events are available from events. These should be pushed to something like kafka, nats or nats streaming.

Would this work for you?