Commit graph

36 commits

Author SHA1 Message Date
Patrik Nordwall
fd757fb680 Terminate remote deployed actors when parent node goes down, see #2551
* RemoteSystemDaemon listens to AddressTerminated and stops matching children
2012-09-25 15:08:08 +02:00
Patrik Nordwall
d6e5b0a46b Terminate remote-deployed actors when system shutdown, see #2552
* Termination hook mechanism in system guardian to be able to
  notify RemoteSystemDaemon and wait for it to terminate children
* Stopping the children will trigger ordinary death watch mechanism,
  in for example routers
* Note bug in RemoteSystemDaemon, watch of children was not done
  properly, which might have been a memory leak for remote deployed
  actors.
2012-09-25 14:12:04 +02:00
Roland
b60210362e make system.actorOf() non-blocking (and working), see #2031
- introducing RepointableActorRef, which starts out with an
  UnstartedActorCell which can cheaply be created; the Supervise()
  message will trigger child.activate() in the supervisor, which means
  that the actual creation (now with normal ActorCell) happens exactly
  in the right place and with the right semantics. Messages which were
  enqueued to the dummy cell are transferred atomically into the
  ActorCell (using normal .tell()), so message sends keep working
  exactly as they used to
- this enables getting rid of the brittle synchronization around
  RoutedActorRef by replacing that one with a RepointableActorRef
  subclass which creates RoutedActorCells upon activate(), with the nice
  benefit that there is no hurry then to get it right because the new
  cell is constructed “on the side”

misc fixes:

- InvalidMessageException is now actually enforced when trying to send
  “null”
- Mailboxes may be created without having an ActorCell, which can come
  in handy later, because the cell is only needed when this mailbox is
  going to be scheduled on some executor
- remove occurrences of Props(), which is equivalent to Props[Nothing],
  which is equivalent to «bug»
- add test case which verifies that context.actorOf is still synchronous
- plus all the stuff I have forgotten.
2012-06-13 17:57:56 +02:00
Viktor Klang
e3e391e5aa Removing DaemonMsgWatch, oh yeah baby. However, still no cigar 2012-05-29 14:14:06 +02:00
Viktor Klang
96f264e842 Initial stab at DeathWatch 2.0, tests don't pass just yet 2012-05-28 16:49:49 +02:00
Jonas Bonér
ae84ee0a57 Updated copyright to 2012 2012-05-21 16:45:15 +02:00
Roland
c699c3d32d include review comments
- rename NoScope -> NoScopeGiven
- add scaladoc for scopes
- add some return types
2012-02-03 09:43:23 +01:00
Roland
10974acfe8 make it possible to programmatically deploy (e.g. remotely), see #1644
- add Deploy to Props, which is used as the basis (overridden by
  configuration)
- utilize general mechanism .withFallback (introduced on Deploy,
  RouterConfig and Scope)
- actually pass Props over the wire when deploying remotely in order to
  retain settings (this was an oversight before)
- write tests for the new functionality
2012-02-01 15:19:51 +01:00
Roland
4fb0858e55 remote cleanup: include feedback from Viktor and Patrik
- re-label Client/Server to Inbound/Outbound for netty settings
  description
- move to just using exactly one class loader for all reflective
  activities of the ActorSystem, which is either the context class
  loader or the one which loaded the ActorSystem’s class; document that
  putting Akka on boot class path will not work
- be more careful with initializing the Client- and ServerBootstrap
- rename Port to DesiredPortFromConfig to discourage misuse
- write test for NettySettings
- various small fixes
2012-01-30 11:57:24 +01:00
Roland
c5fc153a10 rework system initialization, remove remote address from LocalActorRef
- move all creation of ActorRefs into the ActorRefProvider (deadLetters,
  locker)
- rootPath does not contain remote transport address any longer in order
  to start the LocalActorRefProvider before the RemoteTransport; the
  transport address is inserted during serialization only, which enables
  us later to have more than one transport available for one actor
  system (maybe even needed for clustering)
- fix inheritance between DeadLetterActorRef and EmptyLocalActorRef
- document some start-up dependencies by reordering constructor code
- fix remote tests which used self.path for identifying remote actors
  (since that no longer includes the remote transport address)
2012-01-27 12:14:28 +01:00
Roland
52d6e5625d Merge remote-tracking branch 'origin/master' into wip-1685-remote-cleaup-∂π 2012-01-26 11:24:23 +01:00
Roland
edceda8edf restructure remoting
- remove Remote, incorporate its few fields into RemoteActorRefProvider
- rename RemoteSupport to RemoteTransport to sync up with conf and
  the way we talk about it
- remove LocalAddress/RemoteAddress etc. and just have a final case
  class Address(protocol, system, host, port)
- split netty settings out or RemoteSettings into NettySettings
- split out from NettyRemoteSupport.scala: Server.scala, Client.scala,
  Settings.scala

