Commit graph

9131 commits

Author SHA1 Message Date
Roland
c9b8062fe7 Merge branch 'wip-1800-balancing-è' 2012-02-13 20:44:32 +01:00
Roland
11f067abfc fix DefaultResizer.pressure, make ResizerSpec less flaky
- also clean up left-over reference to “buddy-wakeup-threshold”
2012-02-13 20:42:14 +01:00
Roland
89cf7aa2f0 unborking compile in akka-cluster (sorry …) 2012-02-13 20:38:02 +01:00
Roland
14d180c92a unborking compile in akka-cluster (sorry …) 2012-02-13 20:16:54 +01:00
Viktor Klang
aef41fbef3 Merge branch 'master' into wip-1800-balancing-è 2012-02-13 18:18:29 +01:00
viktorklang
f371e817f1 Merge pull request #325 from jboner/wip-1806-Address-parsing-∂π
make unbalanced Address() constructor private, fix parsing, see #1806
2012-02-13 09:17:58 -08:00
Viktor Klang
607ec4c2cf Switching approaches to check for max throttle 2012-02-13 18:14:35 +01:00
Roland
669a4ff9ca make unbalanced Address() constructor private, fix parsing, see #1806 2012-02-13 17:46:14 +01:00
Roland
7c57a9d60e final touch to actor start-up sequence
split systemDispatch(Create()) into systemEnqueue(Create()) directly
after createMailbox and registerForExecution from within
Dispatcher.attach() (resp. CallingThreadDispatcher.register() does its
own thing)
2012-02-13 15:33:31 +01:00
Roland
bb40c1ae30 tweak ResizerSpec to work better with async Resize(), see #1814
- previously relied on resize() being invoked before enqueueing to the
  mailbox, which is not at all guaranteed any longer.
2012-02-13 15:33:10 +01:00
viktorklang
9b9378c2f8 Merge pull request #324 from jboner/wip-1538-http-docs-he
Wip 1538 http docs he
2012-02-13 05:12:10 -08:00
viktorklang
216513933a Merge pull request #323 from jboner/wip-1808-timeout-patriknw
Replace akka.actor.timeout with specfic settings. See #1808
2012-02-13 04:52:30 -08:00
Roland
251a7cc7e3 clean up BalancingDispatcher:
- change from messageQueue.numberOfMessages to maintaining an AtomicLong
  for performance reasons
- add comments/scaladoc where missing
- remove some assert()s
- fix ResiserSpec to employ buddy-wakeup-threshold
2012-02-13 12:38:59 +01:00
Henrik Engstrom
0cc34fdb3c Added resolver to Typesafe snapshot repo used for play-mini. See #1538 2012-02-13 08:42:57 +01:00
Henrik Engstrom
1e879b6d03 Added HTTP docs with a sample application. See #1538 2012-02-12 23:09:47 +01:00
Viktor Klang
49f101d186 #1813 - Adding clarification regarding JMM and Futures 2012-02-12 19:20:00 +01:00
Roland
5a9ec45d01 first stab at balancing algorithm: it passes the tests
- add new config item "buddy-wakeup-threshold" which defaults to 5
- if BWT>=0, then check mailbox.numberOfMessages in case the target
  actor was not scheduled during dispatch and schedule a buddie if that
  is found >=BWT (BWT is a getfield)
- if during unregister() there are messages in the queue, schedule a
  buddie

This way people can tune which behavior they want, knowing full well
that numberOfMessages is O(n).
2012-02-10 22:22:09 +01:00
Roland
880f09be22 special start-up sequence for actors on BalancingDispatcher
Normally the ActorCell would register the actor with the dispatcher
(yeah, I moved it into the logical order, because the other one was
specifically done for BD but does not work out) and then dispatch the
Create() message. This does not work for BD, because then the actor
could potentiall process a message before Create() is enqueued, so
override systemDispatch() to drop Create() and insert that during
register() (which is called from attach()), making sure to achieve the
following order:

