At least some of this code is necessarily in Scala as Spray does not support Java. You could likely get some of this working (or something approximating it) with the new akka-http module, but it does not yet have an equivalent for spray-routing, so you would have to manually handle the route construction.
--
Thomas Lockney
tho...@lockney.net
http://about.me/tlockney
--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
I was looking to know how to write an actor per request. I want to understand this pattern so I could create a sample similar to the one at https://github.com/muuki88/activator-play-cluster-sample that creates a frontend for an akka cluster in Java.I'm struggling with how to have a frontend actor send a send a message to an akka cluster. At this point hearing how this would be implemented would be great so I could write this in simple form even using a basic Java console application just to understand the basics of to have a frontend send a message to an akka cluster.
Thanks,John
On Sunday, July 20, 2014 12:20:45 PM UTC-4, Konrad Malawski wrote:Hello John,I don't think there is an equivalent repo to this out there...Although I assume you've seem this post http://techblog.net-a-porter.com/2013/12/ask-tell-and-per-request-actors/ where this code sample originates from?The concepts are pretty generic, and I would recommend checking out the concepts if you have not yet already.Is there a specific question you'd like to see answered here?--Konrad `ktoso` MalawskihAkker @ Typesafe
--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
My question is this.- In a front end actor is the sending of a message as simple as attaining a reference (in frontend actor onreceive) to the backend actor via an ActorRef and then sending a message to the backend actor?
// Here a reference to the backend actor is createdActorRef backend = getContext().actorOf(FromConfig.getInstance().props(),"factorialBackendRouter");
@Context ActorSystem actorSystem;LoggingAdapter log;@POST@Path("/post")@Consumes(MediaType.APPLICATION_JSON)@Produces(MediaType.APPLICATION_JSON)public Response save(LogMessage message){ActorSelection selection = actorSystem.actorSelection("akka://ExampleSystem/user/frontend");selection.tell(new LogMessage(message.getTitle()), ActorRef.noSender());String result = "done " + message;return Response.status(201).entity(result).build();}