Commit graph

115 commits

Author SHA1 Message Date
Roland
d1a26a9e28 implement remote routers
- split out actual routing functionality into *Like traits to be
  reusable
- make RemoteRouterConfig which only differs in how remote placement is
  initiated
- teach RemoteDeployer how to convert local RouterConfig in case config
  key “target.nodes” is set
- IT WORKS! All tests GREEN
- oh, yeah, had to make ActorPath serializable ...
2011-12-13 01:29:05 +01:00
Roland
0a7e5fe296 wrap up local routing
- pull some more generic stuff out of the individual routers, add
  factories which take only target lists
- add router parsing to Deployer, removing everything which is not
  strictly related to local scope, which left only few things, so move
  them to Deployer.scala and delete DeploymentConfig
- fix ConfiguredLocalRoutingSpec to use the new configuration mechanism
  and verify that configuration overrides code
- fix DeployerSpec by using (mostly) correct lookup paths and removing
  everything which was not local
- change config file layout, removing everything which is not local from
  akka-actor/.../reference.conf, putting the remote stuff into the
  akka-remote/.../reference.conf (unused as of yet); adapt comments
  according to changed functionality
2011-12-12 23:34:52 +01:00
Roland
d8bc57dc17 Merge remote-tracking branch 'origin/1428-RoutedActorRef-henrikengstrom' into wip-remote-supervision-rk 2011-12-12 15:58:23 +01:00
Henrik Engstrom
192f84df71 Misc improvements of ActorRoutedRef. Implemented a scatterer gatherer router. Enabled router related tests. See #1440. 2011-12-12 15:06:40 +01:00
Roland
7f0275bca2 that was one hell of a FIXME
- fixed so that netty pipeline when generating addresses does not need
  to know the system name of the connecting client (which might differ
  from the local one, of course)
- this entailed differentiating between transport addresses and system
  addresses, which I took as an opportunity to separate everything out
  properly so that address schemas can easily be made pluggable
- made RemoteSupport generic in the address format it supports
- adapt netty stuff, and made everything else work with the most
  generic: ParsedTransportAddress
- did I mention that I statically separated unparsed from parsed
  addresses?
2011-12-11 20:00:26 +01:00
Roland
09aadcb60d incorporate review comments
- add two missing @volatiles
- add quite some comments
- refactor provider.actorOf to always take a path for the child, not
  only a name
2011-12-10 20:32:23 +01:00
Henrik Engstrom
fd7a041c09 merged 2011-12-10 12:58:34 +01:00
Henrik Engstrom
11450ca4e0 tmp 2011-12-10 10:53:38 +01:00
Roland
4f643eaa1b simplify structure of Deployer
- remove unused ActorDeployer trait
- put everything in one class with simple initialization structure and
  one protected method to override for adaptations
- adapt RemoteDeployer accordingly
- change “remote” key to directly contain the single remote address,
  since there is nothing else to configure
- adapt test cases accordingly
2011-12-09 20:19:59 +01:00
Roland
8540c70f18 require deployment actor paths to be relative to /user
- they still must start with “/” in the configuration file
- they will be looked up while deploying under /user and /remote, the
  latter being necessary to support fully transparent deployment (i.e.
  the path under /remote is shortened from the left to arrive at the
  logical ancestor which is just a child of /user on some node)
2011-12-09 18:15:14 +01:00
Roland
e773279138 fix remote-deployed zig-zag look-up
- looker on node A
- looker/child on node B
- looker/child/grandchild on node A
2011-12-09 18:07:42 +01:00
Roland
b84a35456d Merge remote-tracking branch 'origin/1428-RoutedActorRef-henrikengstrom' into wip-remote-supervision-rk 2011-12-09 15:13:35 +01:00
Roland
a20aad4a5b fix routing of remote messages bouncing nodes (there may be pathological cases ...)
- RemoteCommunicationSpec last test currently failing, lookup of
  deployment must be fixed to work zig-zag across nodes
- commit mainly to merge with Henrik’s router work and get the surface
  clean
2011-12-09 14:52:11 +01:00
Henrik Engstrom
90b6833978 Initial take on new routing implementation. Please note that this is work in progress! 2011-12-09 14:46:57 +01:00
Roland
e5bd8b5f88 make remote supervision and path continuation work
- add supervisor to remote USE message
- make remoteDaemon a VirtualPathContainer like
  LocalActorRefProvider.tempContainer (i.e. synchonous with CHM-based
  child lookup), scrap remoteDaemonSupervisor and rename remoteDaemon to
  “/remote” to match the plans in the docs
