Commit graph

45 commits

Author SHA1 Message Date
Viktor Klang
e959493e12 Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens 2011-12-14 17:36:39 +01:00
Roland
92e7693203 Merge remote-tracking branch 'origin/master' into wip-remote-supervision-rk 2011-12-13 16:59:43 +01:00
Jonas Bonér
c9b787f029 Removed all 'actorOf' methods that does not take a 'Props', and changed all callers to use 'actorOf(Props(..))'
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-13 14:09:40 +01:00
Roland
d4a764cfd9 remove LocalActorRef.underlyingActorInstance
- was used only in BalancingDispatcherSpec (was dirty, fixed dirty) and
  TestActorRef
- fixing the latter involved opening up ActorCell slightly for allowing
  new AutoReceivedMessage types (that trait is now not sealed anymore)
- TestActorRef then checks underlying.actor and retrieves it using a
  message-based request if it is still null
2011-12-10 16:56:53 +01:00
Patrik Nordwall
bfa14a692c Merge branch 'master' into wip-1377-context-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorCell.scala
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
	akka-actor/src/main/scala/akka/event/EventStream.scala
	akka-tutorials/akka-tutorial-first/src/main/java/akka/tutorial/first/java/Pi.java
	akka-tutorials/akka-tutorial-first/src/main/scala/Pi.scala
2011-12-07 07:49:34 +01:00
Patrik Nordwall
7595e52bc9 Renamed startsWatching to watch, and stopsWatching to unwatch 2011-12-06 09:59:52 +01:00
Roland
3c06992d2e incorporate review comments 2011-12-05 17:31:54 +01:00
Roland
a3e6fca530 rename RefInternals to InternalActorRef and restructure
- IAR is subclass of AR and SAR
- all concrete ARs implement IAR
- move sendSystemMessage to IAR

all in preparation for unifying the ActorPath look-up for local&remote
actor refs
2011-12-02 14:45:10 +01:00
Roland
e38cd19af9 Merge branch 'master' into wip-ActorPath-rk 2011-12-02 13:31:48 +01:00
Viktor Klang
fcc6169ede Removing the final usages of startsWatching/stopsWatching 2011-12-02 01:00:55 +01:00
Roland
b65799c7f3 remove ActorRef.address & ActorRef.name
- address => path.toString
- name => path.name
- forward hashCode, equals and compareTo to path
- implement recursive efficient ActorPath.compareTo
- fix ActorPath.equals endless recursion
- remove wrong warning in ActorCell.systemInvoke.supervise()
2011-11-30 23:30:56 +01:00
Viktor Klang
80d766b07b Adding DispatcherPrerequisites to hold the common dependencies that a dispatcher needs to be created 2011-11-17 16:09:18 +01:00
Roland
d381b72061 rename app: ActorSystem to system everywhere 2011-11-17 12:36:35 +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
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
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
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
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
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
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
Roland
9e8091459b rename application to app everywhere to make it consistent 2011-10-13 14:23: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
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
24d9a4d143 Merging with master 2011-09-27 18:02:57 +02:00
Peter Vlugter
7b1cdb4457 Remove SelfActorRef and use ActorContext to access state in ActorInstance. See #1202
- removed SelfActorRef
- added an ActorContext interface that provides a view into ActorInstance
- the ActorInstance (as ActorContext) gets injected into the Actor
- moved self methods like sender and reply directly to the Actor
2011-09-19 12:03:15 +02:00
Peter Vlugter
b96f3d9260 Initial breakout of ActorInstance. See #1195 2011-09-15 09:54:40 +02:00
Viktor Klang
bbb79d8e0d Start removed but cluster is broken 2011-09-08 11:02:17 +02:00
Viktor Klang
c7d58c600b Adding initial support for Props 2011-08-26 17:25:18 +02:00
Viktor Klang
3bc7db0dde Closing ticket #1030, removing lots of warnings 2011-07-19 19:28:46 +02:00
Viktor Klang
9d71be7778 Updating copyright section to Typesafe Inc. etc 2011-07-14 16:03:08 +02:00
Jonas Bonér
0b1ee758f5 1. Implemented replication through transaction log, e.g. logging all messages and replaying them after actor migration
2. Added first replication test (out of many)
3. Improved ScalaDoc
4. Enhanced the remote protocol with replication info

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-07-08 08:28:13 +02:00
Roland
db2d296b81 ActorRef.start() returns this.type 2011-06-19 22:20:42 +02:00
Jonas Bonér
7dbc5ac958 Merged with master 2011-06-10 08:41:10 +02:00
Jonas Bonér
04efc440d6 1. Made LocalActorRef aware of replication
2. Added configuration for transaction log replication
3. Added replication schemes WriteThrough and WriteBehind
4. Refactored serializer creation and lookup in Actor.scala
5. Extended network protocol with replication strategy
6. Added BookKeeper management to tests
7. Improved logging and error messages
8. Removed ReplicatedActorRef
9. Added snapshot management to TransactionLog

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-06-07 11:10:29 -07:00
Viktor Klang
f9d0b188af Removing ActorRef.isDefinedAt and Future.empty and moving Future.channel to Promise, renaming future to promise for the channel 2011-06-04 12:42:06 -07:00
Jonas Bonér
a7311c83e6 Added Scalariform sbt plugin which formats code on each compile. Also checking in reformatted code 2011-05-18 17:25:30 +02:00
Jonas Bonér
2655d44ee9 Merged wip-2.0 branch with latest master 2011-05-16 12:32:00 +02:00
Viktor Klang
c2486cd52c Fixing ticket 808 2011-04-29 17:15:00 +02:00
Jonas Bonér
fb008632cb All tests passing except akka-remote 2011-04-27 15:00:41 +02:00
Jonas Bonér
2e7c76dd98 Rebased from master 2011-04-27 00:38:10 +02:00
Roland
b6446f50dd proxy isDefinedAt/apply through TestActorRef 2011-04-21 21:31:24 +02:00
Roland Kuhn
9c539e96fe add TestActorRef
- add adaptation of ActorRefSpec test suite
- add some more specific tests
2011-04-16 22:20:04 +02:00