Tal describes it very well. In the future we'll hopefully be able to get
notifications from Cassandra when something has changed instead of using
the primitive poll approach. There is already Change Data Capture (CDC) in
Cassandra but it's an extremely low level api so far. Improvement
suggestions based on CDC or something else very much welcome.

/Patrik
sön 12 mars 2017 kl. 15:24 skrev Tal Pressman <kir...@gmail.com>:

> Hi,
>
> I think the name for Persistence Query is a little misleading - when I
> first heard it I imagined something like an SQL query that can run over the
> data source, but that's not what it is. What it actually does is set up an
> Akka stream source that handles the events from the data store. The stream
> can be finite (like currentEventsByPersistenceId will stop once it has
> caught up with all the events) or infinite (like eventsByPersistenceId). In
> the second case, whenever there a new message is written to the data store
> (and the stream isn't back-pressured / busy) the source will emit the new
> message for the stream to handle.
>
> Now, as you've mentioned, there is no "push" mechanism for Cassandra, but
> that doesn't mean that everything breaks down. It simply means that when
> you use the CassandraReadJournal there is a thread that polls the DB and
> when there are new events there passes them down the stream.
>
> HTH,
> Tal
>
>
> On Sunday, March 12, 2017 at 4:09:02 PM UTC+2, kant kodali wrote:
>
> Hi All,
>
> I am trying to understand event sourcing in detail and I am new to Akka.
> One of book I was reading says a Persistence Actor will write events to a
> Journal so in my case the Journal is Cassandra and one can have Persistence
> Query Actor listen to the events from the Journal and this is where I don't
> understand how it works. More specifically, How does Persistence Query
> Actor know they are new events that it needs to Query for? I assume
> Persistence Actor and Persistence Query Actor are two separate things (so
> How does Persistence Query Actor gets notified that there are new events
> written by Persistence Actor)
>
> I would like to get live stream from Cassandra but I as far as I know I
> don't think there is any push based mechanism in Cassandra where Cassandra
> itself will push new events to some message bus or application. please
> correct me if I am wrong.
>
> Thanks,
> kant
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to