remote-actors

How can I identify a remote actor?

I have a remote actor (client) which is registering with another remote actor (server) and then later deregistering (with a shutdown hook). However, although the server picks up the de-registration, the actual sender property is a different Channel object; so in my server logs I have: Registered new client [scala.actors.Channel@158e2...

What does the remote-actor framework do if trying to write to a client which is no longer there?

I have a server which is using the remote actors framework to communicate with multiple clients. As mentioned in this question, I am having trouble keeping track of when a client disappears. Hence my server is still attempting to send messages to non-existent clients. Is this a problem? (I don't see any exceptions being thrown - but I ...

How is Scala "filling in" missing arguments to a case class?

When I call: actor_ ! Exit How is this being converted into a construction of: case class Exit(from: AbstractActor, reason: AnyRef) In particular, how is it that when I call this from a remote (client) actor which has been linked to a remote (server) actor, that the server receives an instance of Exit where the from property is an ...

a scala remote actor exception

hi all i with a scala code like this for echo service. import scala.actors.Actor import scala.actors.Actor._ import scala.actors.remote.RemoteActor._ class Echo extends Actor { def act() { alive(9010) register('myName, self) loop { react { case msg => println(msg) } } } ...

RemoteActor unregister actor

I'm playing with RemoteActors. Now I wonder, what happens if I shut down an RemoteActor. The actor was made available with RemoteActor.alive and RemoteActor.register. I can't find the inverse of either of both: alive and register. How do I properly shut down an RemoteActor? Update To make it more obvious, I made a 'small' example. Ne...

RemoteActor.select - result deterministic?

I wonder if there is any determinism when calling val delegate = RemoteActor.select(). I'm asking this, because I noticed that the program doesn't terminate, when I'm sending delegates over the net. Are there any other side effects, which depend on the delegate? Are there any rules, when RemoteActor.select will return the same delega...

Scala Remote Actors - Pitfalls

While writing Scala RemoteActor code, I noticed some pitfalls: RemoteActor.classLoader = getClass().getClassLoader() has to be set in order to avoid "java.lang.ClassNotFoundException" link doesn't always work due to "a race condition for which a NetKernel (the facility responsible for forwarding messages remotely) that backs a remote ...

Why is setting the classloader necessary with Scala RemoteActors?

When using Scala RemoteActors I was getting a ClassNotFoundException that referred to scala.actors.remote.NetKernel. I copied someone else's example and added RemoteActor.classLoader = getClass.getClassLoader to my Actor and now everything works. Why is this necessary? ...

How to terminate Scala Remote Actor client?

Hi. I'm playing with Remote Actors but I'm facing some difficulties. Consider this server: object Server { def main(args: Array[String]) { val server = new Server server.start } } class Server extends Actor { RemoteActor.alive(12345) RemoteActor.register('server, this) def act() { while(tr...