'Implement CQRS using EventStore with ElasticSearch

I am currently learning CQRS implementation using ElasticSearch and EventStore. So, I decided to use EventStore for saving the serious of event streams into EventStore and I want to use Elastic Search to Query the Data/CurrentState Data from the EventStore.

My Questions are,

1.) Using ElasticSearch, Shall we query the aggregated Data/CurrentState data from EventStore directly or Do we need to Sync/Store the aggregated Data/CurrentState data into the ElasticSearch for Querying?

2.) What is the Proper way to sync/index Event store data into elastic search? Do we need to use any intermediator to sync/index the EventStore data into elastic search? My ultimate aim is to build the CQRS implementation using EventStore for Command and ElasticSearch for Querying.

Note: I am planning to build a system in .net Core using NEST and ElasticSearch.net dll.

Your thoughts are much appreciated.

Thanks in advance.



Solution 1:[1]

Since you are in a learning phase, I strongly recommend that you take Elastic and EventStore out of your initial implementation. Focus on CQRS, and implement a simplified version of ES. You don't need a full-blown Event Sourcing approach right at this stage.

Solution 2:[2]

I am not sure how familiar you are with Scala/Java but I strongly recommend to look to the Akka Framework to realise the CQRS.

For Command/Write side Akka Finite State Machine with Cassandra persistence, while have to deal in an organised way the amount of the Events we get and Elasticsearch with Akka Projections to implement Read side of the CQRS.

I wrote a blog about it, if it interests anybody CQRS with Akka

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 faxad
Solution 2 posthumecaver