On Jan 19, 2014, at 5:16 PM, Konrad Malawski <[email protected]> 
wrote:
>> [cut] EventualActorRef which will eventually resolve to the result of the 
>> computation, whether immediate or remote.  I then wish to be able to call ! 
>> on the eventualRef and do promise pipelining.  
> 
> Have you seen the ask pattern (assuming you may have not yet, you mentioned 
> you want to learn akka)?
> http://doc.akka.io/docs/akka/snapshot/scala/actors.html#ask-send-and-receive-future
> 
> Ask returns a future, you can work with.
> 
> val f: Future[Any] = sender ? "how are you today?"
> What you describe sounds very much like ask to me.
> 
> If it’s different, could you explain what the difference is you want to 
> achieve?
> 
Yes, there is a difference, from what I understood.  With the ask/pipeTo one 
must await the result before piping the result or calling another ask on the 
result.  I am wanting Elib-style promise-pipelining.

In Elib-style promise-pipelining, the result of the ask would be an Elib 
promise, which would be an unresolved ActorRef (eventual ref).  One could send 
a subsequent ask to the unresolved ref and get another unresolved Elib-style 
promise ref for the "second stage" future. 

The interesting thing about this change in semantics is the second ask, to the 
first promiseRef, is the 2nd ask gets forwarded to the site of computation of 
the first ask, before it resolves.  When it does resolve, the 2nd ask is sent 
locally and immediately.  This saves network hops and manages computational 
latency of sending.

>> PS.  how were you able to quote a code section like you did?
> 
> The solarized pasted snippet? I’m using “markdown here”, a chrome plugin: 
> https://chrome.google.com/webstore/detail/markdown-here/elifhakcjgalahccnjkneoccemfahfoa?hl=en
> 

No iPhone support yet.  Nice to have!


Thank you,
Robert

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      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/groups/opt_out.

Reply via email to