From 1850f6e5b72d0022db81cfe097bac54e6975eae4 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Thu, 5 Jan 2012 09:31:21 +0100 Subject: [PATCH] DOC: Minor improvement of remote docs --- akka-docs/java/remoting.rst | 41 +++++++++++++++++-------------- akka-docs/java/serialization.rst | 4 +-- akka-docs/scala/remoting.rst | 9 +++---- akka-docs/scala/serialization.rst | 4 +-- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/akka-docs/java/remoting.rst b/akka-docs/java/remoting.rst index 6e1e41e663..7ec163726a 100644 --- a/akka-docs/java/remoting.rst +++ b/akka-docs/java/remoting.rst @@ -9,39 +9,42 @@ For an introduction of remoting capabilities of Akka please see :ref:`remoting`. Preparing your ActorSystem for Remoting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The Akka remoting is a separate jar file. Make sure that you have a dependency from your project to this jar:: +The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project:: - akka-remote.jar + + com.typesafe.akka + akka-remote + 2.0-SNAPSHOT + -First of all you have to change the actor provider from ``LocalActorRefProvider`` to ``RemoteActorRefProvider``:: +To enable remote capabilities in your Akka project you should, at a minimum, add the following changes +to your ``application.conf`` file:: akka { actor { - provider = "akka.remote.RemoteActorRefProvider" + provider = "akka.remote.RemoteActorRefProvider" } - } - -After that you must also add the following settings:: - - akka { remote { + transport = "akka.remote.netty.NettyRemoteSupport" server { - # The hostname or ip to bind the remoting to, - # InetAddress.getLocalHost.getHostAddress is used if empty - hostname = "" - - # The default remote server port clients should connect to. - # Default is 2552 (AKKA) + hostname = "127.0.0.1" port = 2552 } - } + } } -These are the bare minimal settings that must exist in order to get started with remoting. -There are, of course, more properties that can be tweaked. We refer to the following +As you can see in the example above there are four things you need to add to get started: + +* Change provider from ``akka.actor.LocalActorRefProvider`` to ``akka.remote.RemoteActorRefProvider`` +* Add host name - the machine you want to run the actor system on +* Add port number - the port the actor system should listen on + +The example above only illustrates the bare minimum of properties you have to add to enable remoting. +There are lots of more properties that are related to remoting in Akka. We refer to the following reference file for more information: -* `reference.conf of akka-remote `_ +.. literalinclude:: ../../akka-remote/src/main/resources/reference.conf + :language: none Looking up Remote Actors ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/akka-docs/java/serialization.rst b/akka-docs/java/serialization.rst index 1ead054d75..7140b42aac 100644 --- a/akka-docs/java/serialization.rst +++ b/akka-docs/java/serialization.rst @@ -21,7 +21,7 @@ Usage Configuration ------------- -For Akka to know which ``Serializer`` to use for what, you need edit your Akka Configuration, +For Akka to know which ``Serializer`` to use for what, you need edit your :ref:`configuration`, in the "akka.actor.serializers"-section you bind names to implementations of the ``akka.serialization.Serializer`` you wish to use, like this: @@ -90,5 +90,5 @@ which is done by extending ``akka.serialization.JSerializer``, like this: :include: imports,my-own-serializer :exclude: ... -Then you only need to fill in the blanks, bind it to a name in your Akka Configuration and then +Then you only need to fill in the blanks, bind it to a name in your :ref:`configuration` and then list which classes that should be serialized using it. \ No newline at end of file diff --git a/akka-docs/scala/remoting.rst b/akka-docs/scala/remoting.rst index d0b613b190..5a8005fbf2 100644 --- a/akka-docs/scala/remoting.rst +++ b/akka-docs/scala/remoting.rst @@ -9,11 +9,7 @@ For an introduction of remoting capabilities of Akka please see :ref:`remoting`. Preparing your ActorSystem for Remoting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The Akka remoting is a separate jar file. Make sure that you have a dependency from your project to this jar:: - - akka-remote.jar - -In you SBT project you should add the following as a dependency:: +The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project:: "com.typesafe.akka" % "akka-remote" % "2.0-SNAPSHOT" @@ -43,7 +39,8 @@ The example above only illustrates the bare minimum of properties you have to ad There are lots of more properties that are related to remoting in Akka. We refer to the following reference file for more information: -* `reference.conf of akka-remote `_ +.. literalinclude:: ../../akka-remote/src/main/resources/reference.conf + :language: none Types of Remote Interaction ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/akka-docs/scala/serialization.rst b/akka-docs/scala/serialization.rst index 716bcc4eb7..15879b2ce4 100644 --- a/akka-docs/scala/serialization.rst +++ b/akka-docs/scala/serialization.rst @@ -21,7 +21,7 @@ Usage Configuration ------------- -For Akka to know which ``Serializer`` to use for what, you need edit your Akka Configuration, +For Akka to know which ``Serializer`` to use for what, you need edit your :ref:`configuration`, in the "akka.actor.serializers"-section you bind names to implementations of the ``akka.serialization.Serializer`` you wish to use, like this: @@ -89,5 +89,5 @@ First you need to create a class definition of your ``Serializer`` like so: :include: imports,my-own-serializer :exclude: ... -Then you only need to fill in the blanks, bind it to a name in your Akka Configuration and then +Then you only need to fill in the blanks, bind it to a name in your :ref:`configuration` and then list which classes that should be serialized using it. \ No newline at end of file