Small follow up on useful tools for preserving 1-writer:
Cluster Sharding
<http://doc.akka.io/docs/akka/2.3.6/contrib/cluster-sharding.html> is a
very good way to spread your persistent actors in a cluster while
guaranteeing "one instance per persistence id".
There's also a video from the Akka Persistence ScalaDays 2014 talk
<http://parleys.com/play/53a7d2c3e4b0543940d9e53b/chapter0/about> we did,
in which Patrik explains why Cluster Sharding is so useful with Persistent
Actors.

Hope this helps!


On Mon, Sep 8, 2014 at 8:48 AM, Konrad Malawski <[email protected]> wrote:

> Hello guys,
> wherever you need strict order in a distributed system there must be one
> source of sequence-truth, in akka-persistence's case this means having one
> persistent actor,
> otherwise they'd compete with each other and "behaviour is undefined" yet
> surely undesired they could overwrite events or cause duplicate stores with
> the same sequence id – that's all journal dependent though.
>
> I'd strongly advertise against working against this limitation – if you do
> it's perhaps a sign you're not doing event sourcing but forcing some other
> way of thinking onto akka-persistence for which it was not designed for.
>
>
> On Mon, Sep 8, 2014 at 8:18 AM, Ashley Aitken <[email protected]> wrote:
>
>>
>> Thanks for your post Olger.
>>
>> On Monday, 8 September 2014 14:11:14 UTC+8, Olger Warnier wrote:
>>
>> Events are assigned the same number as each instance starts counting in
>>> the same way. It appears that the last one written with a specific sequence
>>> number is eventually kept.
>>>
>>
>> That's unfortunate (I think).  I wonder if there would be some way for
>> Akka Persistence to keep events with the same sequence number and for PAs
>> and PVs to effectively handle that situation.  I realise it may not be that
>> sensible from a persistent state perspective but more generally it could be
>> useful.
>>
>> In my situation, I've solved this by using a cluster singleton for this
>>> persistent actor.
>>>
>>
>> Thanks for that tip.
>>
>> 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.
>>
>
>
>
> --
> Cheers,
> Konrad 'ktoso' Malawski
> hAkker @ Typesafe
>
> <http://typesafe.com>
>



-- 
Cheers,
Konrad 'ktoso' Malawski
hAkker @ Typesafe

<http://typesafe.com>

-- 
>>>>>>>>>>      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