- 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.
- replace TreeMap with custom ChildrenContainer, which has three
implementations: empty, normal and “terminating” (i.e. waiting for
some child to terminate)
- split recreate() in the same way as terminate(), so that there is a
phase during which the suspended actor waits for termination of all
children which were stopped in preRestart
- do not null out “actor” in ActorCell during restart, because we do
need the supervisionStrategy and nulling it out does not buy us much
in this case anyway
- provide new ActorContext.suspendForChildTermination(), which enters
limbo for as long there are outstanding termination requests; this
enables code which is very similar to previously (half-working) setups
with “synchronous” context.stop(child)
docs are still missing, plus a little polishing here and there; oh, and
before I forget: ActorCell NOW is 64 bytes again ;-)
* ActorTimeout (akka.actor.timeout) was used to all sorts of things.
* TestKit default-timeout
* TypedActor timeout for non void methods
* Transactor coordinated-timeout
* ZeroMQ new-socket-timeout
* And in various tests
- 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
- replace ActorRef.stop() by ActorRefFactory.stop(child) everywhere
- ActorCell “optimizes” this to remove the child from its childrenRefs
in order to allow immediate recycling of the name
- the lost soul must have a place, for which the Locker has been
created, where Davy Jones will happily rebind the soul to his ship
(i.e. set “parent” to the locker to avoid mem leak) and periodically
revisit it (.stop(), in case of that being lost in comm failure,
similar .watch() to re-check liveness)
- 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
- 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)
- 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
- 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)
- 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