Hi Ashley,

14 aug 2014 kl. 19:30 skrev Ashley Aitken <[email protected]>:

> Sorry, another question.

Not at all!

> It seems to me that currently PersistentViews recover by reprocessing (or at 
> least considering) all their PersistentActor's events each time they are 
> created.
> 
> Please correct me if I am wrong?
> 
> If this is true, is there any way to have PersistentViews not do this, i.e. 
> to restart processing from after the last message they had previously 
> processed.
> 
> I am thinking of a PersistentView that is used to update a database (SQL or 
> NOSQL) based on a large projection of events from multiple PersistentActors.

There is no such thing as exactly-once, the only thing we can reasonably 
guarantee is at-least-once, meaning that you must be prepared to receive an 
“old” event during a replay. The reasons for this are manifold, a very simple 
one is that you need to persist that you processed the event after processing 
it, and the machine can crash between those two moments, leaving you with a 
processed event that you will get again. There is no solution to this, not even 
using magic.

Regards,

Roland

> 
> I am hoping the event store will be able to assist with this remembering but 
> maybe it is asking too much (i.e. remembering for all PVs).
> 
> If not, perhaps the PersistentView could also be a PersistentActor storing 
> the sequence number of the last processed event (if that would be useful?).
> 
> Thanks in advance for any answers.
> 
> Cheers,
> Ashley.
> 
> 
> -- 
> >>>>>>>>>> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.



Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Reactive apps on the JVM.
twitter: @rolandkuhn


-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to