Commit graph

148 commits

Author SHA1 Message Date
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
ac1ee9ae91 rework use of ClassLoaders, see #1736 2012-01-27 14:21:54 +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
Viktor Klang
1590438b0c Removing dead imports from akka-remote 2012-01-25 15:55:27 +01:00
Roland
34a0f005b1 Merge branch 'master' into wip-1581-patterns-ask 2012-01-20 19:29:17 +01:00
Roland
020c6b61da move all Ask stuff to akka.pattern
- remove ?(msg, timeout), should always use ?(msg)(timeout) because of
  Scala’s only Martin-acknowledged design flaw of being able to pass
  tuples into single-arg methods without adding another pair of parens
- put a provider into all actor refs, because they all are created by
  and associated with one
- treat all terminated refs equally: tell(msg) and return broken promise
2012-01-20 15:45:53 +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
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Roland
1daaee98aa Merge remote-tracking branch 'origin/master' into wip-1581-patterns-ask 2012-01-18 14:20:13 +01:00
Roland
00ec3f89dc move ask machinery from ActorRefProvider to pattern.AskSupport
- now everything is assembled in one spot
- also moved PromiseActorRef and AskTimeoutException from akka.actor
- plus a little boy-scouting
2012-01-18 11:53:45 +01:00
Roland
9c762dec20 polish “ask” pattern, see #1581
- move package objects into their respective package.scala file in the
  right directories
- make implicit conversion as well as explicit facility available under
  the same name akka.patterns.ask for easy import
- revert the logic to produce the Promise for the PromiseActorRef within
  the ActorRefProvider; supporting wrapping of external Promises does
  not seem to justify doing needless extra allocations in case of
  failure
- add scaladocs
- factor out “def provider” into trait ActorRefWithProvider, as it
  didn’t feel right attaching this information “by exception” to
  MinimalActorRef
2012-01-17 17:35:33 +01:00
Viktor Klang
bfd11ad8c5 Removing nodename 2012-01-17 15:25:26 +01:00
Patrik Nordwall
f01b9486aa Removed create-as and corresponding ActorRecipe. See #1511 2012-01-17 14:27:51 +01:00
Viktor Klang
5106fd6d4d Removing ClusterName 2012-01-17 11:40:26 +01:00
Roland
255a8c74e9 include actor system’s address in akkaSource log property, see #1621 2012-01-12 13:29:37 +01:00
Nikolay Botev
4270b6f71b ask 2.1 2012-01-01 22:23:10 -08:00
Nikolay Botev
a44da38e2b ask-2.0 2012-01-01 22:23:08 -08:00
Viktor Klang
5d2bd2492f Switching to using OrderedMemoryAware executor same for all of the remoting, added more remote config tests and switched to mem size conf 2011-12-30 12:04:20 +01:00
Roland
0ed6a67e08 Remote DeathWatch (2): make it work
- introduce EmptyLocalActorRef, which is returned for unsuccessful
  look-ups of local scope
- this fixes the problem that actors—after their death—can still be
  looked up without losing their identity; otherwise behave like
  DeadLetterActorRef
- adapt tests accordingly
- make DeathWatchSpec reusable and build remote test from it
- remove several unused imports of LocalActorRef
- use LocalRef/RemoteRef in pattern matches where applicable: these are
  marker traits for a ref’s scope; InternalActorRef mandates a scope as
  per its self-type
2011-12-29 16:27:32 +01:00
Roland
5e0ed18056 Remote DeathWatch (1): daemon communication 2011-12-26 18:23:55 +01:00
Jonas Bonér
a18206b81a Merge branch 'wip-remove-timeout-jboner' into master
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-14 22:46:43 +01:00
Viktor Klang
e959493e12 Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens 2011-12-14 17:36:39 +01:00
Jonas Bonér
04cd2adee9 Moved Timeout classes from akka.actor._ to akka.util._.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-14 17:34:56 +01:00
Roland
92e7693203 Merge remote-tracking branch 'origin/master' into wip-remote-supervision-rk 2011-12-13 16:59:43 +01:00
Roland
db7dd9450c re-enable the missing three multi-jvm tests
- mostly a matter of putting correct target.nodes URIs into configs and
  adding withRouting to Props
- ScatterGather test was wrong to assume equal distribution of replies
  from connections; it is random and only the sum should add up
2011-12-13 10:58:09 +01:00
Viktor Klang
bf01045779 Merged with current master 2011-12-13 10:18:15 +01:00
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
Viktor Klang
b32cbbc764 Renaming Block to Await, renaming sync to result, renaming on to ready, Await.ready and Await.result looks and reads well 2011-12-12 22:50:08 +01:00
Viktor Klang
2d418c188f Renaming completeWithResult to success, completeWithException to failure, adding tryComplete to signal whether the completion was made or not 2011-12-12 17:25:34 +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
Viktor Klang
de758c0cc1 Adding Blockable.sync to reduce usage of resultOrException.get 2011-12-11 01:29:46 +01:00
Viktor Klang
3b1330c6d7 Tests are green with new Futures, consider this a half-way-there marker 2011-12-11 00:40:52 +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
Jonas Bonér
4d649c3903 Removed all @author tags for Jonas Bonér since it has lost its meaning.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-09 18:44: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