Hi John,


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?
>

Yes, once you have the ActorRef of an actor you can send a message to it:

  ref ! msg

... and it looks like the same whether "ref" is remote or not (although you
need to enable remoting to be able to communicate with remote actors, but
that does not change the way you send messages).

-Endre


>
> Thanks,
>
> John
>
> On Tuesday, July 22, 2014 4:16:09 AM UTC-4, Akka Team wrote:
>
>> Hi John,
>>
>> 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.
>>>
>>
>> We need a bit more information about what you want to achieve. Sending a
>> message from an actor to another actor (irregardless whether it is in a
>> cluster or not) is just like an ordinary message send. Is your problem how
>> to aquire remote ActorRefs from the cluster?
>>
>> Btw, you can have your frontend be part of the cluster and use simply a
>> cluster-aware router if you have a worker pool for example. You can use
>> cluster sharding if you need persistent stateful entities maintained in the
>> cluster. There are many ways to interact with clustered actor systems. In
>> fact, all that core clustering does is maintaining membership information,
>> all the others are just patterns on top of this, using remoting to send
>> messages to remote actors.
>>
>> You can look at the list of activator templates, maybe you find something
>> that fits your need: http://akka.io/downloads/
>> In particular http://typesafe.com/activator/template/akka-distributed-
>> workers-java?_ga=1.42689506.61833477.1364484269 might be interesting for
>> you.
>>
>> -Endre
>>
>>
>>>
>>> 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-por
>>>> ter.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` Malawski
>>>> hAkker @ 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 [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/d/optout.
>>>
>>
>>
>>
>> --
>> Akka Team
>> Typesafe - The software stack for applications that scale
>> Blog: letitcrash.com
>> Twitter: @akkateam
>>
>  --
> >>>>>>>>>> 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 [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/d/optout.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      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 [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/d/optout.

Reply via email to