BalancingDispatcherModelSpec is currently broken, leaves count==1 in
wavesOfActors test, committed anyway in order to check out where it
broke before this merge
most tests passing, everything compiling, but docs not updated and nasty
thread-leak preventing me from running the whole test-suite (which is
the reason for this commit: I want to chase down that one first).
- the app.mainbus is classified by Class[_] (currently lookup, will
possibly change to sub-class-aware) and accepts AnyRef messages
- LoggingBus handles akka.event-handlers from config specially:
+ start them as system services, supervised by SystemGuardian
+ keep their subscriptions in sync when logLevel_= is called
+ send them InitializeLogger(bus) message before subscribing them (so
they can register for extras like Mute/UnMute)
- two-phased start-up: first phase with actor-less stdout logging, then
subscription of config loggers, then remove stdout logger (logLevels
configurable separately)
- MainBusReaper watches registered receivers and unsubscribes them upon
death (started in phase 2)
- logger factory on Logging object, needs app/bus and log source;
default instance in app.log
- moved typed actor factories to app/context (like actor factories)
- fixed a few misplaced supervision changes, all such tests green now
- actually test akka-reference.conf in ConfigSpec
- made DispatcherActorSpec more deterministic (failed intermittently
here, was due to race towards thread pool)
- wrapped all actor initialization failures into
ActorInitializationException and made sure that this leads to Stop
- default to Stop on ActorKilledException
- fixed ActorModelSpec to separately supervise the “waves of actors”
because otherwise the app.guardian is way too busy processing all
those ChildTerminated messages
- change ActorCell._children from Vector[Stats] to TreeMap[ActorRef,
Stats] for performance reasons, have not measured memory impact, yet
- ensured that InterrupedException does not leave current thread via
Failed message to supervisor (wrapped in ActorInterruptedException)
- set core-size=1 and max-size=4 for default dispatcher during test
- every actor is now supervised, where the root of the tree is
app.guardian, which has its supervisor field set to a special ActorRef
obtained from provider.theOneWhoWalksTheBubblesOfSpaceTime (this name
is meant to indicate that this ref is outside of the universe, cf.
Michio Kaku)
- changed all tests to obtain specially supervised children (i.e. not
top-level) via (supervisor ? Props).as[ActorRef].get
- add private[akka] ScalaActorRef.sendSystemMessage for sending
Supervise()
- everything routing or remote is broken wrt. supervision, as that was
not “properly” implemented to begin with, will be tackled after
app/supervision/eventbus/AkkaSpec are stabilized enough
- add Logging trait for nicer interface
- add EventHandlerLogging class for offering the nice interface from
app.log
- add eventHandler instance to app and use that for all internal logging
(this means that some places (dispatchers, remoting) were infiltrated
by app just to do logging, but I think we'll need app in there soon
enough for other reasons)
- Decoupled FailureDetector from Routing by introducing ConnectionManager which uses FailureDetector instead of it being the same thing.
- Added ConnectionManager
- Added LocalConnectionManager
- Added RemoteConnectionManager
- Improved RoutedProps
- Integrated and added configuration for Scatter Gather router
- Added NoOpFailureDetector
- Misc API and documentation improvements
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
- remove global Config
- pull everything which depended on it into new AkkaApplication
- leave EventHandler alone for the moment: that evil sucker gets his
very own AkkaApplication("akka-reference.conf") until we have settled
on an acceptable logging API without globals
- make akka-actor and akka-testkit compile
- TestKit uses implicit AkkaApplication passing for maximum convenience
- Actor object nearly completely removed, actor creation possible via
ActorRefFactory interface which is implemented by AkkaApplication and
ActorContext
- serialization of ActorRef is probably broken, and so is the reflective
RemoteSupport (now needs AkkaApplication constructor arg)
- everything else is still broken, including akka-actor-tests, so this
is of course all not runtime-tested
Still not turned on since need deployment config support first.
Also refactored current routing quite a lot.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
* Using CAS optimistic concurrency using versioning to fix initial and dynamic management of node connections in Cluster
* Fixed broken bootstrap of ClusterNode - reorganized booting and removed lazy from some fields
* Removed 'start' and 'isRunning' from Cluster
* Removed 'isStarted' Switch in Cluster which was sprinkled all-over cluster impl
* Added more and better logging
* Moved local Cluster ops from Cluster to LocalCluster
* Rewrote RoundRobinFailoverMultiJvmSpec to be correct
* RoundRobinFailoverMultiJvmSpec now passes
* Minor reformatting and edits
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
* ScatterGatherRouter can be mixed in with other router types, and inherit their behavior on processing standard and broadcast messages
* ScatterGatherFirstCompletedRouter is a sample implementation of a ScatterGatherRouter that gathers the first reply came from connections
* Multi-JVM tests are commented out so far (custom routers dooesn't work well in a clustered mode, so far), until #1109 is closed