Let my try again ;-) only to exercise my neuron on simplicity

An easy option, but I guess you discarded it, plain Java + jars:

- Add Akka libs to your storm application
- Create an actor system
- Communicate with the remote actor system and get actor ref
- Send message to actor ref

A simple option, plain Java here:

- On Akka system, add an actor that listen from a TCP port (or anything you
choose)
- Read and deserialize message from that source (in the protocol you want
to use; I would use a simple JSON with the name/address of the target
actor, and the message)
- Send the message to the corresponding actor

At Storm

- Add a bolt that connects to that remote port
- Serialize and send message to that port

A not so simple option, plain Java, only add code to Storm, but more work:

- Akka untouched
- Write all the Akka required protocol to send the message to an actor on
Storm application

Roger Alsing was writing something alike from C#, check the list and his
repo
https://github.com/rogeralsing/Pigeon

Other options?

Maybe there is a Java library to send message to Akka (withoud adding the
Akka library). Or maybe, it is time to have one ;-)

Angel "Java" Lopez
@ajlopez


On Wed, Feb 5, 2014 at 6:42 AM, Kaizah Kaiser <[email protected]> wrote:

> Okay, so what I am trying to do is have some computations run in Storm and
> then disclose the results to the outside world through a Play streaming
> application that deals with broadcasting to clients and all that.
>
> Currently I have a solution with a queue in between, I stream data into
> Kestrel and next read from it and broadcast to listeners using Finagle. I
> have some problems with this implementation that I will not elaborate upon,
> but I want to get rid of it.
>
> I now built a Play application to take over the Finagle part, and now I
> need to get data from Storm into it. My Play application already uses Akka
> everwywhere so I figured just sending messages over Akka from Storm would
> be a very neat minimal way  to go. As such, I do need to have a Bolt doing
> this, not a Spout. I tried working this out but unfortunately I ran into
> unserializility of actor systems on the side of Storm. After that, I tried
> to create the actor system on the Nimbus (where I create the topology),
> find the ActorRef and just pass that on, but if I do that I get the error
> that no actor system is in scope so again it doesn't work. In addition, it
> seems that I can actually do something, but I'd have to write a Kryo
> (serialization API used by Storm) serializer for Akka, but that kind of
> eliminates my idea of having a neat minimal setup.
>
> So, once again: is there any way for me to (easily) send messages from
> Storm to an external Akka application through remoting (without any
> intermediate systems - like queues - in between)?
>
> Op zondag 2 februari 2014 14:25:39 UTC+1 schreef ajlopez:
>>
>> "bad" English
>>
>> First idea: use a queue for communication. Don't tell the actor, make the
>> bolt send a message to a queue
>>
>> Unless you need explicit actor reference in your use case (somethink
>> like, "yes, this message/task SHOULD BE processed by Tommy Actor, no other
>> one can do it". But usually, it is not the case.
>>
>>
>> On Sun, Feb 2, 2014 at 9:04 AM, Kaizah Kaiser <[email protected]> wrote:
>>
>>> What I am actually trying to do is to have a Storm (
>>> http://storm-project.net/) cluster talk to a remote Play/Akka web
>>> application. The Play application uses actors for async communication and
>>> now I want to communicate with it from a bolt Storm. Bolts in Storm
>>> however, must be serializable whereas actor systems are not.
>>>
>>> Op vrijdag 31 januari 2014 18:54:59 UTC+1 schreef √:
>>>>
>>>> Hi Kaizah,
>>>>
>>>> On Fri, Jan 31, 2014 at 5:05 PM, Kaizah Kaiser <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I currently have one project that uses Akka 2.2.3 and actors to do
>>>>> stuff in their own actor system (call it server). I now want to make
>>>>> another application (call it client) that communicates with this
>>>>> application _but_ it uses serialization all over the place (this is a hard
>>>>> requirement). The way I usually would do this is by creating an actor
>>>>> system on my client as well and let it retrieve an actorRef for the actor 
>>>>> I
>>>>> am trying to reach on server. For this to be possible, I use
>>>>> actorSelection, something that I can only do within an actor system (or am
>>>>> I wrong here?). This however forces me to create an actor system on the
>>>>> client, but actor systems cannot be serialized so I have an issue.
>>>>>
>>>>> I was wondering if there is any way for me to obtain an actorRef of my
>>>>> 'client' without setting up an actor system in it?
>>>>>
>>>>
>>>> I don't udnerstand why you'd have to serialize the actor selection.
>>>> You'll need to run an ActorSystem in the client if you want to connect
>>>> to the server.
>>>>
>>>>
>>>>>
>>>>>  --
>>>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>> >>>>>>>>>> Search the archives: https://groups.google.com/grou
>>>>> p/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.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> √
>>>>
>>>> * ——————— **Viktor Klang*
>>>> *Chief Architect - **Typesafe <http://www.typesafe.com/>*
>>>>
>>>>  Twitter: @viktorklang
>>>>
>>>  --
>>> >>>>>>>>>> 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.
>>>
>>
>>  --
> >>>>>>>>>> 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.
>

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