Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-08 Thread Patrik Nordwall
On Thu, Sep 8, 2016 at 8:38 AM, Patrik Nordwall 
wrote:

>
>
> On Thu, Sep 8, 2016 at 12:42 AM,  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  -  Reactive apps on the JVM
> Twitter: @patriknw
>
>


-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  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.


Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-08 Thread Patrik Nordwall
On Thu, Sep 8, 2016 at 12:42 AM,  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.
>
> 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/
> 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.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  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.


Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-07 Thread queshaw
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.
> 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.

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?  
 

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


Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-07 Thread Guido Medina
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.
This is my explanation with my own words, the documentation I think 
explains it using the Java Memory Model as a reflection.

HTH,

Guido.

On Wednesday, September 7, 2016 at 9:50:59 PM UTC+1, Justin du coeur wrote:
>
> On Wed, Sep 7, 2016 at 3:47 PM, Patrik Nordwall  > wrote:
>
>> The documentation is talking about actor pairs, because you normally send 
>> messages from an actor. In this example you don't send them from an actor, 
>> but that doesn't matter. The tell methods are called in a specific order 
>> since you invoke them from the same thread. Same would happen if the code 
>> were running in an actor.
>>
>
> Huh -- this is something I hadn't known.  Can you count upon the general 
> principle that "messages sent from a single thread to a given Actor will 
> arrive in the order they were sent"?  I'm not really *surprised* if that's 
> true (and I suspect I've implicitly assumed it without thinking about it a 
> few times), but I don't think I've ever seen it stated in those terms, and 
> it's useful to know one can count on it.  It's probably worth stating in as 
> many words *somewhere* in the docs if it's not already there...
>

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


Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-07 Thread Justin du coeur
On Wed, Sep 7, 2016 at 3:47 PM, Patrik Nordwall 
wrote:

> The documentation is talking about actor pairs, because you normally send
> messages from an actor. In this example you don't send them from an actor,
> but that doesn't matter. The tell methods are called in a specific order
> since you invoke them from the same thread. Same would happen if the code
> were running in an actor.
>

Huh -- this is something I hadn't known.  Can you count upon the general
principle that "messages sent from a single thread to a given Actor will
arrive in the order they were sent"?  I'm not really *surprised* if that's
true (and I suspect I've implicitly assumed it without thinking about it a
few times), but I don't think I've ever seen it stated in those terms, and
it's useful to know one can count on it.  It's probably worth stating in as
many words *somewhere* in the docs if it's not already there...

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


Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-07 Thread Patrik Nordwall
On Wed, Sep 7, 2016 at 7:51 PM,  wrote:

> Sorry for not understanding yet. The message ordering link cited earlier
> seems to me to be suggesting that ultimately programs in general can only
> have reliable message passing by having business logic that deals with it.
> The section from that link says:
>
> *for a given pair of actors, messages sent directly from the first to the
>> second will not be received out-of-order. *The word *directly* emphasizes
>> that this guarantee only applies when sending with the tell operator to
>> the final destination, not when employing mediators or other message
>> dissemination features (unless stated otherwise).
>
>
> I thought that this is no actor passing a message to an actor:
>
> final ActorRef greeter = system.actorOf(Props.create(Greeter.class),
>> "greeter");
>> greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());
>
>
> And this is the Inbox actor sending a message to an actor:
>
> inbox.send(greeter, new Greet());
>
>
> So, I thought that would mean that it is not the scenario described where
> there is 1 pair of actors passing messages between each other. It's 2
> independent pairs, I thought. greet.tell is one pair? no actor and an
> actor. inbox.send is another pair: inbox actor exchanges a message with the
> greeter actor. If that is the case, then is the order undefined between the
> 2 invocations?
>

No, the message is not sent from the inbox actor. It is sent from the same
thread as
greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());

That is why I said that it might look confusing to use inbox.send, and I
therefore recommend

greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());
greeter.tell(new Greet(), inbox.getRef());

Then it is clear what order those two messages are sent in, and they both
have the same destination.

The documentation is talking about actor pairs, because you normally send
messages from an actor. In this example you don't send them from an actor,
but that doesn't matter. The tell methods are called in a specific order
since you invoke them from the same thread. Same would happen if the code
were running in an actor.


