First walk throught of FIXME. See #1378

* Fixed obvious
* Created tickets for several, #1408, #1409, #1410, #1412, #1415, 1416, #1418
* Moved LoggingReceive from akka.actor to akka.event
* Touched several of the FIXME to make them visible in code review
This commit is contained in:
Patrik Nordwall 2011-11-30 10:20:57 +01:00
parent af3a7101da
commit 80ac1737cd
28 changed files with 146 additions and 129 deletions

View file

@ -47,10 +47,9 @@ class Remote(val system: ActorSystemImpl, val nodename: String) {
val remoteDaemonServiceName = "akka-system-remote-daemon".intern
// FIXME configure computeGridDispatcher to what?
val computeGridDispatcher = dispatcherFactory.newDispatcher("akka:compute-grid").build
val computeGridDispatcher = dispatcherFactory.fromConfig("akka.remote.compute-grid-dispatcher")
// FIXME it is probably better to create another supervisor for handling the children created by handle_*
// FIXME it is probably better to create another supervisor for handling the children created by handle_*, ticket #1408
private[remote] lazy val remoteDaemonSupervisor = system.actorOf(Props(
OneForOneStrategy(List(classOf[Exception]), None, None)), "akka-system-remote-supervisor") // is infinite restart what we want?
@ -73,13 +72,11 @@ class Remote(val system: ActorSystemImpl, val nodename: String) {
lazy val server: RemoteSupport = {
val remote = new akka.remote.netty.NettyRemoteSupport(system)
remote.start() //TODO FIXME Any application loader here?
remote.start() //TODO Any application loader here?
system.eventStream.subscribe(eventStream.sender, classOf[RemoteLifeCycleEvent])
system.eventStream.subscribe(remoteClientLifeCycleHandler, classOf[RemoteLifeCycleEvent])
// TODO actually register this provider in system in remote mode
//provider.register(ActorRefProvider.RemoteProvider, new RemoteActorRefProvider)
remote
}
@ -157,9 +154,9 @@ class RemoteSystemDaemon(remote: Remote) extends Actor {
sender ! Success(remoteAddress)
} catch {
case error: Throwable //FIXME doesn't seem sensible
sender ! Failure(error)
throw error
case exc: Exception
sender ! Failure(exc)
throw exc
}
}
@ -192,7 +189,7 @@ class RemoteSystemDaemon(remote: Remote) extends Actor {
def tempName = "$_" + Helpers.base64(tempNumber.getAndIncrement())
def tempPath = remoteDaemon.path / tempName
// FIXME: handle real remote supervision
// FIXME: handle real remote supervision, ticket #1408
def handle_fun0_unit(message: RemoteSystemDaemonMessageProtocol) {
new LocalActorRef(systemImpl,
Props(
@ -201,7 +198,7 @@ class RemoteSystemDaemon(remote: Remote) extends Actor {
}).copy(dispatcher = computeGridDispatcher), remoteDaemon, tempPath, systemService = true) ! payloadFor(message, classOf[Function0[Unit]])
}
// FIXME: handle real remote supervision
// FIXME: handle real remote supervision, ticket #1408
def handle_fun0_any(message: RemoteSystemDaemonMessageProtocol) {
new LocalActorRef(systemImpl,
Props(
@ -210,7 +207,7 @@ class RemoteSystemDaemon(remote: Remote) extends Actor {
}).copy(dispatcher = computeGridDispatcher), remoteDaemon, tempPath, systemService = true) forward payloadFor(message, classOf[Function0[Any]])
}
// FIXME: handle real remote supervision
// FIXME: handle real remote supervision, ticket #1408
def handle_fun1_arg_unit(message: RemoteSystemDaemonMessageProtocol) {
new LocalActorRef(systemImpl,
Props(
@ -219,7 +216,7 @@ class RemoteSystemDaemon(remote: Remote) extends Actor {
}).copy(dispatcher = computeGridDispatcher), remoteDaemon, tempPath, systemService = true) ! payloadFor(message, classOf[Tuple2[Function1[Any, Unit], Any]])
}
// FIXME: handle real remote supervision
// FIXME: handle real remote supervision, ticket #1408
def handle_fun1_arg_any(message: RemoteSystemDaemonMessageProtocol) {
new LocalActorRef(systemImpl,
Props(