- comment out the remote deployment configuration section, to be done
  when Henrik is finished with RoutedActorRef work
- for now only “remote.nodes = ["sys@host:port"]” is looked at, i.e. if
  at least one is present, the first one is used to determine where to
  deploy the currently created child (routers will do the scaling-out
  component) [rest is commented out]
- multi-jvm tests not yet re-enabled (need to be adapted), but all other
  tests are GREEN (at least on my machine)
2011-12-09 00:02:27 +01:00
Roland
fac840adfc make remote lookup work
- create RemoteActorRef in actorFor
- simplify send/receive because Futures/Exceptions do not go over the
  wire anymore
- add RemoteCommunicationSpec which uses two ActorSystems communicating
  in the same JVM via TCP socket
2011-12-08 14:44:05 +01:00
Roland
25e23a3378 remove references to Remote* from akka-actor
- moved RemoteInterface.scala into akka-remote, not needed anymore since
  the plugin is loaded as ActorRefProvider now
- removed some old unused imports
- split out remote aspects from Deployer & DeployerSpec into
  RemoteDeployer & RemoteDeployerSpec (the latter in akka-remote)
- created a ticket for cleaning up the rest, mostly remove all
  occurrences of “remote” and “cluster” from akka-actor in this way

All of this was triggered by wanting to:
- change the signature of RemoteSupport.send to require a RemoteActorRef
  recipient
2011-12-07 16:31:29 +01:00
Roland
9a74bcafb3 remove residue in RemoteActorRefProvider 2011-12-07 13:55:48 +01:00
Roland
a0a44abe0d add and verify Java API for actorFor/ActorPath, fixes #1343 2011-12-07 11:42:44 +01:00
Roland
0b5f8b083d rename ActorPath.{pathElemens => elements} 2011-12-05 15:57:43 +01:00
Roland
eeca88d674 add test for “unorderly” shutdown of ActorSystem by PoisonPill
- uncovered nasty endless loop bug wrt. dead letters and a dead listener
- fixing that bug removed the MainBusReaper (sigh)
- also fix compilation of tutorial-first, but that REALLY needs to be
  changed not to create RoutedActorRef using new!
2011-12-05 15:18:22 +01:00
Roland
ea4d30e732 annotate my new FIXMEs with RK 2011-12-03 22:42:13 +01:00
Roland
79e5c5d0d1 implement coherent actorFor look-up
- look-up of all actor paths in the system, even “synthetic” ones like
  “/temp”
