This depends on exactly what you mean by “projection” - do you mean the generic term (e.g. to service queries such as “customers whose first name begins with “R”) or specifically projections within the Event Store which are most suited for temporal correlation
querying, indexing etc?
So there is in the client a CatchUpSubscription this basically allows you to use your event store as a queue (including for all messages hitting it). This will forward all the events to a handler of your choice. You would then in that handler update a database etc of your choosing. eg when you receive “OrderPlaced” you would insert into table … You can then query that persistent store directly
Can you help me with code sample in GitHub or net. I will go through the code in detail. Below text gave me a hint on projection ,To be frank Below is very short note I want to understand projections in detail.
There are no examples available in this regard. I want to use projections for business related querying/reporting.
I was following your comments from post “improving performance of akka persistence”. In this post also you mentioned about eventstore.jvm. Did not feel that is write post to ask below question.
What is eventstore.jvm?what is the purpose of this project?
It is the officially supported event store jvm client (it talks over the protobuf over tcp protocol). It is currently written in scala/akka and has java wrappers for java developers.
What you would do is setup a subscription just like in the example, in that actor/java code you would then write into whatever model you wanted (say sql or hadoop or a graphdb) then you would query whatever data storage you put it into. Obviously we don’t include how to query with joins in SQL as it has nothing to do with us and there is plenty of documentation for whichever database you happen to choose to use for such querying.
There is a separate project to use event store with Akka.peristence on that github account the jvm project is the client. That said using event store with Akka.persistence is an either or decision with Cassandra
You mention you use Cassandra as your Akka.persistence store. Event store is it’s own db and that is the driver for Akka.persistence with it (depends on eventstore.jvm which is the client)