On Thu, Sep 8, 2016 at 8:38 AM, Patrik Nordwall <patrik.nordw...@gmail.com>
wrote:

>
>
> On Thu, Sep 8, 2016 at 12:42 AM, <ques...@gmail.com> wrote:
>
>> On Wednesday, September 7, 2016 at 3:16:57 PM UTC-7, Guido Medina wrote:
>>>
>>> By induction you can conclude that messages order is guaranteed when
>>> sending sequentially (in the same thread) by using the following assertions:
>>>
>>>    - Messages sent to any local actor go immediately to their
>>>    destination inbox hence order is preserved because of sequential 
>>> execution
>>>    - JMM rule.
>>>    - Messages that go from node A to node B will be sent in the same
>>>    order as they arrive to node A remote dispatcher's inbox which for an 
>>> actor
>>>    hosted at node A, the order of arrival is preserved (apply previous rule)
>>>    - Messages that arrive to node B will be put in the remote
>>>    dispatcher inbox in the same order they arrived, apply first two rules 
>>> and
>>>    you that concludes in the messaging ordering rule - as for remote, 
>>> current
>>>    remote implementation when sending from node A to B, it can only send
>>>    synchronously hence, order is also preserved.
>>>
>>> The most complicated rule is the last one, but once order from node A to
>>> node B is preserved then you can conclude that order messages from actor A
>>> to actor B is also preserved regardless of their location.
>>>
>>
> The rules only apply when the destination actor is the same.
> Implementation of old and new remoting are different in this regard, but
> that is implementation details that doesn't change the original rule.
> The new remoting will support parallel outbound and inbound lanes that are
> selected based on hashing of the destination ActorRef.
>
>
>> This is my explanation with my own words, the documentation I think
>>> explains it using the Java Memory Model as a reflection.
>>>
>>> HTH,
>>>
>>> Guido.
>>>
>>>>
>>>>
>> Can't the data that makes up 2 messages arrive out of order when sent
>> over a network? So, node A might send them in the order it received them,
>> but the order in which the node received the messages could be different
>> from what was sent to node A.
>>
>
We are only using transports that preserve order. TCP and Aeron.


>
>> The cited documentation says:
>>
>> It is important to note that Akka’s guarantee applies to the order in
>>> which messages are enqueued into the recipient’s mailbox.
>>
>>
>> Does that refer to the order in which messages are sent by Akka instead
>> of enqueued for the receiver?
>>
>
> I think that is a disclaimer for when the mailbox itself is not preserving
> order, e.g. a priority queue.
>
>
>>
>>
>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/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.
>>
>
>
>
> --
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
> Twitter: @patriknw
>
>


-- 

Patrik Nordwall
Akka Tech Lead
Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
Twitter: @patriknw

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