Commit graph

50 commits

Author SHA1 Message Date
Patrik Nordwall
a94f7cdc98 =clu #15412 Add paths(system) method to Group router
to be able to use the role correctly in cluster aware routers

This solution is very similar to what we did for nrOfInstances
in Pool routers.
2015-08-21 14:40:56 +02:00
Patrik Nordwall
7bd9550e3b =clu #16897 Correct wording for routees.paths 2015-07-01 16:19:49 +02:00
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Konrad 'ktoso' Malawski
3f12ef262f !clu #15042 useRole restriction on local node is now respected
This is an API breaking change if someone implemented their own Routers.
The change is required because the router must know if the local routees
should be started or not so it has to check the roles of the cluster
member (the local one). We could delay this decision of starting local
routees, but that would allow messages to be dead-letter-ed (bad).
2014-10-31 22:33:23 +01:00
Patrik Nordwall
1e445b4eba !act,rem,clu #3920 Remove deprecated old routers 2014-03-14 14:12:11 +01:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Patrik Nordwall
2e5193347e !clu #3617 API improvements related to CurrentClusterState
* Getter for CurrentClusterState in Cluster extension, updated via
  ClusterReadView
* Remove lazy init of readView. Otherwise the cluster.state will be
  empty on first access, wich is probably surprising
* Subscribe to several cluster event types at once, to ensure *one*
  CurrentClusterEvent followed by change events
* Deprecate publishCurrentClusterState, was a bad idea, use sendCurrentClusterState
  instead
* Possibility to subscribe with InitialStateAsEvents to receive events corresponding
  to CurrentClusterState
* CurrentClusterState not a ClusterDomainEvent, ticket #3614
2014-01-16 16:17:44 +01:00
Patrik Nordwall
d4cce379ce Merge pull request #1776 from akka/wip-3663-balancing-disp-patriknw
+act #3663 Package BalancingDispatcher for usage in router pool
2013-10-17 05:09:43 -07:00
Patrik Nordwall
80892762ad +act #3663 Package BalancingDispatcher for usage in router pool
* In fact, make it easy to define any dedicated dispatcher for a pool
2013-10-16 14:44:39 +02:00
Patrik Nordwall
402674ce10 +clu #3627 Cluster router group with multiple paths per node
* Use the ordinary routees.paths config property instead of
  cluster.routees-path
* Backwards compatible in deprecation phase
2013-10-16 11:44:00 +02:00
Patrik Nordwall
ebadd567b2 !act,rem,clu #3549 Simplify and enhance routers
* Separate routing logic, to be usable stand alone, e.g. in actors
* Simplify RouterConfig, only a factory
* Move reading of config from Deployer to the RouterConfig
* Distiction between Pool and Group router types
* Remove usage of actorFor, use ActorSelection
* Management messages to add and remove routees
* Simplify the internals of RoutedActorCell & co
* Move resize specific code to separate RoutedActorCell subclass
* Change resizer api to only return capacity change
* Resizer only allowed together with Pool
* Re-implement all routers, and keep old api during deprecation phase
* Replace ClusterRouterConfig, deprecation
* Rewrite documentation
* Migration guide
* Also includes related ticket:
  +act #3087 Create nicer Props factories for RouterConfig
2013-10-16 09:27:13 +02:00
Patrik Nordwall
dc9fe4f19c !clu #2307 Allow transition from unreachable to reachable
* Replace unreachable Set with Reachability table
* Unreachable members stay in member Set
* Downing a live member was moved it to the unreachable Set,
  and then removed from there by the leader. That will not
  work when flipping back to reachable, so a Down member must
  be detected as unreachable before beeing removed. Similar
  to Exiting. Member shuts down itself if it sees itself as
  Down.
* Flip back to reachable when failure detector monitors it as
  available again