>
> Tal Pressman, earlier in the thread, says the message are sent from the
> same "context". Maybe I'm missing a context other than the pair of actors
> that applies to message ordering.
>
> Kendall
>
> On Wednesday, September 7, 2016 at 5:12:49 AM UTC-7, Patrik Nordwall wrote:
>>
>> I think the line that might cause confusion here is
>>
>> inbox.send(greeter, new Greet());
>>
>> The inbox can be seen as a "mediator" and therefore perceived as it might
>> not preserve ordering. For this reason I would prefer to write it as:
>>
>> greeter.tell(new Greet(), inbox.getRef());
>>
>> That is exactly how inbox.send is implemented, so the ordering is just
>> fine.
>>
>> Cheers,
>> Patrik
>>
>> On Wed, Sep 7, 2016 at 10:58 AM, Guido Medina  wrote:
>>
>>> In the introduction chapter of Akka this is explained in details, how
>>> Akka takes care of it,
>>> I suggest you go there to learn the exact details:
>>>
>>> http://doc.akka.io/docs/akka/2.4.10/general/message-delivery
>>> -reliability.html#Discussion__Message_Ordering
>>>
>>> HTH,
>>>
>>> Guido.
>>>
>>>
>>>
>>> On Tuesday, September 6, 2016 at 5:12:32 PM UTC+1, que...@gmail.com
>>> wrote:

 The order that they are received would be the critical thing, I would
 think. So, is the example not dealing with the possibility that the
 messages could be received out of order? Or, is this somehow taken care of?

 Kendall

 On Monday, September 5, 2016 at 2:40:34 AM UTC-7, Tal Pressman wrote:
>
> Hi,
>
> Message ordering is preserved between a sender-receiver pair. However,
> this refers to the actual actual actor sending the message, regardless of
> the ActorRef passed as the sender reference.
> In the example above, both messages are being sent from the same
> context, and therefor should be sent in-order.
>
> Tal
>
>
> On Saturday, September 3, 2016 at 8:19:33 AM UTC+3, que...@gmail.com
> wrote:
>>
>> I'm early in learning Akka. The hello-akka-java8 tutorial has
>> greeter.tell from no actor, followed by inbox.send:
>>
>> final ActorRef greeter = system.actorOf(Props.create(Greeter.class),
>> "greeter");
>> final Inbox inbox = Inbox.create(system);
>> greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());
>> inbox.send(greeter, new Greet());
>> Greeting greeting1 = (Greeting) inbox.receive(Duration.create(5,
>> TimeUnit.SECONDS));
>>
>> Can I expect that the greeter actor is going to process new
>> WhoToGreet("akka"), before new Greet()?
>>
>> If so, why?
>>
>> I read in Akka documentation:
>>
>> "*...for a given pair of actors, messages sent directly from the
>> first to the second will not be received out-of-order.* The word

Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-07 Thread queshaw
Sorry for not understanding yet. The message ordering link cited earlier 
seems to me to be suggesting that ultimately programs in general can only 
have reliable message passing by having business logic that deals with it. 
The section from that link says:

*for a given pair of actors, messages sent directly from the first to the 
> second will not be received out-of-order. *The word *directly* emphasizes 
> that this guarantee only applies when sending with the tell operator to 
> the final destination, not when employing mediators or other message 
> dissemination features (unless stated otherwise).

 
I thought that this is no actor passing a message to an actor:

final ActorRef greeter = 
> system.actorOf(Props.create(Greeter.class), "greeter");
> greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());


And this is the Inbox actor sending a message to an actor:

inbox.send(greeter, new Greet());


So, I thought that would mean that it is not the scenario described where 
there is 1 pair of actors passing messages between each other. It's 2 
independent pairs, I thought. greet.tell is one pair? no actor and an 
actor. inbox.send is another pair: inbox actor exchanges a message with the 
greeter actor. If that is the case, then is the order undefined between the 
2 invocations?

Tal Pressman, earlier in the thread, says the message are sent from the 
same "context". Maybe I'm missing a context other than the pair of actors 
that applies to message ordering.

Kendall

On Wednesday, September 7, 2016 at 5:12:49 AM UTC-7, Patrik Nordwall wrote:
>
> I think the line that might cause confusion here is
>
> inbox.send(greeter, new Greet());
>
> The inbox can be seen as a "mediator" and therefore perceived as it might 
> not preserve ordering. For this reason I would prefer to write it as:
>
> greeter.tell(new Greet(), inbox.getRef());
>
> That is exactly how inbox.send is implemented, so the ordering is just 
> fine.
>
> Cheers,
> Patrik
>
> On Wed, Sep 7, 2016 at 10:58 AM, Guido Medina  > wrote:
>
>> In the introduction chapter of Akka this is explained in details, how 
>> Akka takes care of it,
>> I suggest you go there to learn the exact details:
>>
>>
>> http://doc.akka.io/docs/akka/2.4.10/general/message-delivery-reliability.html#Discussion__Message_Ordering
>>
>> HTH,
>>
>> Guido.
>>
>>
>>
>> On Tuesday, September 6, 2016 at 5:12:32 PM UTC+1, que...@gmail.com 
>> wrote:
>>>
>>> The order that they are received would be the critical thing, I would 
>>> think. So, is the example not dealing with the possibility that the 
>>> messages could be received out of order? Or, is this somehow taken care of?
>>>
>>> Kendall
>>>
>>> On Monday, September 5, 2016 at 2:40:34 AM UTC-7, Tal Pressman wrote:

 Hi,

 Message ordering is preserved between a sender-receiver pair. However, 
 this refers to the actual actual actor sending the message, regardless of 
 the ActorRef passed as the sender reference.
 In the example above, both messages are being sent from the same 
 context, and therefor should be sent in-order.

 Tal


 On Saturday, September 3, 2016 at 8:19:33 AM UTC+3, que...@gmail.com 
 wrote:
