Commit graph

69 commits

Author SHA1 Message Date
Roland
a747ef7856 Merge remote branch 'origin/master' into logging
BalancingDispatcherModelSpec is currently broken, leaves count==1 in
wavesOfActors test, committed anyway in order to check out where it
broke before this merge
2011-11-09 14:56:05 +01:00
Viktor Klang
c998485865 Fixing ask/? for the routers so that tests pass and stuff 2011-10-31 16:09:52 +01:00
Viktor Klang
1b730b5c82 Removing Channel(s), tryTell etc, everything compiles but all tests are semibroken 2011-10-31 16:09:51 +01:00
Jonas Bonér
e9dfaf7ed8 Fixed misc FIXMEs 2011-10-28 12:00:06 +02:00
Roland
f46c6dc533 introducing: MainBus feat. LoggingBus
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
2011-10-27 12:36:22 +02:00
Roland
3b698b9470 nearly done, only two known test failures
- 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
2011-10-20 23:37:54 +02:00
Roland
d3837b9fc3 Introduce parental supervision, BUT TESTS ARE STILL FAILING
- 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
2011-10-19 17:18:50 +02:00
Viktor Klang
6150beb333 Pushing the memory per actor down to 464 bytes. Returning None for the Deploy if there is no config 2011-10-18 16:59:57 +02:00
Roland
44b94643e5 Merge with Peter's work (i.e. merging master into tame-globals) 2011-10-13 14:17:07 +02:00
Peter Vlugter
317b8bc03b Merge master into tame-globals branch 2011-10-13 13:41:44 +02:00
Roland
85b7accfd4 make EventHandler non-global
- 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)
2011-10-13 13:21:59 +02:00
Jonas Bonér
e20866c982 Moved method for creating a RoutedActorRef from 'Routing.actorOf' to 'Actor.actorOf' 2011-10-11 11:55:59 +02:00
Jonas Bonér
d31057dacf Added support for custom user-defined routers 2011-10-11 11:18:47 +02:00
Jonas Bonér
3e6decffc0 Removed the ActorRegistry, the different ActorRefProvider implementations now holds an Address->ActorRef registry. Looking up by UUID is gone together with all the other lookup methods such as 'foreach' etc. which do not make sense in a distributed env. 'shutdownAll' is also removed but will be replaced by parental supervision. 2011-10-10 14:02:33 +02:00
Jonas Bonér
4ec050c12e Major refactoring of RemoteActorRefProvider, remote Routing and FailureDetector, including lots of fixes and improvements.
- 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>
2011-10-07 15:42:55 +02:00
Peter Vlugter
3aadcd7645 Update stm module to work with AkkaApplication 2011-10-07 15:22:36 +02:00
Roland
2381ec54d0 introduce AkkaApplication
- 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
2011-10-06 21:19:46 +02:00
Viktor Klang
0f049d67e6 Removing ActorRef.isRunning - replaced in full by isShutdown, if it returns true the actor is forever dead, if it returns false, it might be (race) 2011-10-03 19:43:45 +02:00
Jonas Bonér
08c1e918f4 Fixed broken 'stop' method on RoutedActorRef, now shuts down its connections by sending out a 'Broadcast(PoisonPill)'.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-28 17:43:51 +02:00
Peter Vlugter
8297f459e3 Some clean up of the compile and test output 2011-09-27 18:00:26 +02:00
Viktor Klang
a7cb5b5212 Upgrading to SBT 0.11 2011-09-27 10:37:53 +02:00
Peter Vlugter
c84d33ef99 Fix ticket 1111 spec by creating compatible exception-throwing behaviour for now. 2011-09-26 15:43:11 +02:00
Jonas Bonér
00d3b87586 Merge branch 'remote-actorref-provider'
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-22 04:38:33 +02:00
Jonas Bonér
978cbe4437 Change the package name of all classes in remote module to 'akka.remote'.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-20 22:08:38 +02:00
Viktor Klang
b66d45ec6c Removing deployId from config, should be replaced with patterns in deployment configuration that is checked towards the address 2011-09-19 15:20:52 +02:00
Jonas Bonér
e70ab6d12c Added lockless FailureDetector.putIfAbsent(connection).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-19 14:40:12 +02:00
Peter Vlugter
b96f3d9260 Initial breakout of ActorInstance. See #1195 2011-09-15 09:54:40 +02:00
Viktor Klang
8a7eacb3c6 Merge with master 2011-09-09 12:00:19 +02:00
Jonas Bonér
2dea305136 Merge branch 'master' into wip-remote-connection-failover 2011-09-08 19:50:33 +02:00
Jonas Bonér
47bfafe81e Moved FailureDetector trait and utility companion object to its own file.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-08 19:46:05 +02:00
Viktor Klang
6114df1efd Merge branch 'master' into wip-nostart 2011-09-08 17:22:52 +02:00
Viktor Klang
d8390a61f6 #1180 - moving the Java API to Futures and Scala API to Future 2011-09-08 15:54:06 +02:00
Viktor Klang
bbb79d8e0d Start removed but cluster is broken 2011-09-08 11:02:17 +02:00
Jonas Bonér
bf7ef7234a Refactored and renamed API for FailureDetector.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-09-01 14:58:18 +02:00
Jonas Bonér
0a63350452 Added configuration for failure detection; both via akka.conf and via Deploy(..).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-08-31 15:07:18 +02:00
Jonas Bonér
e17a376236 Refactored state management in routing fail over.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-08-30 18:42:35 +02:00
Jonas Bonér
e0385e5203 Added failure detection to clustered and local routing.
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>
2011-08-30 14:31:59 +02:00
Jonas Bonér
344dab94f1 Misc reformatting, clean-ups and removal of '()' at a bunch of methods.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-08-29 15:50:40 +02:00
Jonas Bonér
5e290ec393 Merge branch 'master' of github.com:jboner/akka
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-08-29 14:26:24 +02:00
Jonas Bonér
66f339e202 Moved all 'akka.remote' to 'akka.cluster', no more 'remote' package.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-08-29 11:44:33 +02:00
Peter Veentjer
56d4fc7d7c Merge ClusterActoRef & RoutedActorRef: After merge with master 2011-08-29 09:22:14 +03:00
Peter Veentjer
ee4d241ceb Use RoutedProps to configure Routing (local and remote). Ticket #1060 2011-08-27 08:10:25 +03:00
Viktor Klang
c7d58c600b Adding initial support for Props 2011-08-26 17:25:18 +02:00
Jonas Bonér
a4c66bb4d9 Minor changes to logging and reformatting.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-08-26 08:24:26 +02:00
Jonas Bonér
dfc1a68aac Fixed race condition in initial and dynamic management of node connections in Cluster
* 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>
2011-08-18 11:35:14 +02:00
Vasil Remeniuk
b121da7d2b Scatter-gather router. ScatterGatherRouter boradcasts the message to all connections of a clustered actor, and aggregates responses due to a specified strategy. Fixes #1111
* 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
2011-08-17 10:21:27 +03:00
Peter Veentjer
1c39ed1ad6 cleanup of unused imports 2011-08-13 08:27:10 +03:00
Jonas Bonér
5b2b463ce0 Changed the elements in actor.debug section in the config from receive = "false" to receive = off. Minor other reformatting changes 2011-08-12 14:35:45 +02:00
Peter Veentjer
6786f934ce minor doc improvent 2011-08-12 10:30:26 +03:00
Peter Veentjer
0c58b38a5a RoutedActorRef makes use of composition instead of inheritance. Solves ticket 1075 and 1062 (broken roundrobin router)* 2011-08-12 10:03:33 +03:00