Commit graph

75 commits

Author SHA1 Message Date
Viktor Klang
c56341b3a6 Fixing FIXME to rename isShutdown to isTerminated 2011-11-23 19:03:56 +01:00
Roland
6a8e516b6c change source tag in log events from AnyRef to String
- ensure that no “complex” things are attached to a LogEvent (think
  serialization)
- ensure no escaping the “this” reference via LoggingBus during
  constructors (e.g. ActorSystem)
- change it so that
    + Actor/ActorRef are represented by their address
    + Class[_] by simpleName
    + String by itself
- this means that people need to think a little more while deciding how
  “this” should look like in logging (which I think is a good thing)
2011-11-18 12:24:04 +01:00
Viktor Klang
d63c511401 #1351 - Making sure that the remoting is shut down when the ActorSystem is shut down 2011-11-18 11:16:23 +01:00
Roland
62032cb1ff merge system-cleanup into master 2011-11-17 14:38:49 +01:00
Roland
d381b72061 rename app: ActorSystem to system everywhere 2011-11-17 12:36:35 +01:00
Roland
c31695bef4 rename AkkaConfig to Settings 2011-11-17 12:11:55 +01:00
Roland
2b6d9ca6bd rename ActorSystem.root to rootPath 2011-11-17 10:54:17 +01:00
Roland
648661c548 clean up initialization of ActorSystem, fixes #1050
- create ActorSystemImpl trait to make ActorSystem fully abstract
- add Java API for constructing (ActorSystem.create(...))
- only go through factory methods because .start() has become necessary
- rename all user-facing occurrences of “app” to “system” (Actor trait
  and TestKit/AkkaSpec)
- pass ActorSystemImpl to ActorRefs upon creation, which means that
  actorOf() and friends need such an argument, which must be provided to
  the ActorRefProvider by the ActorRefFactory implementation
2011-11-16 17:18:36 +01:00
Viktor Klang
18bfa26272 Renaming startsMonitoring/stopsMonitoring to startsWatching and stopsWatching 2011-11-16 16:46:16 +01:00
Roland
3c61e593f2 remove app argument from Deployer 2011-11-14 18:18:08 +01:00
Roland
f2bf27b4de remove app argument from Dispatchers
(cascading into all dispatchers, mailboxes, other stuff; had to move
deadLetter stuff to ActorSystem again and split its initialization due
to cyclic dependency)
2011-11-14 16:03:26 +01:00
Roland
fc4598d711 start clean-up of ActorSystem structure vs. initialization
- move guardians, dead letters and deathWatch info provider
- move scheduler into ActorSystem
- keep forwarding methods in the first step to let the tests run
2011-11-14 14:21:53 +01:00
Viktor Klang
31fbe76e06 It is with great pleasure I announce that all tests are green, I now challenge thee, Jenkins, to repeat it for me. 2011-11-14 11:18:17 +01:00
Roland
a08234cd9a introduce base64 random names
- remove Props.randomName and associated logic
- ActorRefFactory contains AtomicLong which is used to generate unique
  children names
- base64-like encoding is used with reverse “digit” order
- disallow given names which are null, empty or start with ‘$’
- random names start have ‘$’ prepended (‘$’ not being one of the 64
  characters)
- special marker “$_” for tempPath until “/tmp” supervisor is introduced
- TestActorRef uses globally unique “$$” prefix, as it creates actors
  beneath any supervisor as instructed by the user
2011-11-13 20:38:14 +01:00
Roland
1ba168774f improve DeadLetter reporting
(since I know now what’s causing these Jenkins failures ;-) )

- include recipient in DeadLetter
- include recipient in calls to enqueue/systemEnqueue
- move DeadLetterMailbox to ActorSystem (saves some space, too)
- hook up DeadLetterMailbox so it sends DeadLetters to app.deadLetters,
  which publishes them on the eventStream
- subscribe TestEventListener to DeadLetter and turn it into Warning

