Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread √iktor Ҡlang
t the quoted code should work? >> >> >> >>> >>> -- >>> Konrad Malawski >>> geecon.org / java.pl / krakowscala.pl / gdgkrakow.pl >>> >>> From: √iktor Ҡlang viktor...@gmail.com >>> Reply: akka...@googlegroups.com akka...@goo

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread glidester
;>>> he ! "hi" >>>> >>>> // then >>>> expectMsg("hi!") >>>> } >>>> >>>> There's a nice post from Helena Edelson explaining problems explaining >>>> it a bit more: http://h

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread √iktor Ҡlang
a.pl / krakowscala.pl / gdgkrakow.pl > > From: √iktor Ҡlang viktor.kl...@gmail.com > Reply: akka-user@googlegroups.com akka-user@googlegroups.com > Date: 21 March 2014 at 16:29:12 > To: Akka User List akka-user@googlegroups.com > Cc: glidester glides...@gmail.com > > Subject

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread Konrad Malawski
ooglegroups.com Date: 21 March 2014 at 16:29:12 To: Akka User List akka-user@googlegroups.com Cc: glidester glides...@gmail.com Subject:  Re: [akka-user] Chaining actor ask calls How is that possible, that code was commented out? On Fri, Mar 21, 2014 at 5:22 PM, glidester wrote: Yes that was i

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread √iktor Ҡlang
s error "not as easy to make", with >> Scala's "spores", but that's not here yet… >> >> I hope this helps, cheers! >> >> >> -- >> Konrad Malawski >> geecon.org / java.pl / krakowscala.pl / gdgkrakow.pl >> >> From

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread glidester
r "not as easy to make", with Scala's > "spores", but that's not here yet… > > I hope this helps, cheers! > > > -- > Konrad Malawski > geecon.org / java.pl / krakowscala.pl / gdgkrakow.pl > > From: glidester glid...@gmail.com > Reply:

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread Konrad Malawski
s => val replyTo = sender() val fb = b ? (s + "!") fb map { bResponse => // this runs when the b actor replies - thus, completing the `fb` future replyTo ! bResponse // this completes the `fa` future } } })) val fa: Future[

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread √iktor Ҡlang
t;> val replyTo = sender() >> >> val fb = b ? (s + "!") >> fb map { bResponse => >> // this runs when the b actor replies - thus, completing the `fb` >> future >> replyTo ! bResponse // this completes the `f

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread glidester
s the `fa` future > } > } > })) > > val fa: Future[Any] = a ? "wat" // this future will be completed by the `a` > actor replying to the "wat" message > > > -- > Konrad Malawski > geecon.org / java.pl / krakowscala.pl / gd

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread Konrad Malawski
ka-user@googlegroups.com Date: 21 March 2014 at 11:49:05 To: akka-user@googlegroups.com akka-user@googlegroups.com Subject:  [akka-user] Chaining actor ask calls Hi, I'm in the process of learning Akka and I wondered if anyone could clarify something for me. If I have 2 actors. I 'a

Re: [akka-user] Chaining actor ask calls

2014-03-21 Thread √iktor Ҡlang
My rule of thumb is: if you don't know why tell wouldn't work, don't use ask. :) On Mar 21, 2014 12:50 PM, "glidester" wrote: > Hi, > > I'm in the process of learning Akka and I wondered if anyone could clarify > something for me. > > If I have 2 actors. I 'ask' Actor A which in turn 'asks' Actor

[akka-user] Chaining actor ask calls

2014-03-21 Thread glidester
Hi, I'm in the process of learning Akka and I wondered if anyone could clarify something for me. If I have 2 actors. I 'ask' Actor A which in turn 'asks' Actor B. This means I get returned a Future from ActorB wrapped in a Future from Actor A (correct?) Is this good practice? Should I be usin