Commit graph

83 commits

Author SHA1 Message Date
Björn Antonsson
c3eed374f1 Allow different types of mailboxes on the same dispatcher. See #2687 2013-04-19 13:42:58 +02:00
Endre Sándor Varga
f8c3717ca1 Changed Failed to be a SystemMessage
- Moved system messages to their own package.
 - All queueing operations are now hidden behind a SystemMessageList value class
 - Introduced dual SystemMessageList types to encode the ordering in the type.
   - Protects against accidentally missed reverse calls or accidentally reversed lists
   - Makes ordering expectations by fields/parameters explicit
 - Fixed serialization tests
 - Fixes to logging in HierarchyStressSpec
2013-03-22 12:02:31 +01:00
Patrik Nordwall
323e5c80b5 Polish the API/SPI of remoting, see #2827
* Changed TransportAdapterProvider to support java impl
* Verified java impl of AbstractTransportAdapter and
  ActorTransportAdapter
* Privatized things that should not be public api
* Consistent usage of INTERNAL API marker in scaladoc
* Added some missing doc in conf
* Added missing SerialVersionUID
2013-02-10 17:47:43 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Roland
e86144499c remove some FIXMEs
some were left-over residue, some were fixed
2012-10-16 12:06:03 +02:00
Roland
0f04239f67 move Duration classes according to scala 2.10 nightly and remove casts to FiniteDuration, see #2504 2012-10-11 15:18:10 -07:00
Roland
35b7a9e338 second round of FiniteDuration business, including cluster fixes
- make Scheduler only accept FiniteDuration, which has quite some
  knock-on effects
2012-09-18 09:58:30 +02:00
Viktor Klang
1bf0fe4448 Partial migration to M5 2012-07-17 17:21:08 +02:00
Viktor Klang
0bf45a9403 Initial work in moving to scala.concurrent.Await + Awaitable 2012-06-29 16:06:26 +02:00
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Roland
b60210362e make system.actorOf() non-blocking (and working), see #2031
- introducing RepointableActorRef, which starts out with an
  UnstartedActorCell which can cheaply be created; the Supervise()
  message will trigger child.activate() in the supervisor, which means
  that the actual creation (now with normal ActorCell) happens exactly
  in the right place and with the right semantics. Messages which were
  enqueued to the dummy cell are transferred atomically into the
  ActorCell (using normal .tell()), so message sends keep working
  exactly as they used to
- this enables getting rid of the brittle synchronization around
  RoutedActorRef by replacing that one with a RepointableActorRef
  subclass which creates RoutedActorCells upon activate(), with the nice
  benefit that there is no hurry then to get it right because the new
  cell is constructed “on the side”

misc fixes:

- InvalidMessageException is now actually enforced when trying to send
  “null”
- Mailboxes may be created without having an ActorCell, which can come
  in handy later, because the cell is only needed when this mailbox is
  going to be scheduled on some executor
- remove occurrences of Props(), which is equivalent to Props[Nothing],
  which is equivalent to «bug»
- add test case which verifies that context.actorOf is still synchronous
- plus all the stuff I have forgotten.
2012-06-13 17:57:56 +02:00
Viktor Klang
7784513537 Fixing logic bug introduced in refactor 2012-05-21 13:39:39 +02:00
Viktor Klang
e357b9825b Adding return types in Dispatcher 2012-05-20 19:06:31 +02:00
Viktor Klang
4a2227fc95 Removing the AtomicReference from Dispatcher and restructured the code a bit 2012-05-20 19:03:20 +02:00
Viktor Klang
630c4a0153 Adding docs and fixing a potential bug in use of getSimpleName in Dispatcher 2012-05-16 17:14:49 +02:00
Viktor Klang
11c130e44e The only sensible solution is to log and rethrow, nooptimal solution. 2012-04-25 00:51:23 +02:00
Roland
3eeaadd804 move back to explicit enqueue/dequeue delegation from Mailbox to MessageQueue, see #1844 2012-02-21 13:22:25 +01:00
Roland
2f3737195b split Mailbox and MessageQueue, see #1844
- this enables using any MessageQueue in BalancingDispatcher,
  CallingThreadDispatcher and in general leads to less conflation of
  concepts
- add MessageQueue.cleanUp(owner, deadLetterQueue) for the benefit of
  durable mailboxes
- change MailboxType.create to take an optional owner and generate only
  a MessageQueue, not a Mailbox
