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

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

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

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

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

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

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

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

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

2016-09-07 Thread Guido Medina
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

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

2016-09-07 Thread Tal Pressman
Hi, In the sample both messages are sent from the same context to the same receiver, so they will be received in-order. Tal On Tuesday, September 6, 2016 at 7:12:32 PM UTC+3, que...@gmail.com wrote: > > The order that they are received would be the critical thing, I would > think. So, is the

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

2016-09-06 Thread queshaw
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: >

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

2016-09-05 Thread Tal Pressman
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