But if you can have concurrent writes, because requests to multiple nodes
and timing etc, you do run st the risk. Also, stopping actors a meter every
write is very weird and not what akka persistence was really designed for.
It’s not a key value store, it’s event sourcing for medium-long loved
entities.

-- 
Konrad Malawski

On October 28, 2017 at 17:44:08, wapgui (torsten.schm...@wapgui.com) wrote:

> I'm closing the actors after each request and recreate with the same uuid.
>
> Am Samstag, 28. Oktober 2017 10:41:28 UTC+2 schrieb Konrad Malawski:
>>
>> Are you creating many persistent actors with the same persistence I’d?
>> That of course breaks things. Please read the persistence docs and use akka
>> cluster with cluster sharding instead to handle the cluster creating the
>> actors. This not only is easier but also is safe - the uniqueness will be
>> guaranteed by sharding then.
>>
>> --
>> Konrad Malawski
>>
>> On October 28, 2017 at 17:34:12, wapgui (torsten...@wapgui.com
>> <javascript:>) wrote:
>>
>>> Hi,
>>>
>>> I've built a FSM using Akka FSM and Persistence to a Percona cluster in
>>> near cloud.
>>> Running this environment in a single instance causes no problems at all.
>>> If I dockerize this single instance and running it at 2 instances causes
>>> sometimes problems with the state.
>>> E.g. making the first request with New creates the state object on an
>>> instance. From the second instance the next request calls to switch to the
>>> next state, but the FSM answers there is no object and a switch is not
>>> possible. The second request was 14s after the first one.
>>> My service creates an actor each time a request comes in with the
>>> reference to the uuid of the process. After handling the request, the actor
>>> will be closed, until the next request comes in. Is this really necessary?
>>> I made this because of the multiple instances to be sure the state of the
>>> actor is the same on all instances. Maybe I've there a missunderstanding
>>> and I can leave the FSM actors on system, generating clones on other
>>> instances and the persistence handles the data exchange on all these
>>> instances.
>>>
>>> Could somebody explain me what is the right decision?
>>>
>>> Best regards
>>> Torsten
>>>
>>> --
>>> >>>>>>>>>> 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+...@googlegroups.com <javascript:>.
>>> To post to this group, send email to akka...@googlegroups.com
>>> <javascript:>.
>>> 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.
>

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