Commit graph

20 commits

Author SHA1 Message Date
Roland
ef0af0b47f document RemoteRouterConfig, see #1846
- fix Java API
- change to pass in Addresses so that validation happens earlier
2012-02-21 15:37:51 +01:00
Roland
dca309c535 incorporate Patrik’s feedback
- rename to DynamicAccess
- rename to createInstanceFor / createClassFor
- fix a few little things
2012-02-10 11:36:23 +01:00
Roland
2ce47d6bb5 Bye-bye ReflectiveAccess, introducing PropertyMaster, see #1750
- PropertyMaster is the only place in Akka which calls
  ClassLoader.getClass (apart from kernel, which might be special)
- all PropertyMaster methods (there are only three) take a ClassManifest
  of what is to be constructed, and they verify that the obtained object
  is actually compatible with the required type

Other stuff:
- noticed that I had forgotten to change to ExtendedActorSystem when
  constructing Extensions by ExtensionKey (damn you, reflection!)
- moved Serializer.currentSystem into JavaSerializer, because that’s the
  only one needing it (it’s only used in readResolve() methods)
- Serializers are constructed now with one-arg constructor taking
  ExtendedActorSystem (if that exists, otherwise no-arg as before), to
  allow JavaSerializer to do its magic; possibly necessary for others as
  well
- Removed all Option[ClassLoader] signatures
- made it so that the ActorSystem will try context class loader, then
  the class loader which loaded the class actually calling into
  ActorSystem.apply, then the loader which loaded ActorSystemImpl
- for the second of the above I added a (reflectively accessed hopefully
  safe) facility for getting caller Class[_] objects by using
  sun.reflect.Reflection; this is optional an defaults to None, e.g. on
  Android, which means that getting the caller’s classloader is done on
  a best effort basis (there’s nothing we can do because a StackTrace
  does not contain actual Class[_] objects).
- refactored DurableMailbox to contain the owner val and use that
  instead of declaring that in all subclasses
2012-02-09 11:56:43 +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
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
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Patrik Nordwall
d6708184c6 Minor improvements based on feedback. See #1606 2012-01-17 14:48:46 +01:00
Patrik Nordwall
e7a0247c0d Handle remote routers transparently. See #1606
* RemoteRouterConfig wrapper with RemoteRouteeProvider instead if fixed remote routers.
* Had to refactor and introduce RouteeProvider for different implementations of how to create routees.
* Works with Resizer also.
* Added some tests.
2012-01-17 09:11:45 +01:00
Patrik Nordwall
6a12fb7876 Implemented SmallestMailboxRouter. See #1619 2012-01-11 14:06:47 +01:00
Patrik Nordwall
19845d93e8 Improvements and finalization of dynamically resizable routers, replaces ActorPool. See 1557
* resize on nth message instead of always each message
* improved pressure evaluation
* more tests
* documentation
* removed ActorPool
2012-01-10 15:53:27 +01:00
Henrik Engstrom
dac0beb01b Updates based on feedback - use of abstract member variables specific to the router type. See #1529 2011-12-21 10:03:26 +01:00
Henrik Engstrom
0dc161c800 Initial take on removing hardcoded value from SGFCR. See #1529 2011-12-20 19:57:42 +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
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
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
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
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