Commit graph

20 commits

Author SHA1 Message Date
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