Commit graph

191 commits

Author SHA1 Message Date
Björn Antonsson
1d578a9aa2 Change RemoteActorRef to not start before it's been published. #2575 2012-10-15 13:33:39 +02:00
Björn Antonsson
4d003c50e7 Changes according to review. #2575 2012-10-11 10:29:54 +02:00
Björn Antonsson
6b6eeb22ba Start actor after it can be resolved with actorFor. #2575 2012-10-10 22:22:41 +02:00
Viktor Klang
397083a218 Changing the default sender of ! to be Actor.noSender to keep null in one place and have a logical alternative when deadLetters isn't present in scope. 2012-10-06 00:13:42 +02:00
Roland
64c2383596 Merge branch 'wip-2573-untrusted-∂π' 2012-10-04 17:58:15 -07:00
Roland
3efa0c96e9 implement untrusted mode, see #2573 2012-10-04 16:50:49 -07:00
Viktor Klang
65d8316a67 #2581 - removing 'running' from RemoteActorRef as discovered unused by Endre. 2012-10-02 20:20:34 +02:00
Patrik Nordwall
911ef6b97e Merge pull request #668 from akka/wip-1588-cluster-death-watch-patriknw
Death watch hooked up with cluster failure detector, see #1588
2012-09-11 06:13:44 -07:00
Viktor Klang
4eee04cb60 #2469 - Switching to scala.util.Try instead of Either[Throwable, T] in the codebase 2012-09-06 03:17:51 +02:00
Patrik Nordwall
ea59b952ce Direct failed remote sends to deadLetters, see #1588
* When Watch is sent to deadLetters it will generate Terminated
* Test: receive Terminated when watched node is unknown host
* Test: receive Terminated when watched path doesn't exist
2012-09-04 09:55:08 +02:00
Roland
48b68c650d Merge branch 'wip-2376-guardianStrategy-∂π' 2012-08-17 14:35:39 +02:00
Roland
85dcfd87d1 inline manually CatchingSend() 2012-08-16 11:31:53 +02:00
Roland
c1c05ef95e fix CTD vs. RepointableRef by swallowing exceptions during send
- it was always intended that tell() (and sendSystemMessage()) shall not
  throw any exceptions
- this is implemented by swallowing in ActorCell
  (suspend/resume/restart/stop/!/sendSystemMessage) and in
  RemoteActorRef (!/sendSystemMessage)
- current implementation uses a normal method, which adds overhead but
  keeps the code in one place (ActorCell.catchingSend); this is a great
  opportunity for making use of macros
2012-08-15 21:46:05 +02:00
Roland
f05447408c make guardian supervisorStrategy configurable, see #2376 2012-08-14 08:07:49 +02:00
Viktor Klang
17f21480b6 #2372 - Making RemoteActorRefProvider public since it is in the signature of RemoteTransport, which is public 2012-08-12 11:16:43 +02:00
Roland
6145d4313b some cleanup after Viktor’s comments
- remove useless `cause` argument from some akka exceptions
- improve names of some method arguments
- eliminate some closure allocation
2012-08-08 14:13:52 +02:00
Roland
810d65068e test exceptions from actor constructor in hierarchy, see #2336
This has brought to light some interesting effects (aka bugs) both in
the general implementation as well as in previous fixes.
SupervisorHierarchySpec is without TODOs now and GREEN.
2012-08-08 07:48:23 +02:00
Roland
dca8d15c68 Merge branch 'wip-2212-recursive-resume-∂π' into wip-scala210M5-√
only merged so that it compiles, will clean up warnings in the following
commits
2012-07-23 14:17:45 +02:00
Viktor Klang
f3078263bc Making sure that akka-remote and akka-remote-tests compiles and that tests are green 2012-07-21 18:30:14 +02:00
Viktor Klang
ac5b5de90a Merging in master, huge work trying to get things to compile, tests not green at this stage 2012-07-06 17:04:04 +02:00
Roland
1cb204da49 Merge branch 'master' into wip-2212-recursive-resume-∂π
also split out ChildrenContainer into its own file and add
suspendCounter to UnstartedActorCell
2012-07-05 13:18:19 +02:00
Roland
78a39198f1 another round of fixes due to suspend counting, see #2212
- always suspend/resume for Suspend/Resume/Recreate, no matter which
  state the actor is in, to keep the counter balanced
- preRestart failures are logged but otherwise ignored; there’s nothing
  else (apart from terminating the actor) which we could do at that
  point
- preRestart/postRestart exceptions have their own distinguishable
  subtype of ActorKilledException now
- fix some race conditions in tests to make them produce fewer false
  failures
- remove cruft from SupervisorStrategy and add methods which can
  actually be used to implement your own (with proper warning signs)
