Event sourcing alternative ?

Because of time contraints, the lack of experience on my team, and the small size, I don't think it's feasible to try to implement event sourcing right now on a new system we are building. However, I want to do something where I can at least start saving the events for future use and I'm looking for some way to do this that's not overly complicated. Does anyone have any suggestions? I'm thinking of something like cqrs and dropping the events into a nosql store to later be moved into a reporting database.

Thoughts ?

Hi Jeff,

I don’t know what language/framework/technology you’re intending to use in your new project, so YMMV, but my experience taught me that the best moment to do event-sourcing is right from the start. It may seem overwhelming at first, but the fact is migrating an existing application to event-sourcing after the fact is somehow tedious and painful.

If you’re in the scala/java/akka world, you’re blessed : akka-persistence will do (almost all) the job for you, and I think someone familiar with akka can skim through the docs and become productive with akka-persistence in a few hours (there’s also a port of Akka in .NET, but I don’t know how complete it is).

The good thing there is that you can start with a simple storage backend for your journal (eg local disk) and later switch to a full fledged database (eg eventstore) without changing your business code (but you’ll of course have to move your data from local disk to database).

So my (humble) advice is : if you’re willing to do (CQRS+) event-sourcing, just go ahead and do it from the start, it will be extremely rewarding in the long run, and you may even find it to speed up your development.

Cheers

Valentin

I know of a perfect nosql database for storing events: geteventstore.com. Even if you won't be using it as your system of record from the start (I agree you should from the very start if you ever plan to make it so) you can still store the events there after the fact.

I've used akka.net and it is excellent with an outstanding community and consistent contributions. Though I haven't yet used akka.net persistence, I understand it to be at least very far along, if not production ready.

I can vouch for akka.net. We’re going into production using it, along with akka.persistence, soon. Super simple to get started.

Is it worth providing an akka.persistence driver for akka.net like we
do for akka?

I would say yes. There may already be some work out there towards this. I found this through a quick search: https://github.com/4deeptech/Akka.Persistence.EventStore

There is one here, haven’t tried it, looks pretty dead, and isn’t on nuget:

https://github.com/trbngr/Akka.Persistence.EventStore/tree/master/src

So I think an ‘official’ implementation would be good, I’d use it with a lot more confidence.

/Peter

That was mine attachment-1.png

It’s dead because we decided to use the cassandra plugin.

One thing I like about ES for akka persistence is the ability to use subscriptions instead of timed polling for persistent views.

There is a lon (100 email) thread on the akka list about querying APIs and akka.persistence. The current API is quite far from what is needed. The current suggestion is to not use the API for querying.

attachment-1.png

That’s my conclusion as well, but I’m very early in on my first Akka.net project. Writeside seems fine, but readside need a lot of plumbing. (catchup on eventbus, buffering, transaction handling etc). I’ll se if it’s possible to break out these parts as a contrib-project or something later on…

/Peter

This would be awesome. I’m currently using one of the ones listed below. I’ll have to take at look at the Akka(scala) one to see what capabilities it has.

Might this still be in the cards? It would be great to have an official driver. Even if it’s just an initial version to get it started.

Christian

Making the driver is a fairly trivial exercise its just a wrapper
around the client API

Here’s a pretty good start

Preview image

trbngr/Akka.Persistence.EventStore


Akka.Persistence.EventStore - EventStore Persistence for Akka.net

github.com

Mixmax

Just needs a few things to be complete.

I’m already using another one. It might even be a fork. I was more hoping for something official to get EventStore some visibility.