Commit graph

7617 commits

Author SHA1 Message Date
Roland
d55f02e6c1 merge master into parental-supervision, fixing up resulting breakage 2011-10-21 15:11:43 +02:00
Patrik Nordwall
550ed58bf7 Included akka-sbt-plugin in build, since I need timestamped version to be published 2011-10-21 08:53:00 +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
172ab31f2a improve some, but tests are STILL FAILING
- AkkaApplication.stop() will stop the guardian; when that stops, it
  will send ChildTerminated to the BubbleWalker, who will then complete
  a Promise
- AkkaApplication.terminationFuture is that Promise and available for
  registration of onComplete callback, used now to shutdown the
  Scheduler
- AkkaSpec extends BeforeAndAfterAll and uses that to call app.stop(),
  exposing atStartup() and atTermination() overridable hooks
- fixed some tests
2011-10-20 20:45:02 +02:00
Jonas Bonér
10fc175c09 Removed reference to non-committed code 2011-10-20 15:40:05 +02:00
Jonas Bonér
303d34692d Merge branch 'master' of github.com:jboner/akka
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-20 15:11:34 +02:00
Viktor Klang
e0a7b88fc5 Adding Actor.watch and Actor.unwatch - verrrry niiiice 2011-10-20 13:56:57 +02:00
Roland
25f436d521 add TestKit.fishForMessage 2011-10-20 13:43:24 +02:00
Viktor Klang
6a2f203d26 Rewriting DeathWatchSpec and FSMTransitionSpec to do the startsMonitoring inside the Actor 2011-10-20 11:46:13 +02:00
Viktor Klang
4fc108027e I've stopped hating Jenkins, fixed the pesky elusing DeathWatch bug 2011-10-19 23:21:06 +02:00
Viktor Klang
bf4af15817 Making the DeadLetterActorRef push notifications to the EventHandler 2011-10-19 22:38:35 +02:00
Viktor Klang
57e994386d Making sender always return an ActorRef, which will be the DeadLetterActor if there is no real sender 2011-10-19 22:20:53 +02:00
Viktor Klang
adccc9b89b Adding possibility to specify Actor.address to TypedActor 2011-10-19 18:23:39 +02:00
Viktor Klang
70bacc4c3d Fixing yet another potential race in the DeathWatchSpec 2011-10-19 18:23:23 +02:00
Viktor Klang
83e17aa8ea Removing the 'def config', removing the null check for every message being processed and adding some TODOs 2011-10-19 17:48:27 +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
f68c170ba8 Removing senderFuture, in preparation for 'sender ! response' 2011-10-19 17:11:09 +02:00
Viktor Klang
77dc9e9c35 #1299 - Removing reply and tryReply, preparing the way for 'sender ! response' 2011-10-19 16:59:47 +02:00
Jonas Bonér
c8215dfd54 Added Gossip messages and management to remote protocol. Various refactorings and improvements of remoting layer.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-19 14:45:24 +02:00
Viktor Klang
2d4251fcee Fixing a race in DeathWatchSpec 2011-10-19 14:26:53 +02:00
Viktor Klang
0dc3c5ad3d Removing receiver from Envelope and switch to use the Mailbox.actor instead, this should speed up the BalancingDispatcher by some since it doesn't entail any allocations in adopting a message 2011-10-19 13:19:44 +02:00
Jonas Bonér
2fcafb205d Changed API in VectorClock and added references in scaladoc.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-19 12:22:22 +02:00
Roland
25e8eb1422 teach new tricks to old FaultHandlingStrategy
- Escalate explicitly does the previous non-handled case
- Restart does the obvious
- Stop just terminates the child (useful for
  ActorInitializationException or “temporary” actors)
- Resume directly resumes the child (immortal actors)
- trapExit list replaced by Decider (total function cause=>action)
- there are factories which accept (most of) the old inputs
- can build a sorted list of (cause, action)-pairs to make a Decider
  which picks the action for the most specific enclosing cause type

