Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-18 Thread Chanan Braunstein
Thanks! I was able to do something similar in Play/Java, finally got rid of that last Ask in my controller, only tells now. On Friday, October 17, 2014 10:44:04 AM UTC-4, rrodseth wrote: > > Sorry I don't have sample code I can share and I'm slammed right now, but > the per-request stuff is from

Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-17 Thread Richard Rodseth
Sorry I don't have sample code I can share and I'm slammed right now, but the per-request stuff is from the net-a-porter Activator template: http://typesafe.com/activator/template/spray-actor-per-request On Wed, Oct 15, 2014 at 4:35 AM, Chanan Braunstein < chanan.braunst...@pearson.com> wrote:

Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-15 Thread Chanan Braunstein
Hi Richard, Even after reading that blog post a while back, I always thought that you need that first Ask from Play into the Actor system. Reading your post and the blog post again I see that may have been mistaken. However I am still not sure how it is done. Do you have some sample code you wo

Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-11 Thread Roland Kuhn
Richard, thanks for sharing, this sounds exactly right. And there is indeed no way for child actors to be created other than by their parent (which is very much by design). Regards, Roland 9 okt 2014 kl. 17:38 skrev Richard Rodseth : > One thing I've done to preserve layering (and I'm new to

Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-09 Thread Richard Rodseth
One thing I've done to preserve layering (and I'm new to this so take it with a grain of salt) is the following: Per-request request handler actor sends a command to a service actor (not per-request), including a requestor reference (self) in the message. Service actor is free to pass the requesto

Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-09 Thread Martynas Mickevičius
Hello Prakhyat, have you seen this article which discusses ask vs tell patterns? I assume from the other thread, that you are using Java. To sum up the mentioned article, if you use Play framework for handling REST calls,

Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-09 Thread Martynas Mickevičius
Ahh, Richard beat me to it. :) On Thu, Oct 9, 2014 at 5:33 PM, Martynas Mickevičius < martynas.mickevic...@typesafe.com> wrote: > Hello Prakhyat, > > have you seen this article > > which discusses ask vs tell patterns? >

Re: [akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-09 Thread Richard Rodseth
I would recommend taking a look at the per-request pattern and using "tell" all the way. http://techblog.net-a-porter.com/2013/12/ask-tell-and-per-request-actors/ On Wed, Oct 8, 2014 at 11:57 PM, Prakhyat Mallikarjun wrote: > Team, > > We are working on a simple POC. The POC is developed on the

[akka-user] Using Tell or Ask with Akka Persistence and REST

2014-10-08 Thread Prakhyat Mallikarjun
Team, We are working on a simple POC. The POC is developed on the approach event sourcing/DDD/CQRS. The PersistentActors are shaded. PersistentViews are created to push events from write side towards query side. The business logic resides in PersistentActors. The rest API's are written to inv