Hi Lawrence,
On 08.05.14 11:37, Lawrence Wagerfield wrote:
I read this tweet from Martin Krasser this morning:
"#Akka-persistence is optimized for making stateful actors durable
(at very high transaction rates), not for implementing durable queues"
I tweeted this after having written this post
<https://groups.google.com/forum/#%21msg/akka-user/RrnK9rT6Qw4/SmFtJNn6ZBQJ>.
We optimized akka-persistence for its primary use case, actor state
persistence with very high write throughput and efficient state
recovery, rather than competing with existing 3rd party messaging
products. Durable queues require different/additional optimizations.
They may come in later versions but that's not the focus yet.
If you want, you can use PersistentChannel to implement a durable queue,
it's just that its implementation is not optimized at the moment. A
PersistentChannel's main use case is for situations where you have slow
and/or only temporarily/occasionally available consumers, otherwise use
a plain Channel in combination with a processor.
I am confused as akka-persistence is comparable to other event
sourcing solutions
<http://doc.akka.io/docs/akka/snapshot/project/migration-guide-eventsourced-2.3.x.html>,
which rely on durable queues / journals.
Eventsourced doesn't rely on durable queues, and journal != durable queue.
So: what exactly is the scope of akka-persistence?
See above + views
<http://doc.akka.io/docs/akka/2.3.2/scala/persistence.html#views>. It is
usually for applications that want to keep a permanent history of
changes (rather than temporary storage of messages, which is the main
focus of durable queues). Infrequent range deletions of messages that
are older than a state snapshot
<http://doc.akka.io/docs/akka/2.3.2/scala/persistence.html#snapshots>
are also well supported.
Should it just be used for serializing actor state without their
mailboxes?
akka-persistence does *not* store actor state directly (except from
optional snapshots), instead it stores changes to an actor's state, in
terms of
- messages received by a processor
- events generated by an eventsourced processor
Furthermore, akka-persistence != durable mailboxes. Instead, if
- a Processor's receive handler is called with a Persistent message,
only then it can safely assume that the message has been successfully
journaled/stored.
- an EventsourceProcessor's persist() handler is called, only then it
can safely assume that the event has been successfully journaled/stored.
Hope that helps.
Cheers,
Martin
This is what I gleaned from the above tweet (retweeted by Jonas).
--
>>>>>>>>>> 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
<mailto:akka-user+unsubscr...@googlegroups.com>.
To post to this group, send email to akka-user@googlegroups.com
<mailto:akka-user@googlegroups.com>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
Martin Krasser
blog: http://krasserm.blogspot.com
code: http://github.com/krasserm
twitter: http://twitter.com/mrt1nz
--
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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.