2012-07-04 09:20:17 +02:00
Roland
422cf386c8 incorporate review comments, add docs, see #2031
also add Java sample for creating custom MailboxType
2012-06-19 14:52:02 +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
96f264e842 Initial stab at DeathWatch 2.0, tests don't pass just yet 2012-05-28 16:49:49 +02:00
Viktor Klang
6bed19c6c9 Binary compat work for Akka Remote 2012-05-24 11:44:39 +02:00
Viktor Klang
95db4bfd37 Moving out ConfigurationException from akka.config to akka 2012-05-16 17:04:13 +02:00
Viktor Klang
c6d60e1089 Future proofing ActorRefProvider 2012-05-15 16:26:08 +02:00
Roland
afd81d8506 Revert "closes #2019: Use parentheses for arity-0 methods which are not referentially transparent"
This reverts commit 8dbfbbe966.
2012-05-03 21:14:47 +02:00
viktorklang
55dc5106a4 Merge pull request #417 from akka/issue-2019
closes #2019: Use parentheses for arity-0 methods which are not referent...
2012-04-27 06:46:44 -07:00
Viktor Klang
70f1997e7e Avoiding the top-level node in the WildcardTree for the Deployer 2012-04-27 12:48:22 +02:00
Viktor Klang
97e8e4880f Removing the String-only lookup method and replaced it with Iterable, Iterator and ActorPath 2012-04-26 23:59:18 +02:00
Heiko Seeberger
8dbfbbe966 closes #2019: Use parentheses for arity-0 methods which are not referentially transparent 2012-04-24 16:38:21 +02:00
Viktor Klang
5f2b23c0c8 #2005 - Putting the required fields into RemoteTransport and took the opportunity to clean up use of ActorSystemImpl 2012-04-23 18:59:49 +02:00
Roland
64b523638e rework childrenRefs to make context.stop(child) fully asynchronous
- replace TreeMap with custom ChildrenContainer, which has three
  implementations: empty, normal and “terminating” (i.e. waiting for
  some child to terminate)
- split recreate() in the same way as terminate(), so that there is a
  phase during which the suspended actor waits for termination of all
  children which were stopped in preRestart
- do not null out “actor” in ActorCell during restart, because we do
  need the supervisionStrategy and nulling it out does not buy us much
  in this case anyway
- provide new ActorContext.suspendForChildTermination(), which enters
  limbo for as long there are outstanding termination requests; this
  enables code which is very similar to previously (half-working) setups
  with “synchronous” context.stop(child)

docs are still missing, plus a little polishing here and there; oh, and
before I forget: ActorCell NOW is 64 bytes again ;-)
2012-02-29 21:10:31 +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
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
45140b465e Merge remote-tracking branch 'origin/master' into wip-1644-programmatic-deploy-∂π 2012-02-03 09:49:04 +01:00
Roland
c699c3d32d include review comments
- rename NoScope -> NoScopeGiven
- add scaladoc for scopes
- add some return types
2012-02-03 09:43:23 +01:00
Roland
76bba1f530 remote deploy docs & provider.getExternalAddressFor (see #1765) 2012-02-03 09:16:18 +01:00
Roland
10974acfe8 make it possible to programmatically deploy (e.g. remotely), see #1644
- add Deploy to Props, which is used as the basis (overridden by
  configuration)
- utilize general mechanism .withFallback (introduced on Deploy,
  RouterConfig and Scope)
- actually pass Props over the wire when deploying remotely in order to
  retain settings (this was an oversight before)
- write tests for the new functionality
2012-02-01 15:19:51 +01:00
Viktor Klang
3363a6984d Remove that shit 2012-02-01 11:39:04 +01:00
Jonas Bonér
0fa184560c Moved Gossiper, FailureDetector and VectorClock (with tests) to the akka-cluster module. Deleted all old unused cluster code (ZooKeeper-based stuff).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:06 +01:00
Jonas Bonér
f914dfe83b Merged with master.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:06 +01:00
Roland
4fb0858e55 remote cleanup: include feedback from Viktor and Patrik
- re-label Client/Server to Inbound/Outbound for netty settings
  description
- move to just using exactly one class loader for all reflective
  activities of the ActorSystem, which is either the context class
  loader or the one which loaded the ActorSystem’s class; document that
  putting Akka on boot class path will not work
- be more careful with initializing the Client- and ServerBootstrap
- rename Port to DesiredPortFromConfig to discourage misuse
- write test for NettySettings
- various small fixes
2012-01-30 11:57:24 +01:00
Roland
ac1ee9ae91 rework use of ClassLoaders, see #1736 2012-01-27 14:21:54 +01:00
Roland
c5fc153a10 rework system initialization, remove remote address from LocalActorRef
- move all creation of ActorRefs into the ActorRefProvider (deadLetters,
  locker)
- rootPath does not contain remote transport address any longer in order
  to start the LocalActorRefProvider before the RemoteTransport; the
  transport address is inserted during serialization only, which enables
  us later to have more than one transport available for one actor
  system (maybe even needed for clustering)
- fix inheritance between DeadLetterActorRef and EmptyLocalActorRef
- document some start-up dependencies by reordering constructor code
- fix remote tests which used self.path for identifying remote actors
  (since that no longer includes the remote transport address)
2012-01-27 12:14:28 +01:00
Roland
52d6e5625d Merge remote-tracking branch 'origin/master' into wip-1685-remote-cleaup-∂π 2012-01-26 11:24:23 +01:00
Viktor Klang
1590438b0c Removing dead imports from akka-remote 2012-01-25 15:55:27 +01:00
Roland
34a0f005b1 Merge branch 'master' into wip-1581-patterns-ask 2012-01-20 19:29:17 +01:00