Also add DeathPactException for case of unhandled Terminated message.
2011-10-19 11:36:34 +02:00
Roland
10c87d5832 split out fault handling stuff from ActorCell.scala to
FaultHandling.scala
2011-10-19 11:36:06 +02:00
Viktor Klang
bde3969f65 #1297 - Fixing two tests that have been failing on Jenkins but working everywhere else 2011-10-19 11:01:00 +02:00
Viktor Klang
51ac8b1368 Merge branch 'master' of github.com:jboner/akka 2011-10-19 10:10:18 +02:00
Viktor Klang
7d879944ce #1210 - fixing typo 2011-10-19 10:10:03 +02:00
Roland
5c823ad50d replace ConcurrentLinkedQueue with single-linked list for Mailbox.systemQueue
cost zero when empty, non-blocking, shave off 84 bytes per actor
2011-10-18 21:21:19 +02:00
Viktor Klang
01efcd7b50 Removing ActorCell.ref (use ActorCell.self instead), introducing Props.randomAddress which will use the toString of the uuid of the actor ref as address, bypassing deployer for actors with 'randomAddress' since it isn't possible to know what the address will be anyway, removing Address.validate since it serves no useful purpose, removing guard.withGuard in MessageDispatcher in favor of the less costly lock try-finally unlock strategy 2011-10-18 19:14:42 +02:00
Viktor Klang
474787a81d Renaming createActor to actorOf 2011-10-18 17:56:23 +02:00
Viktor Klang
3f258f8b63 Merge branch 'master' of github.com:jboner/akka 2011-10-18 17:00:11 +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
df29faca2d merge in Viktor’s dispatcher uuid map removal 2011-10-18 16:47:07 +02:00
Roland
183dfb4d7f remove SystemEnvelope
- channel field was always set to NullChannel and not used
- receiver field is better put into the Mailbox, because there it takes
  space only once per actor
- leaves only the bare SystemMessage to be queued
2011-10-18 16:44:35 +02:00
Viktor Klang
304d39d839 Removing uuid tracking in MessageDispatcher, isn't needed and will be reducing the overall memory footprint per actor 2011-10-18 15:09:35 +02:00
Viktor Klang
65868d7c96 Making sure that the RemoteActorRefProvider delegates systemServices down to the LocalActorRefProvider 2011-10-18 14:21:48 +02:00
Viktor Klang
1c3b9a389b Adding clarification to DeathWatchSpec as well as making sure that systemServices aren't passed into the deployer 2011-10-18 14:00:46 +02:00
Viktor Klang
7a6508973f Adding extra output to give more hope in reproducing weird test failure that only happens in Jenkins 2011-10-18 12:40:44 +02:00
Viktor Klang
cb8a0adbb8 Switching to a cached version of Stack.empty, saving 16 bytes per Actor. Switching to purging the Promises in the ActorRefProvider after successful creation to conserve memory. Stopping to clone the props everytime to set the application default dispatcher, and doing a conditional in ActorCell instead. 2011-10-18 11:26:35 +02:00
Viktor Klang
4e960e5364 Changing so that the mailbox status is ack:ed after the _whole_ processing of the current batch, which means that Akka only does 1 volatile write per batch (of course the backing mailboxes might do their own volatile writes) 2011-10-17 19:33:19 +02:00
Viktor Klang
fa1a2610a7 Removing RemoteActorSystemMessage.Stop in favor of the sexier Terminate message 2011-10-17 19:31:59 +02:00
Viktor Klang
379515771b Tidying up some superflous lines of code in Scheduler 2011-10-17 19:31:04 +02:00
Viktor Klang
bd39ab0816 Merge branch 'master' of github.com:jboner/akka 2011-10-17 18:35:48 +02:00
Viktor Klang
050411bf3b Making a Java API for Scheduler (JScheduler) and an abstract class Scheduler that extends it, to make the Scheduler pluggable, moving it into AkkaApplication and migrating the code. 2011-10-17 18:35:36 +02:00
Roland
f75d16f710 fix small naming errors in supervision.rst 2011-10-17 17:59:04 +02:00
Roland
ab4f62cebe add first draft of supervision spec 2011-10-17 16:17:28 +02:00
Viktor Klang
2270395d3f Adding try-finally in the system message processing to ensure that the cleanup is performed accurately 2011-10-17 14:53:32 +02:00
Viktor Klang
3dc84a0229 Renaming InVMMonitoring to LocalDeathWatch and moved it into AkkaApplication, also created a createDeathWatch method in ActorRefProvider so that it's seeded from there, and then removed @volatile from alot of vars in ActorCell since the fields are now protected by the Mailbox status field 2011-10-17 14:32:31 +02:00
Viktor Klang
3a543ed23d Relized that setAsIdle doesn't need to call acknowledgeStatus since it's already called within the systemInvoke and invoke 2011-10-15 16:52:28 +02:00
Jonas Bonér
36cd652581 Removing Gossiper. Was added prematurely by mistake.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-14 15:23:35 +02:00