I have a question about actor when it is in the cluster environment. Suppose we have four machines in the cluster now. And each machine have many alive actors. But now, we added a new machine into the cluster, so some message will be handled on the new machine. And the target actor which handle the messages will be created first on that machine. But you know this actor is already exist and alive on the original machine. In this case, we know that the actor has two instances at that time. The original actor may has some messages have not been processed yet, and the new created actor will start to process the new received messages.
So i think that this will cause the concurrent problem. After viewed some ppts, i know that the original actor will receive a notification that there is a new instance of the current actor instance is created on another machine, then any left messages of the current should not be processed again, all the left message should be send to the new actor instance. This can solve the concurrent problem i talked above. I think, one actor can only exist on one machine when in the cluster environment. If this point can be ensure, then we can asynchronously persist the event which is generate by the actor. Because "the latest state of actor is in memory", and the storage just like relational db or nsoql db is only used to persist the event, these events are used to recover the actor when it crashes. The reason why we can asynchronously persist event is that the concurrent problem is controlled by the in-memory actor(any actor only has a single thread to process all the mailbox message). But the thing is not good as we expect: 1) When the new actor created successfully, it can immediately process incoming messages, but the notification to the original actor may take many seconds. that means, in these seconds, the original actor may still processing its mailbox message itself. So that the concurrent problem will still exist; 2) Due to some network problems, the original actor cannot know there is a new actor is created. In this case, it will also caused the concurrent problem. So, how do you think about this issue? -- >>>>>>>>>> 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.