- enqueue Create()
- register with dispatcher
- add to buddies
- schedule mailbox
2012-02-10 21:29:11 +01:00
Roland
a2ef3eed7e scaffolding: make debug printout more useful, add assertions 2012-02-10 20:56:52 +01:00
Roland
43913b0490 change IdentityHashComparator to fall back to a real one
System.identityHashCode is not guaranteed to be consistent with equals()
(cannot be, just imagine more than 2^32 objects); fix it by checking
equals in case 0 would be returned and fall back to a real Comparator in
case that’s needed.
2012-02-10 20:47:59 +01:00
Patrik Nordwall
be70801289 DOC: Corrections for the MultiJVM doc. See #1801 2012-02-10 17:14:05 +01:00
Patrik Nordwall
e017aeef08 Replace akka.actor.timeout with specfic settings. See #1808
* ActorTimeout (akka.actor.timeout) was used to all sorts of things.
* TestKit default-timeout
* TypedActor timeout for non void methods
* Transactor coordinated-timeout
* ZeroMQ new-socket-timeout
* And in various tests
2012-02-10 16:07:17 +01:00
Roland
34d3c0ad15 Merge branch 'master' into wip-1800-balancing-è 2012-02-10 16:04:51 +01:00
Roland
b6b438415e fix up FromConfig router: allow empty constructor for Java 2012-02-10 14:55:40 +01:00
Roland
47741511aa Merge branch 'wip-1750-remove-ReflectiveAccess-∂π' 2012-02-10 14:38:58 +01:00
Roland
6786e45dc7 Merge branch 'wip-1804-router-create-race-∂π' 2012-02-10 14:38:51 +01:00
Roland
4b71872aef fixing up final misnamers (createClassFor -> getClassFor) 2012-02-10 14:36:35 +01:00
Roland
36247b10fe fix some more comments and make Router dispatcher configurable
- assert locking balance when using Unsafe.instance.monitorExit
- add RouterConfig.routerDispatcher
- re-enable “busy” resizer test after switching to BalancingDispatcher
- document resizer asynchronicity and how to configure dispatchers
2012-02-10 14:13:40 +01:00
patriknw
5c0511dbd8 Merge pull request #322 from jboner/wip-1784-akkaexc2-patriknw
Removed host info from AkkaException. See #1784
2012-02-10 04:49:31 -08:00
Patrik Nordwall
3e917e1c57 Removed host info from AkkaException. See #1784 2012-02-10 13:39:22 +01:00
Roland
09897459d6 fix up Java API for serializers (both use and implement) 2012-02-10 12:45:22 +01:00
Roland
d2f28a06cd Merge remote-tracking branch 'origin/master' into wip-1750-remove-ReflectiveAccess-∂π 2012-02-10 11:41:47 +01:00
Roland
dca309c535 incorporate Patrik’s feedback
- rename to DynamicAccess
- rename to createInstanceFor / createClassFor
- fix a few little things
2012-02-10 11:36:23 +01:00
Viktor Klang
6aa16e20c7 Merge branch 'master' into wip-1800-balancing-è 2012-02-10 11:31:23 +01:00
viktorklang
eb02d461c7 Merge pull request #319 from jboner/wip-futureblocking-√
Removing the erronous execution context and added Java API
2012-02-10 02:22:14 -08:00
patriknw
c78fea12ca Merge pull request #318 from jboner/wip-1713-zmq-patriknw
Improve docs and api for zeromq. See #1713
2012-02-10 01:42:00 -08:00
Patrik Nordwall
5b50ca96f2 Minor improvement. See #1713 2012-02-10 10:40:24 +01:00
Viktor Klang
f85645e46d Removing the old work redistribution 2012-02-10 10:36:35 +01:00
Viktor Klang
d910eeae69 Removing the erronous execution context and added Java API 2012-02-10 08:20:36 +01:00
Roland
bbe221e812 incorporate Viktor’s feedback and fix some stuff
- initial resize should be done directly
- must not require children unconditionally in Router constructor
- ResizerSpec changed timing due to asynchronous resizing, one test
  disabled
- removed pointless volatile write in RouterActorRef
2012-02-09 22:58:28 +01:00
Patrik Nordwall
4a5f5eef21 Improve docs and api for zeromq. See #1713
* Wrote a comprehensive example for pub-sub
* Clarified how publish to topic is done
* Several minor, but important, api adjustments for the java api, and some also profit for scala
* Added documentation for Java and updated documentation for Scala
2012-02-09 21:25:22 +01:00
Jonas Bonér
51a218b87f Fixes ticket #1809 - Harmonize configuration option names.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-09 20:40:09 +01:00
Roland
b193bcee04 incorporate Viktor’s review 2012-02-09 19:26:02 +01:00
Roland
ca3deb4007 now that was a nice journey (related to #1804)
- first, fix quite some data races in RoutedActorRef wrt. the contained
  ActorCell’s childrenRef field (which is not even @volatile)
- then notice that there still are double-deregistrations happening in
  the dispatcher
- coming finally to the conclusion that the Mailbox should not really
  process all system messages in processAllSystemMessages(): we should
  really really stop after having closed the mailbox ;-)
- added simple test case which stops self twice to keep this fixed
2012-02-09 17:34:14 +01:00
Roland
2ce47d6bb5 Bye-bye ReflectiveAccess, introducing PropertyMaster, see #1750
- PropertyMaster is the only place in Akka which calls
  ClassLoader.getClass (apart from kernel, which might be special)
- all PropertyMaster methods (there are only three) take a ClassManifest
  of what is to be constructed, and they verify that the obtained object
  is actually compatible with the required type

Other stuff:
- noticed that I had forgotten to change to ExtendedActorSystem when
  constructing Extensions by ExtensionKey (damn you, reflection!)
- moved Serializer.currentSystem into JavaSerializer, because that’s the
  only one needing it (it’s only used in readResolve() methods)
- Serializers are constructed now with one-arg constructor taking
  ExtendedActorSystem (if that exists, otherwise no-arg as before), to
  allow JavaSerializer to do its magic; possibly necessary for others as
  well
- Removed all Option[ClassLoader] signatures
- made it so that the ActorSystem will try context class loader, then
  the class loader which loaded the class actually calling into
  ActorSystem.apply, then the loader which loaded ActorSystemImpl
- for the second of the above I added a (reflectively accessed hopefully
  safe) facility for getting caller Class[_] objects by using
  sun.reflect.Reflection; this is optional an defaults to None, e.g. on
  Android, which means that getting the caller’s classloader is done on
  a best effort basis (there’s nothing we can do because a StackTrace
  does not contain actual Class[_] objects).
- refactored DurableMailbox to contain the owner val and use that
  instead of declaring that in all subclasses
2012-02-09 11:56:43 +01:00
Roland
34d9714e22 add clarification to dispatcher-id documentation 2012-02-08 15:54:58 +01:00
patriknw
ae2ce0261f Merge pull request #315 from jboner/wip-1805-thread-names-patriknw
Proper thread names for fork-join-executor. See #1805
2012-02-08 05:06:09 -08:00
Patrik Nordwall
df1606a8ee Adjustments based on review. See #1805 2012-02-08 14:03:31 +01:00
Patrik Nordwall
81451208f1 Pi is not a constant, it has changed 2012-02-08 13:37:19 +01:00
Patrik Nordwall
c43b024cac Fixed the failing doc test 2012-02-08 13:37:00 +01:00