2012-02-19 10:28:56 +01:00
Viktor Klang
607ec4c2cf Switching approaches to check for max throttle 2012-02-13 18:14:35 +01:00
Patrik Nordwall
1f988889c2 Proper thread names for fork-join-executor. See #1805 2012-02-08 11:53:55 +01:00
Viktor Klang
8dfe619140 #1703 & #1693 - moving daemonicity to one place, and in doing so creating a thread factory in ActorSystem 2012-01-20 12:30:19 +01:00
Viktor Klang
d888ca5bff Removing 'name' from dispatchers, just use id, much better 2012-01-19 19:08:51 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Roland
d0498eb32e add Class[_] to LogEvent
- it is customary to use class name for categorizing logs, hence we
  should support it; class is taken from logSource.getClass
- update SLF4J module to use logClass as category and set logSource in
  MDC "akkaSource"
- add docs
2012-01-12 13:29:17 +01:00
Patrik Nordwall
0ff920195c Updated documentation. See #1458 2011-12-21 21:24:57 +01:00
Patrik Nordwall
df260f8939 Improvements based on feedback. See #1458 2011-12-21 19:02:06 +01:00
Patrik Nordwall
f772b0183e Initial commit of dispatcher key refactoring, for review. See #1458
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
2011-12-21 13:27:50 +01:00
Jonas Bonér
4d649c3903 Removed all @author tags for Jonas Bonér since it has lost its meaning.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-09 18:44:59 +01:00
Viktor Klang
ef27f865d4 Adding support for ForkJoinPoolConfig so you can use ForkJoin 2011-12-01 17:03:30 +01:00
Patrik Nordwall
179399296e Modularize configuration. See #1361
* Split config reference to one for each module/extension.
* Adjusted signature of registerExtension to avoid race of extension init
* Moved Duration.dilated to testkit
* TestKitExtension
* RemoteExtension
* SerializationExtension
* Durable mailboxes extensions
* Fixed broken serialization bindings and added test
* Updated configuration documentation
* System properties akka.remote.hostname akka.remote.port replaced with akka.remote.server.hostname and akka.remote.server.port
* Adjustments of ActorSystem initialization. Still don't like the two-phase constructor/init flow. Very fragile for changes.

Review fixes. SerializationExtension
2011-11-23 20:31:58 +01:00
Patrik Nordwall
e5f8a41cb8 Remove default time unit in config. All durations explicit. See #1363
* Also changed in dispatcher to use explicit Duration instead of Int/Long
2011-11-21 15:18:52 +01:00
Viktor Klang
9ae3d7feba Fixing (yes, I know, I've said this a biiiiiillion times) the BalancingDispatcher, removing some wasteful volatile reads in the hot path 2011-11-18 17:03:35 +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
80d766b07b Adding DispatcherPrerequisites to hold the common dependencies that a dispatcher needs to be created 2011-11-17 16:09:18 +01:00
Roland
62032cb1ff merge system-cleanup into master 2011-11-17 14:38:49 +01:00
Viktor Klang
13bfee782f Removing Un(der)used locking utils (locking is evil) and removing the last locks from the MessageDispatcher 2011-11-16 15:54:14 +01:00
Viktor Klang
a7e9ff4fba Switching to AbortPolicy by default 2011-11-14 19:48:06 +01:00
Viktor Klang
66dd0123bc Temporary fix for the throughput benchmark 2011-11-14 19:19:44 +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
Viktor Klang
e40b7cd8d6 Fixing bug where a dispatcher would shut down the executor service before all tasks were executed, also taking the opportunity to decrease the size per mailbox by atleast 4 bytes 2011-11-14 14:09:23 +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
Roland
53353d7031 rename MainBus to EventStream (incl. field in ActorSystem) 2011-11-10 21:01:37 +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
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
a75310a181 Removing unused code in ReflectiveAccess, fixing a performance-related issue in LocalDeployer and switched back to non-systemServices in the LocalActorRefProviderSpec 2011-11-04 00:39:02 +01:00
Roland
d1e0f411ef clean up application structure
- introduce common parent for guardian and systemGuardian
- install deathWatch chain to ensure proper shutdown upon guardian’s
  death
- re-install stdout logger before detaching default loggers
- await app termination after running AkkaSpec tests (max 5sec, with
  warning logged if not stopped)
2011-10-28 17:15:10 +02:00
Jonas Bonér
9bf9cea0d9 Removed trailing whitespace 2011-10-28 15:55:47 +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
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
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