* ReachableMember event
* Can't ignore gossip from aggregated unreachable (see SurviveNetworkInstabilitySpec)
* Make use of ReachableMember event in cluster router
* End heartbeat when acknowledged, EndHeartbeatAck
* Remove nr-of-end-heartbeats from conf
* Full reachability info in JMX cluster status
* Don't use interval after unreachable for AccrualFailureDetector history
* Add QuarantinedEvent to remoting, used for Reachability.Terminated
* Prune reachability table when all reachable
* Update documentation
* Performance testing and optimizations
2013-09-11 13:10:29 +02:00
Endre Sándor Varga
12989a9078 =clu #3519 Cluster router should use provided supervisor strategy 2013-08-21 15:03:24 +02:00
Patrik Nordwall
9270bfa70b Merge pull request #1313 from akka/wip-2797-cluster-router-stop-routees-patriknw
ClusterRouterConfig should stop remote deployed routees, see #2797
2013-04-08 12:38:26 -07:00
Patrik Nordwall
7ff77471a1 ClusterRouterConfig should stop remote deployed routees, see #2797 2013-04-08 16:14:21 +02:00
Patrik Nordwall
accdd63e7d Don't stop dynamic router when all routees terminated, see #2734 2013-04-08 13:19:44 +02:00
Patrik Nordwall
7eac88f372 Cluster node roles, see #3049
* Config of node roles cluster.role
* Cluster router configurable with use-role
* RoleLeaderChanged event
* Cluster singleton per role
* Cluster only starts once all required per-role node
  counts are reached,
  role.<role-name>.min-nr-of-members config
*  Update documentation and make use of the roles in the examples
2013-03-18 11:56:11 +01:00
Roland
bcfbea42c1 fix formatting of Java API in doc comments + genjavadoc 0.3 2013-03-07 09:05:55 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Björn Antonsson
a03460329d Change cluster MemberEvents to only be published on convergence. See #2692
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterJmx.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterMetricsCollector.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterReadView.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
	akka-docs/rst/cluster/cluster-usage-java.rst
	akka-docs/rst/cluster/cluster-usage-scala.rst
	akka-kernel/src/main/dist/bin/akka-cluster
2012-12-14 12:46:13 +01:00
Patrik Nordwall
1914be7069 Merge branch 'master' into wip-2547-metrics-router-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/Deployer.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterMetricsCollector.scala
	akka-cluster/src/test/scala/akka/cluster/MetricsCollectorSpec.scala
2012-11-15 12:33:11 +01:00
Viktor Klang
b00c47854b Switching over to immutable.Iterable where possible 2012-11-14 16:24:25 +01:00
Patrik Nordwall
545becacfe Use withDefaultValue instead of withDefault
* Just minor boy scouting cleanup
2012-10-30 09:28:50 +01:00
Helena Edelson
61481da6cd 2609 Fixed more 'available' typos in ClusterRouteeProvider 2012-10-10 10:05:41 -06:00
Helena Edelson
24c115547d 2609 Typo in method name for ClusterRouteeProvider 2012-10-10 09:58:18 -06:00
Patrik Nordwall
9423d37da9 Merge branch 'master' into wip-cluster-docs-patriknw
Conflicts:
	project/AkkaBuild.scala
2012-09-20 10:40:08 +02:00
Patrik Nordwall
6dbe1c00c4 Further improvement of selectDeploymentTarget based on feedback 2012-09-20 09:24:06 +02:00
Patrik Nordwall
a790f5bb32 Use named parameters to Deploy, avoid strange path param 2012-09-20 09:22:30 +02:00
Björn Antonsson
5f63469264 Clean up akka-remote for OSGi and re-enable OSGi bundles. See #2497 2012-09-17 13:47:57 +02:00
Patrik Nordwall
da3f08cf41 Simplify selectDeploymentTarget
* Break the loop immediately when no more targets
2012-09-17 08:42:47 +02:00
Patrik Nordwall
adeb4fc8b8 Handle empty availableNodes, see #2103 2012-09-13 11:34:53 +02:00
Patrik Nordwall
e55cde2591 Rename to allowLocalRoutees in code also, see #2103 2012-09-11 20:49:08 +02:00
Patrik Nordwall
ac16d567ea Improvements based on review comments from √, see #2103 2012-09-11 19:11:20 +02:00
Patrik Nordwall
c8cfe0eb1f Incorparate feedback from rkuhn, see #2103 2012-09-10 14:41:51 +02:00
Patrik Nordwall
7cf6ab54c8 Deploy not needed for programatically defined cluster router, see #2103
* This also removes the need for the withClusterRouter sugar
* Improved the apply and constructors for ClusterRouterSettings, since
  that will be user api instead