- look-up by full URI (akka://bla/...), absolute or relative path
- look-up by ActorPath
- look-up by path elements
- look-up relative to context where applicable, supporting ".."
- proper management of AskActorRef

Have a look at ActorLookupSpec to see what it can do.
2011-12-03 12:23:23 +01:00
Roland
a3e6fca530 rename RefInternals to InternalActorRef and restructure
- IAR is subclass of AR and SAR
- all concrete ARs implement IAR
- move sendSystemMessage to IAR

all in preparation for unifying the ActorPath look-up for local&remote
actor refs
2011-12-02 14:45:10 +01:00
Roland
e38cd19af9 Merge branch 'master' into wip-ActorPath-rk 2011-12-02 13:31:48 +01:00
Patrik Nordwall
fd82251501 Minor fixes from review comments. 2011-12-02 09:26:56 +01:00
Patrik Nordwall
82bbca43ab Merge branch 'master' into wip-1378-fixme-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala
	akka-remote/src/main/scala/akka/remote/netty/NettyRemoteSupport.scala
2011-12-02 09:03:03 +01:00
Viktor Klang
d626cc2455 Removing suspend and resume from user-facing API 2011-12-02 01:27:42 +01:00
Viktor Klang
879ea7c2b4 Removing startsWatching and stopsWatching from docs and removing cruft 2011-12-02 01:04:33 +01:00
Roland
6b9cdc5f65 fix ActorRef serialization
- represent it by SerializedActorRef(path), i.e. only a “tagged” string
- remove serialize/deserialize from ActorRefProvider interface
- adapt test since deadLetters is returned when nothing found instead of
  exception
- multi-jvm tests are still broken, but that is due to look-up of remote
  actors, which I have just not done yet
2011-12-01 14:31:02 +01:00
Roland
b65799c7f3 remove ActorRef.address & ActorRef.name
- address => path.toString
- name => path.name
- forward hashCode, equals and compareTo to path
- implement recursive efficient ActorPath.compareTo
- fix ActorPath.equals endless recursion
- remove wrong warning in ActorCell.systemInvoke.supervise()
2011-11-30 23:30:56 +01:00
Patrik Nordwall
80ac1737cd 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
2011-11-30 10:48:26 +01:00
Roland
afda539324 merge master into wip-ActorPath-rk 2011-11-29 21:52:18 +01:00
Roland
3182fa3d73 second step: remove LocalActorRefProvider.actors
- duplicate name detection done within ActorCell/ActorSystem (i.e. at
  parent level)
- no caching needed for local look-ups, might re-introduce cache in
  remote layer
- implement suitable equals/hashCode on ActorPaths
- fix some (unintended => buggy) name reuses which previously silently
  returned a different actor
- serialization & EventStreamSpec still failing, need to commit to merge
  in other stuff on which the future fixes will depend
2011-11-29 16:32:50 +01:00
viktorklang
e33b9569f2 Merge pull request #123 from jboner/wip-extensions
Reinterpretation of Extensions
2011-11-25 02:26:00 -08:00
Jonas Bonér
0a1740cd6d Merge branch 'master' of github.com:jboner/akka
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-11-24 21:05:41 +01:00
Viktor Klang
bf20f3fa44 Reinterpretation of Extensions 2011-11-24 18:53:18 +01:00
Roland
dad1c98c48 first step: sanitize ActorPath interface
- remove references to ActorSystem
- make ChildActorPath light-weight (name & parent plus tailrec methods
  for traversing towards root, e.g. toString)
- string rep is full URI always (akka://system-name@host:port/user/bla)
2011-11-24 17:22:53 +01:00
Jonas Bonér
ef6c8370cd Added BroadcastRouter which broadcasts all messages to all the connections it manages, also added tests.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-11-24 16:35:37 +01:00
Patrik Nordwall
179399296e Modularize configuration. See #1361
* Split config reference to one for each module/extension.
* Adjusted signature of registerExtension to avoid race of extension init
* Moved Duration.dilated to testkit
* TestKitExtension
* RemoteExtension
* SerializationExtension
* Durable mailboxes extensions
* Fixed broken serialization bindings and added test
* Updated configuration documentation
* System properties akka.remote.hostname akka.remote.port replaced with akka.remote.server.hostname and akka.remote.server.port
* Adjustments of ActorSystem initialization. Still don't like the two-phase constructor/init flow. Very fragile for changes.

Review fixes. SerializationExtension
2011-11-23 20:31:58 +01:00
Viktor Klang
c56341b3a6 Fixing FIXME to rename isShutdown to isTerminated 2011-11-23 19:03:56 +01:00
Roland
6a8e516b6c change source tag in log events from AnyRef to String
- ensure that no “complex” things are attached to a LogEvent (think
  serialization)
- ensure no escaping the “this” reference via LoggingBus during
  constructors (e.g. ActorSystem)
- change it so that
    + Actor/ActorRef are represented by their address
    + Class[_] by simpleName
    + String by itself
- this means that people need to think a little more while deciding how
  “this” should look like in logging (which I think is a good thing)
2011-11-18 12:24:04 +01:00
Viktor Klang
d63c511401 #1351 - Making sure that the remoting is shut down when the ActorSystem is shut down 2011-11-18 11:16:23 +01:00
Roland
62032cb1ff merge system-cleanup into master 2011-11-17 14:38:49 +01:00
Roland
d381b72061 rename app: ActorSystem to system everywhere 2011-11-17 12:36:35 +01:00
Roland
c31695bef4 rename AkkaConfig to Settings 2011-11-17 12:11:55 +01:00
Roland
2b6d9ca6bd rename ActorSystem.root to rootPath 2011-11-17 10:54:17 +01:00
Roland
648661c548 clean up initialization of ActorSystem, fixes #1050
- create ActorSystemImpl trait to make ActorSystem fully abstract
- add Java API for constructing (ActorSystem.create(...))
- only go through factory methods because .start() has become necessary
- rename all user-facing occurrences of “app” to “system” (Actor trait
  and TestKit/AkkaSpec)
- pass ActorSystemImpl to ActorRefs upon creation, which means that
  actorOf() and friends need such an argument, which must be provided to
  the ActorRefProvider by the ActorRefFactory implementation
2011-11-16 17:18:36 +01:00
Viktor Klang
18bfa26272 Renaming startsMonitoring/stopsMonitoring to startsWatching and stopsWatching 2011-11-16 16:46:16 +01:00
Roland
3c61e593f2 remove app argument from Deployer 2011-11-14 18:18:08 +01:00