Watching remote actors

51 views
Skip to first unread message

Joa Ebert

unread,
Feb 10, 2012, 9:22:06 AM2/10/12
to akka...@googlegroups.com
Hey,

I have a question regarding remote actors and how I am supposed to handle the following case:
I have two JVMs A and B. A contains ref to an actor running in B. I try watching the ref using
context.watch(actorFromB) in an Actor that runs inside A.

However I am not getting any messages about failure when I kill B besides that an exception 
occurrs once I try start sending messages to the dead actor.

What am I doing wrong? Ideally I want to be able to react on the failure, and/or have messages
to the target actor being delivered with a specified retry/timeout just like the supervision strategies.


Best,

Joa

√iktor Ҡlang

unread,
Feb 10, 2012, 9:29:33 AM2/10/12
to akka...@googlegroups.com
Hey Joa,

this is currently not implemented, and will be a big part of what is
2.1 (clustering etc).
The problem is to decide when something is down permanently, and how
to react if the "failed" node can communicate with other nodes. You
essentially need some sort of gossip protocol that informs all nodes
on which nodes are considered alive or not. It's a well-known tricky
thing.

Cheers,

> --
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/akka-user/-/Y0wCqB3K6TAJ.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to
> akka-user+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/akka-user?hl=en.

--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: @viktorklang

Joa Ebert

unread,
Feb 10, 2012, 9:35:19 AM2/10/12
to akka...@googlegroups.com
Hi Victor,

thanks for the fast answer. Of course it is not trivial.
That is why I was hoping Akka already solves this for me ;)


Cheers,

Joa

√iktor Ҡlang

unread,
Feb 10, 2012, 9:37:09 AM2/10/12
to akka...@googlegroups.com
Hi Joa,

Akka will solve that, but you'll have to hold out a tad bit longer.

In the meantime you can read the cluster spec:
http://akka.io/docs/akka/2.0-M4/cluster/cluster.html

Cheers!

> --
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/akka-user/-/YBRQELoc9KcJ.

Reply all
Reply to author
Forward
0 new messages