plus a few fixes, including using the contextClassLoader when loading
the provider for ActorSystemImpl
2012-01-20 14:41:15 +01:00
Jonas Bonér
a857078907 Renamed RemoteDaemon.scala to Remote.scala.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-26 08:58:20 +02:00
Roland
c059d1bc11 Merge branch 'parental-supervision'
commented out one failing test in LoggingReceiveSpec (known, to be fixed
soon by implementing MainBusLogging)
2011-10-25 12:24:39 +02:00
Viktor Klang
e1a3c9dff5 #1059 - Removing ListenerManagement from RemoteSupport, publishing to AkkaApplication.eventHandler 2011-10-23 00:40:09 +02:00
Roland
d55f02e6c1 merge master into parental-supervision, fixing up resulting breakage 2011-10-21 15:11:43 +02:00
Jonas Bonér
10fc175c09 Removed reference to non-committed code 2011-10-20 15:40:05 +02:00
Jonas Bonér
303d34692d Merge branch 'master' of github.com:jboner/akka
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-20 15:11:34 +02:00
Roland
d3837b9fc3 Introduce parental supervision, BUT TESTS ARE STILL FAILING
- every actor is now supervised, where the root of the tree is
  app.guardian, which has its supervisor field set to a special ActorRef
  obtained from provider.theOneWhoWalksTheBubblesOfSpaceTime (this name
  is meant to indicate that this ref is outside of the universe, cf.
  Michio Kaku)
- changed all tests to obtain specially supervised children (i.e. not
  top-level) via (supervisor ? Props).as[ActorRef].get
- add private[akka] ScalaActorRef.sendSystemMessage for sending
  Supervise()
- everything routing or remote is broken wrt. supervision, as that was
  not “properly” implemented to begin with, will be tackled after
  app/supervision/eventbus/AkkaSpec are stabilized enough
2011-10-19 17:18:50 +02:00
Viktor Klang
77dc9e9c35 #1299 - Removing reply and tryReply, preparing the way for 'sender ! response' 2011-10-19 16:59:47 +02:00
Jonas Bonér
c8215dfd54 Added Gossip messages and management to remote protocol. Various refactorings and improvements of remoting layer.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-19 14:45:24 +02:00
Viktor Klang
01efcd7b50 Removing ActorCell.ref (use ActorCell.self instead), introducing Props.randomAddress which will use the toString of the uuid of the actor ref as address, bypassing deployer for actors with 'randomAddress' since it isn't possible to know what the address will be anyway, removing Address.validate since it serves no useful purpose, removing guard.withGuard in MessageDispatcher in favor of the less costly lock try-finally unlock strategy 2011-10-18 19:14:42 +02:00
Viktor Klang
474787a81d Renaming createActor to actorOf 2011-10-18 17:56:23 +02:00
Peter Vlugter
d4619b0863 Merge master into tame-globals branch 2011-10-13 18:15:09 +02:00
Peter Vlugter
d9e0088f3c Get remoting working under the remote actor ref provider 2011-10-13 18:08:09 +02:00
Viktor Klang
c5ed2a8f21 Making so that if the given address to a LocalActorRef is null or the empty string, it should use the toString of the uuid 2011-10-13 16:36:47 +02:00
Roland
9e8091459b rename application to app everywhere to make it consistent 2011-10-13 14:23:44 +02:00
Roland
85b7accfd4 make EventHandler non-global
- add Logging trait for nicer interface
- add EventHandlerLogging class for offering the nice interface from
  app.log
- add eventHandler instance to app and use that for all internal logging
  (this means that some places (dispatchers, remoting) were infiltrated
  by app just to do logging, but I think we'll need app in there soon
  enough for other reasons)
2011-10-13 13:21:59 +02:00
Roland
36ec202d94 rename AkkaConfig values to CamelCase 2011-10-12 11:35:45 +02:00
Roland
14751f7d29 make everything except tutorial-second compile
someone should look at remoting vs. timeout (i.e. which is sent around),
because I removed that in some places. It might simply be irrelevant
once we remove the Future special-casing.
2011-10-12 09:10:05 +02:00
Viktor Klang
69768dbc96 Removing the old Supervision-DSL and replacing it with a temporary one 2011-09-30 14:52:07 +02:00
Viktor Klang
8a876cc48a Switched the signature of Props(self => Receive) to Props(context => Receive) 2011-09-29 12:44:52 +02:00
Viktor Klang
a6f53d8605 Major rework of supervision and death watch, still not fully functioning 2011-09-28 14:19:59 +02:00
Jonas Bonér
00d3b87586 Merge branch 'remote-actorref-provider'
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-22 04:38:33 +02:00
Jonas Bonér
af49b99d6f Completed RemoteActorRefProvider and parsing/management of 'remote' section akka.conf, now does provisioning and local instantiation of remote actor on its home node. Also changed command line option 'akka.cluster.port' to 'akka.remote.port'.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-22 03:36:59 +02:00
Jonas Bonér
978cbe4437 Change the package name of all classes in remote module to 'akka.remote'.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-20 22:08:38 +02:00
Renamed from akka-remote/src/main/scala/akka/cluster/RemoteDaemon.scala (Browse further)