Hi Ryan,
Kafka's log compaction is not an accurate analogy, as it simply works by
preserving the last msg with a given key, removing previous messages
with that key. That's not the same as the concept of snapshots in event
sourcing.
Cheers,
Michal
On 15/03/17 16:29, 'Ryan Tanner' via Akka User List wrote:
One option, which may not be feasible depending on your use case, is
to simply replay *all* events from scratch, rebuilding current state
on the fly when needed. If you can configure enough retention on your
Kafka cluster, it's an option.
Another is to keep periodic snapshots so that you have a more recent
starting point. You start at the last snapshot, apply all events
since the snapshot and end up with current state.
This is how both Akka Persistence and Kafka's new log compaction are
meant to work.
On Wednesday, March 15, 2017 at 4:30:23 AM UTC-6, kant kodali wrote:
if my current state A = |{key1: val1, key2: val2, .......key50:
val50}| and the next state B = |{key1: val1, key2: val2,
.......key5: val5}| then Persistence actor would store A-B =
|{key6: val6, key7: val7, .......key50: val50}| ?
On Tuesday, March 14, 2017 at 10:20:42 AM UTC-7, kant kodali wrote:
Thanks for all the replies. When I first came across event
sourcing it clearly says one stores events and changes in the
state but not the state itself. so In my case, I get messages
from Kafka and each message is say JSON with 50 fields like
this {key1: val1, key2: val2, .......key50: val50} and every
message will have all or subset of these keys. Now my goal is
to store these stream of messages as events in Cassandra and
for me to store the changes in state I always need to know the
current state to see the change in state caused by the next
request but I wonder how this is done typically with
PersistenceActor? Any simplistic example would help a great deal!
On Sunday, March 12, 2017 at 7:09:06 AM UTC-7, kant kodali wrote:
Hi,
What does it mean when someone says we store the event
itself rather than storing the state/data? such that the
events can be replayed to store the state/data. Does it
mean storing the functions/transformation itself (simply
put the JVM byte code for the function itself) ?
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 [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
Signature
<http://www.openbet.com/> Michal Borowiecki
Senior Software Engineer L4
T: +44 208 742 1600
+44 203 249 8448
E: [email protected]
W: www.openbet.com <http://www.openbet.com/>
OpenBet Ltd
Chiswick Park Building 9
566 Chiswick High Rd
London
W4 5XT
UK
<https://www.openbet.com/email_promo>
This message is confidential and intended only for the addressee. If you
have received this message in error, please immediately notify the
[email protected] <mailto:[email protected]> and delete it
from your system as well as any copies. The content of e-mails as well
as traffic data may be monitored by OpenBet for employment and security
purposes. To protect the environment please do not print this e-mail
unless necessary. OpenBet Ltd. Registered Office: Chiswick Park Building
9, 566 Chiswick High Road, London, W4 5XT, United Kingdom. A company
registered in England and Wales. Registered no. 3134634. VAT no.
GB927523612
--
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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.