- 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
- 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
- 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
- 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
* 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.
- 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 ...
- 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
- 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?
- 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
- 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)
- 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