2012-09-10 14:11:03 +02:00
Patrik Nordwall
2e537af78a attachChild in ClusterRouteeProvider also, see #2485 2012-09-10 13:13:59 +02:00
Patrik Nordwall
f746115c4d Improve ClusterRouterSettings, see #2103
* It doesn't make sense to combine lookup with routeesPath with
  maxInstancesPerNode != 1
* Rename deploy-on-own-node as it can be used for lookup also
2012-09-08 17:30:42 +02:00
Patrik Nordwall
bf1781c173 Lookup of cluster routees, see #2103
* Lookup of routee on cluster member node using configured routees-path
2012-09-07 14:54:53 +02:00
Patrik Nordwall
d552e06a07 Add deploy-on-own-node setting for cluster router, see #2103
* Useful for master-worker scenario where all routees are remote.
2012-09-07 12:07:41 +02:00
Patrik Nordwall
f1f145ab43 Revert "Reduce exposure of ActorContext to RouteeProvider"
This reverts commit fd847535d4.

Conflicts:

	akka-cluster/src/main/scala/akka/cluster/routing/ClusterRouterConfig.scala
2012-09-07 10:02:05 +02:00
Patrik Nordwall
9b6aeadf2e createRoutees also when initial CurrentClusterState is received, see #2103 2012-08-31 10:44:07 +02:00
Patrik Nordwall
c84e05a779 Organize imports, see #2103 2012-08-30 13:52:47 +02:00
Patrik Nordwall
fd847535d4 Reduce exposure of ActorContext to RouteeProvider
* Introduced RouterContext which is a subset of
  ActorContext that makes sense for RouteeProvider
  to use.
* It's not possible (without major rethinking) to
  create routees by sending message to the Router
  actor because we rely on immediate return of ActorRef
2012-08-30 13:12:23 +02:00
Patrik Nordwall
e422d188c2 Use the router actor as cluster listener, see #2103
* Removed need for extra actor that subscribes to cluster
  events
* ClusterRouterActor is the router actor and aslo subscribes
* Less scary initialization, and safe calls to createRoutees
* Intercept ClusterDomainEvent to route them to ClusterRouterActor
  instead of to the routees
2012-08-30 12:13:50 +02:00
Patrik Nordwall
ba5df98740 Unregister routees living on removed node, see #2103 2012-08-30 10:54:58 +02:00
Patrik Nordwall
b22a092932 Support programatic declaration of cluster router, see #2103
* Ordinary withRouther withDeploy is TOO ugly for this
* Implicit conversion adds withClusterRouter to Props
  for Scala API
* Helper method in ClusterRouterPropsDecorator for Java API
2012-08-30 10:06:12 +02:00
Patrik Nordwall
695ce49727 Deploy to new members in cluster, see #2103
* Config max-nr-of-instances-per-node
* selectDeploymentTarget that takes max-nr-of-instances-per-node
  and nr-of-instances into account
* Deploy when new member added or removed
* Moved routeeProps to RouteeProvider constructor, needed for
  this feature, but also simplifies createRoute, createRoutee,
  and resize, since routeeProps doesn't have to be passed around.
2012-08-29 19:33:19 +02:00
Patrik Nordwall
bf20ae5157 Better methods in RouteeProvider
* createRoutees only for new nrOfInstances
* createRoutees also registers
* New registerRouteesFor for path lookup
* removeRoutees to gracefully unregister and stop routee
2012-08-29 14:56:51 +02:00
Patrik Nordwall
417bdc2dfb Prototype of cluster aware routers, see #2103
* Several FIXME that needs to be discussed
* ClusterRouterConfig created via ClusterActorRefProvider
2012-08-28 11:54:52 +02:00