liquidprojections / LiquidProjections

Liquid Projections supports building and maintaining autonomous .NET projection code in an Event Sourcing architecture.
https://www.liquidprojections.net
MIT License
169 stars 25 forks source link

Adaptor for EventStore #121

Open jkears opened 4 years ago

jkears commented 4 years ago

This project is awesome however we are not using NEventStore but are using EventStore https://eventstore.org/ with EF Core for projection storage.

Is it possible to create a LiquidProjection Adaptor for EventStore and EF Core? Can this adaptor support streams?

If so and aside from the NEventStore example, has anyone already created an adaptor for either EventStore and/or EF Core persistence? Is there any guidance on how to go about these tasks?

dennisdoomen commented 4 years ago

Not that I know off. I'm not using EventStore myself, but I would welcome a contribution.

Corniel commented 4 years ago

I'm willing to give it a try. Also looking into this at the moment and using EventStore. Is there a guideline on how to do this? (I would advise to go for Dapper to store projections in SQL though)

dennisdoomen commented 4 years ago

This would require two new repos, e.g. one called LiquidProjections.EventStore and one LIquidProjections.Dapper. I'm not quite sure if ES is an active store that support subscriptions, but if it is, it should be relatively easy. If not, you can use the LIquidProjects.NEventStore repo as an example of how you can use the PollingEventStoreAdapter to build an active adapter.

Corniel commented 4 years ago

@dennisdoomen I'm not sure if the Dapper approach requires a package. I would just argue that you should not use EF (Core) period. For insert, it is overhead, and ADO.NET or something as Dapper is sufficient, and for select it is or overhead (with simple select statements), or not performing (complex statements). But that might be seen as off-topic, in which case I appologize.