The generated warnings about ChildTerminated are very much correct, they
remind us that we still need to fix supervisor.stop() to await all
children’s death before actually committing suicide.
2011-11-12 10:57:28 +01:00
Viktor Klang
7931032898 Removing postMessageToMailbox and taking yet another stab at the pesky balancing dispatcher race 2011-11-11 12:59:19 +01:00
Roland
945b1aedf9 rename akka.AkkaApplication to akka.actor.ActorSystem
Renaming it to System did not appeal after seeing that such a thing is
already imported from Predef ...
2011-11-10 21:00:01 +01:00
Viktor Klang
c6e44ffef7 Removing hostname and port for AkkaApplication, renaming defaultAddress to address, removing Deployer.RemoteAddress and use the normal akka.remote.RemoteAddress instead 2011-11-10 19:20:07 +01:00
Viktor Klang
c75a8db0de Merging in Henriks HashedWheelTimer stuff manually 2011-11-10 18:41:51 +01:00
Viktor Klang
1fb1309dc3 Merging with master 2011-11-10 18:06:16 +01:00
Viktor Klang
ba9281e267 Removing InetSocketAddress as much as possible from the remoting, switching to RemoteAddress for an easier way forward with different transports. Also removing quite a few allocations internally in the remoting as a side-efect of this. 2011-11-10 17:39:31 +01:00
Peter Vlugter
a7ed5d7816 Update deployer to use actor path rather than old address (name) 2011-11-10 12:21:42 +01:00
Peter Vlugter
7b8a865c00 Rename address to name or path where appropriate
- TypedActor: address -> name
- TestActorRef, TestFSMRef: address -> name
- Props.randomAddress -> randomName
- Remote protocol: address -> name
- Address.validate moved to ActorPath
2011-11-10 12:19:07 +01:00
Peter Vlugter
3f7cff141d Add an initial implementation of actor paths 2011-11-10 12:19:07 +01:00
Jonas Bonér
85fc8be749 Merge branch 'master' of github.com:jboner/akka 2011-11-10 11:51:04 +01:00
Jonas Bonér
f4740a4798 Moved 'failure-detector' config from 'akka.actor.deployment.address' to 'akka.remote'. Made AccrualFailureDetector configurable from config. 2011-11-10 11:50:11 +01:00
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
d8d322c6e8 Moving in Deployer udner the provider 2011-11-04 10:11:07 +01:00
Viktor Klang
37ba03eadb Adding initial support in the protocol to get the public host/port of the connecting remote server 2011-11-03 18:33:57 +01:00
Viktor Klang
a040a0c54d Profit! Removing Uuids from ActorCells and ActorRefs and essentially replacing the remoting with a new implementation. 2011-11-03 14:53:38 +01:00
Viktor Klang
91545a4b52 Fixing TestActorRefSpec, now everything's green 2011-10-31 16:09:53 +01:00
Viktor Klang
d64b2a7292 All green, fixing issues with the new ask implementation and remoting 2011-10-31 16:09:53 +01:00
Viktor Klang
5d4ef80618 Fixing ActorModelSpec for CallingThreadDispatcher 2011-10-31 16:09:53 +01:00
Viktor Klang
26f45a599b Making walker a def in remote 2011-10-31 16:09:52 +01:00
Viktor Klang
3e3cf86bdf Removing futures from the remoting 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
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
c059d1bc11 Merge branch 'parental-supervision'
commented out one failing test in LoggingReceiveSpec (known, to be fixed
soon by implementing MainBusLogging)
2011-10-25 12:24:39 +02:00
Viktor Klang
bb0b845607 Preparing to remove channels and ActorPromise etc 2011-10-21 15:51:38 +02:00
Roland
d55f02e6c1 merge master into parental-supervision, fixing up resulting breakage 2011-10-21 15:11:43 +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
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
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
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
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
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
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
fa1a2610a7 Removing RemoteActorSystemMessage.Stop in favor of the sexier Terminate message 2011-10-17 19:31:59 +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