>
> I'm early in learning Akka. The hello-akka-java8 tutorial has 
> greeter.tell from no actor, followed by inbox.send:
>
> final ActorRef greeter = system.actorOf(Props.create(Greeter.class), 
> "greeter");
> final Inbox inbox = Inbox.create(system);
> greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());
> inbox.send(greeter, new Greet());
> Greeting greeting1 = (Greeting) inbox.receive(Duration.create(5, 
> TimeUnit.SECONDS));
>
> Can I expect that the greeter actor is going to process new 
> WhoToGreet("akka"), before new Greet()?
>
> If so, why?
>
> I read in Akka documentation:
>
> "*...for a given pair of actors, messages sent directly from the 
> first to the second will not be received out-of-order.* The word 
> *directly* emphasizes that this guarantee only applies when sending 
> with the telloperator to the final destination, not when employing 
> mediators or other message dissemination features (unless stated 
> otherwise)."
>
> I think the tutorial is not sending messages from one actor.
>
>
> -- 
>> >> 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 .
>> To post to this group, send email to akka...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/akka-user.
>> 

Re: [akka-user] Re: Are messages ordered in activator hello akka java8 tutorial?

2016-09-07 Thread Patrik Nordwall
I think the line that might cause confusion here is

inbox.send(greeter, new Greet());

The inbox can be seen as a "mediator" and therefore perceived as it might
not preserve ordering. For this reason I would prefer to write it as:

greeter.tell(new Greet(), inbox.getRef());

That is exactly how inbox.send is implemented, so the ordering is just fine.

Cheers,
Patrik

On Wed, Sep 7, 2016 at 10:58 AM, Guido Medina  wrote:

> In the introduction chapter of Akka this is explained in details, how Akka
> takes care of it,
> I suggest you go there to learn the exact details:
>
> http://doc.akka.io/docs/akka/2.4.10/general/message-
> delivery-reliability.html#Discussion__Message_Ordering
>
> HTH,
>
> Guido.
>
>
>
> On Tuesday, September 6, 2016 at 5:12:32 PM UTC+1, que...@gmail.com wrote:
>>
>> The order that they are received would be the critical thing, I would
>> think. So, is the example not dealing with the possibility that the
>> messages could be received out of order? Or, is this somehow taken care of?
>>
>> Kendall
>>
>> On Monday, September 5, 2016 at 2:40:34 AM UTC-7, Tal Pressman wrote:
>>>
>>> Hi,
>>>
>>> Message ordering is preserved between a sender-receiver pair. However,
>>> this refers to the actual actual actor sending the message, regardless of
>>> the ActorRef passed as the sender reference.
>>> In the example above, both messages are being sent from the same
>>> context, and therefor should be sent in-order.
>>>
>>> Tal
>>>
>>>
>>> On Saturday, September 3, 2016 at 8:19:33 AM UTC+3, que...@gmail.com
>>> wrote:

 I'm early in learning Akka. The hello-akka-java8 tutorial has
 greeter.tell from no actor, followed by inbox.send:

 final ActorRef greeter = system.actorOf(Props.create(Greeter.class),
 "greeter");
 final Inbox inbox = Inbox.create(system);
 greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());
 inbox.send(greeter, new Greet());
 Greeting greeting1 = (Greeting) inbox.receive(Duration.create(5,
 TimeUnit.SECONDS));

 Can I expect that the greeter actor is going to process new
 WhoToGreet("akka"), before new Greet()?

 If so, why?

 I read in Akka documentation:

 "*...for a given pair of actors, messages sent directly from the first
 to the second will not be received out-of-order.* The word *directly* 
 emphasizes
 that this guarantee only applies when sending with the telloperator to
 the final destination, not when employing mediators or other message
 dissemination features (unless stated otherwise)."

 I think the tutorial is not sending messages from one actor.


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



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  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.