Commit graph

62 commits

Author SHA1 Message Date
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Patrik Nordwall
47216bd956 +act #3579 Direct ActorSelection for missing actor to deadLetters 2013-11-06 14:27:16 +01:00
Patrik Nordwall
f89422c18e =act,rem #3073 Make ActorSelection faster 2013-11-06 12:41:53 +01:00
Patrik Nordwall
2d5616446f Race in creating new remote child, see #3423
* RemoteSystemDaemon removes its child when sendSystemMessage
  DeathWatchNotification is called from tellWatchersWeDied.
  That can happen after Terminated is delivered to other watcher,
  which create a new child with same name, and then the new child
  can then be removed instead of the old one.
* RemoteSystemDaemon must only remove child with exact match of
  full ActorRef
2013-05-31 14:09:59 +02:00
Patrik Nordwall
9e56ab6fe5 Disallow re-joining, see #2873
* Disallow join requests when already part of a cluster
* Remove wipe state when joining, since join can only be
  performed from empty state
* When trying to join, only accept gossip from that member
* Ignore gossips from unknown (and unreachable) members
* Make sure received gossip contains selfAddress
* Test join of fresh node with same host:port
* Remove JoinTwoClustersSpec
* Welcome message as reply to Join
* Retry unsucessful join request
* AddressUidExtension
* Uid in cluster Member identifier
  To be able to distinguish nodes with same host:port
  after restart.
* Ignore gossip with wrong uid
* Renamed Remove command to Shutdown
* Use uid in vclock identifier
* Update sample, Member apply is private
* Disabled config duration syntax and cleanup of io settings
* Update documentation
2013-04-17 16:48:18 +02:00
Viktor Klang
ad2e3c5e37 #3204 - Adding keypass to SSL configuration 2013-04-11 16:23:51 +02:00
Endre Sándor Varga
7b13ecea25 Terminated is now a SystemMessage 2013-04-10 09:38:11 +02:00
Patrik Nordwall
887af975ae Deprecate actorFor in favor of ActorSelection, see #3074
* Deprecate all actorFor methods
* resolveActorRef in provider
* Identify auto receive message
* Support ActorPath in actorSelection
* Support remote actor selections
* Additional tests of actor selection
* Update tests (keep most actorFor tests)
* Update samples to use actorSelection
* Updates to documentation
* Migration guide, including motivation
2013-04-08 18:11:52 +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
b738487dc8 Add UID to RemoteActorRef, see #3072
* Sending to a previous incarnation of an actor shall fail,
  to make remote actors work the same way as local ones (in
  the sense that after Terminated() the ref is not working anymore)
* Changed equality of ActorRef to take the uid into account
* Parse uid fragment in RelativeActorPath and ActorPathExtractor
* Handle uid in getChild and in RemoteSystemDaemon
* Use toSerializationFormat and toSerializationFormatWithAddress
  in serialization
* Replaced var uid in ActorCell and ChildRestartStats with
  constructor parameters (path)
* Create the uid in one single place, in makeChild in parent
* Handle ActorRef with and without uid in DeathWatch
* Optimize ActorPath.toString and friends
* Update documentation and migration guide
2013-03-21 20:25:16 +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
Patrik Nordwall
f9611178a3 Remove try ... catch constructs around invokations of tell, see #2870 2013-01-29 16:10:46 +01:00
Björn Antonsson
bd25c94445 Keep the dispatcher inhabitants count balanced. See #2919
Conflicts:
	akka-remote/src/test/scala/akka/remote/UntrustedSpec.scala
2013-01-28 15:06:14 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Endre Sándor Varga
752e43a0e7 Implemented strictly ordered shutdown between remoteDaemon and transport in RARP. 2012-12-18 14:30:03 +01:00
Patrik Nordwall
06199e3f8f MatchError in RemoteDaemon case AddressTerminated, see #2660 2012-10-26 16:57:44 +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
Patrik Nordwall
dec3184dfa Separate class for SystemGuardian, see #2552
* Also checks that the Terminated originates for user guardian
2012-09-28 12:24:17 +02:00
Patrik Nordwall
2e343eca24 Perform Terminate removeChild under the terminating lock also, see #2552 2012-09-27 14:28:40 +02:00
Patrik Nordwall
e7a075a0d9 foreachChild instead of allChildren, see #2552 2012-09-27 09:20:52 +02:00
Patrik Nordwall
7779e49312 Use whileOff instead of fold to avoid confusion, see #2552 2012-09-27 08:35:01 +02:00
Patrik Nordwall
53af6333e6 Merge branch 'wip-2552-terminate-remote-deployed-when-shutdown-patriknw' into wip-2551-terminate-when-remote-parent-lost-patriknw
Conflicts:
	akka-remote/src/main/scala/akka/remote/RemoteDaemon.scala
2012-09-27 08:12:48 +02:00
Patrik Nordwall
a38694bd69 Remove race when terminating, see #2552 2012-09-25 18:35:07 +02:00
Patrik Nordwall
490d723f81 Incorporate review feedback, see 2551 2012-09-25 16:30:20 +02:00
Patrik Nordwall
fd757fb680 Terminate remote deployed actors when parent node goes down, see #2551
* RemoteSystemDaemon listens to AddressTerminated and stops matching children
2012-09-25 15:08:08 +02:00
Patrik Nordwall
d6e5b0a46b Terminate remote-deployed actors when system shutdown, see #2552
* Termination hook mechanism in system guardian to be able to
  notify RemoteSystemDaemon and wait for it to terminate children
* Stopping the children will trigger ordinary death watch mechanism,
  in for example routers
* Note bug in RemoteSystemDaemon, watch of children was not done
  properly, which might have been a memory leak for remote deployed
  actors.
2012-09-25 14:12:04 +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
e3e391e5aa Removing DaemonMsgWatch, oh yeah baby. However, still no cigar 2012-05-29 14:14:06 +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
Jonas Bonér
ae84ee0a57 Updated copyright to 2012 2012-05-21 16:45:15 +02: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
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
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
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
Roland
edceda8edf restructure remoting
- remove Remote, incorporate its few fields into RemoteActorRefProvider
- rename RemoteSupport to RemoteTransport to sync up with conf and
  the way we talk about it
- remove LocalAddress/RemoteAddress etc. and just have a final case
  class Address(protocol, system, host, port)
- split netty settings out or RemoteSettings into NettySettings
- split out from NettyRemoteSupport.scala: Server.scala, Client.scala,
  Settings.scala

plus a few fixes, including using the contextClassLoader when loading
the provider for ActorSystemImpl
2012-01-20 14:41:15 +01:00
Jonas Bonér
a857078907 Renamed RemoteDaemon.scala to Remote.scala.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-10-26 08:58:20 +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
e1a3c9dff5 #1059 - Removing ListenerManagement from RemoteSupport, publishing to AkkaApplication.eventHandler 2011-10-23 00:40:09 +02:00
Roland
d55f02e6c1 merge master into parental-supervision, fixing up resulting breakage 2011-10-21 15:11:43 +02:00
Jonas Bonér
10fc175c09 Removed reference to non-committed code 2011-10-20 15:40:05 +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
Viktor Klang
77dc9e9c35 #1299 - Removing reply and tryReply, preparing the way for 'sender ! response' 2011-10-19 16:59:47 +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
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
Viktor Klang
474787a81d Renaming createActor to actorOf 2011-10-18 17:56:23 +02:00
Peter Vlugter
d4619b0863 Merge master into tame-globals branch 2011-10-13 18:15:09 +02:00