Skip to content

Commit

Permalink
Merge pull request akka#2004 from akka/wip-3868-doc-remote-router-gro…
Browse files Browse the repository at this point in the history
…up-patriknw

=doc #3868 Clarify remote router group
  • Loading branch information
patriknw committed Feb 13, 2014
2 parents 5e54204 + cafa658 commit 57d8317
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 32 deletions.
29 changes: 13 additions & 16 deletions akka-docs/rst/java/remoting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,24 +254,21 @@ Routers with Remote Destinations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is absolutely feasible to combine remoting with :ref:`routing-java`.
This is also done via configuration::

akka {
actor {
deployment {
/serviceA/aggregation {
router = "round-robin-pool"
nr-of-instances = 10
target {
nodes = ["akka.tcp://[email protected]:2552", "akka://[email protected]:2552"]
}
}
}
}
}
A pool of remote deployed routees can be configured as:

.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-pool

This configuration setting will clone the actor defined in the ``Props`` of the ``remotePool`` 10
times and deploy it evenly distributed across the two given target nodes.

A group of remote actors can be configured as:

.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group

This configuration setting will clone the actor “aggregation” 10 times and deploy it evenly distributed across
the two given target nodes.
This configuration setting will send messages to the defined remote actor paths.
It requires that you create the destination actors on the remote nodes with matching paths.
That is not done by the router.

.. _remote-sample-java:

Expand Down
2 changes: 2 additions & 0 deletions akka-docs/rst/java/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ The routee actors are created externally from the router:
The paths may contain protocol and address information for actors running on remote hosts.
Remoting requires the ``akka-remote`` module to be included in the classpath.

.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group

Router usage
^^^^^^^^^^^^

Expand Down
22 changes: 22 additions & 0 deletions akka-docs/rst/scala/code/docs/routing/RouterDocSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,28 @@ akka.actor.deployment {
}
#//#config-consistent-hashing-group
#//#config-remote-round-robin-pool
akka.actor.deployment {
/parent/remotePool {
router = round-robin-pool
nr-of-instances = 10
target.nodes = ["akka.tcp://[email protected]:2552", "akka://[email protected]:2552"]
}
}
#//#config-remote-round-robin-pool
#//#config-remote-round-robin-group
akka.actor.deployment {
/parent/remoteGroup {
router = round-robin-group
routees.paths = [
"akka.tcp://[email protected]:2552/user/workers/w1",
"akka.tcp://[email protected]:2552/user/workers/w1",
"akka.tcp://[email protected]:2552/user/workers/w1"]
}
}
#//#config-remote-round-robin-group
#//#config-resize-pool
akka.actor.deployment {
/parent/router25 {
Expand Down
29 changes: 13 additions & 16 deletions akka-docs/rst/scala/remoting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,24 +261,21 @@ Routers with Remote Destinations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is absolutely feasible to combine remoting with :ref:`routing-scala`.
This is also done via configuration::

akka {
actor {
deployment {
/serviceA/aggregation {
router = "round-robin-pool"
nr-of-instances = 10
target {
nodes = ["akka.tcp://[email protected]:2552", "akka.tcp://[email protected]:2552"]
}
}
}
}
}
A pool of remote deployed routees can be configured as:

.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-pool

This configuration setting will clone the actor defined in the ``Props`` of the ``remotePool`` 10
times and deploy it evenly distributed across the two given target nodes.

A group of remote actors can be configured as:

.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group

This configuration setting will clone the actor “aggregation” 10 times and deploy it evenly distributed across
the two given target nodes.
This configuration setting will send messages to the defined remote actor paths.
It requires that you create the destination actors on the remote nodes with matching paths.
That is not done by the router.

.. _remote-sample-scala:

Expand Down
2 changes: 2 additions & 0 deletions akka-docs/rst/scala/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ The routee actors are created externally from the router:
The paths may contain protocol and address information for actors running on remote hosts.
Remoting requires the ``akka-remote`` module to be included in the classpath.

.. includecode:: code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group

Router usage
^^^^^^^^^^^^

Expand Down

0 comments on commit 57d8317

Please sign in to comment.