Hi Brian,

If everything needed to continue processing the request will be in the
answer to the ID lookup, then you can pipe
<http://doc.akka.io/docs/akka/2.3.6/scala/futures.html#Use_With_Actors> the
future which you'll get while calling Reactive Couchbase APIs to the same
actor and continue request processing as a normal actor message.

Now if you need to merge the request data with the data from the database
before you can continue processing the request, you can either zip the
initial request with contents of the before mentioned future, or you can
use per-request actor
<http://techblog.net-a-porter.com/2013/12/ask-tell-and-per-request-actors/>
pattern to
handle the per-request state.

On Mon, Nov 10, 2014 at 9:39 AM, Brian Silberbauer <
brian.silberba...@gmail.com> wrote:

> Hi all
>
> I need help in designing an actor whose request needs to call a lookup on
> an ID before it can continue its request 'flow'. I was thinking the lookup
> could be done via another actor (against couchbase so it can be reactive),
> but I'm unsure how that call can be neatly returned into the original
> request 'flow'.  I could block and wait for the lookup to complete, or
> leave out the actor and make it a synchronous call or somehow weave it all
> together, but at this stage I don;t have the experience in akka to make
> that call.
>
> Any guidance would be helpful, thanks.
>
> Brian
>
>  --
> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to