From 91cbd6ed99c30b5179f24519de50009c863d5063 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Tue, 28 Aug 2018 16:10:20 +0200 Subject: [PATCH] Link to sample projects --- akka-docs/src/main/paradox/additional/deploy.md | 6 ++++-- akka-docs/src/main/paradox/additional/osgi.md | 12 +++++++----- akka-docs/src/main/paradox/cluster-sharding.md | 7 +++++++ akka-docs/src/main/paradox/cluster-usage.md | 7 +++++++ akka-docs/src/main/paradox/distributed-data.md | 7 +++++++ akka-docs/src/main/paradox/fsm.md | 7 +++++++ akka-docs/src/main/paradox/general/supervision.md | 6 ++++++ akka-docs/src/main/paradox/index-cluster.md | 2 ++ akka-docs/src/main/paradox/index-network.md | 1 - akka-docs/src/main/paradox/multi-node-testing.md | 8 +++++--- akka-docs/src/main/paradox/persistence.md | 7 +++++++ akka-docs/src/main/paradox/remoting-artery.md | 11 +++++------ akka-docs/src/main/paradox/remoting.md | 12 +++++------- build.sbt | 2 +- 14 files changed, 70 insertions(+), 25 deletions(-) diff --git a/akka-docs/src/main/paradox/additional/deploy.md b/akka-docs/src/main/paradox/additional/deploy.md index 842a696598..b113b7d2c6 100644 --- a/akka-docs/src/main/paradox/additional/deploy.md +++ b/akka-docs/src/main/paradox/additional/deploy.md @@ -37,8 +37,10 @@ You can use both Akka remoting and Akka Cluster inside of Docker containers. But that you will need to take special care with the network configuration when using Docker, described here: @ref:[Akka behind NAT or in a Docker container](../remoting.md#remote-configuration-nat) -For an example of how to set up a project using Akka Cluster and Docker take a look at the -["akka-docker-cluster" sample](https://github.com/muuki88/activator-akka-docker). +You can look at the +@java[@extref[Cluster with docker-compse example project](samples:akka-samples-cluster-docker-compose-java)] +@scala[@extref[Cluster with docker-compose example project](samples:akka-samples-cluster-docker-compose-scala)] +to see what this looks like in practice. diff --git a/akka-docs/src/main/paradox/additional/osgi.md b/akka-docs/src/main/paradox/additional/osgi.md index 61631ded90..fc4f9788f3 100644 --- a/akka-docs/src/main/paradox/additional/osgi.md +++ b/akka-docs/src/main/paradox/additional/osgi.md @@ -10,6 +10,12 @@ To use Akka in OSGi, you must add the following dependency in your project: version=$akka.version$ } +## Sample project + +You can look at the +@extref[OSGi Dining Hakkers example project](samples:akka-samples-osgi-dining-hakkers) +to see what this looks like in practice. + ## Background [OSGi](http://www.osgi.org/developer) is a mature packaging and deployment standard for component-based systems. It @@ -110,8 +116,4 @@ to conveniently set up the ActorSystem. The goal here is to map the OSGi lifecycle more directly to the Akka lifecycle. The `ActorSystemActivator` creates the actor system with a class loader that finds resources (`application.conf` and `reference.conf` files) and classes -from the application bundle and all transitive dependencies. - -## Sample - -A complete sample project is provided in @extref[akka-sample-osgi-dining-hakkers](samples:akka-sample-osgi-dining-hakkers) +from the application bundle and all transitive dependencies. \ No newline at end of file diff --git a/akka-docs/src/main/paradox/cluster-sharding.md b/akka-docs/src/main/paradox/cluster-sharding.md index 222d439df6..27965f98da 100644 --- a/akka-docs/src/main/paradox/cluster-sharding.md +++ b/akka-docs/src/main/paradox/cluster-sharding.md @@ -10,6 +10,13 @@ To use Cluster Sharding, you must add the following dependency in your project: version=$akka.version$ } +## Sample project + +You can look at the +@java[@extref[Cluster Sharding example project](samples:akka-samples-cluster-sharding-java)] +@scala[@extref[Cluster Sharding example project](samples:akka-samples-cluster-sharding-scala)] +to see what this looks like in practice. + ## Introduction Cluster sharding is useful when you need to distribute actors across several nodes in the cluster and want to diff --git a/akka-docs/src/main/paradox/cluster-usage.md b/akka-docs/src/main/paradox/cluster-usage.md index faf82d3cf6..724a967130 100644 --- a/akka-docs/src/main/paradox/cluster-usage.md +++ b/akka-docs/src/main/paradox/cluster-usage.md @@ -16,6 +16,13 @@ To use Akka Cluster, you must add the following dependency in your project: version="$akka.version$" } +## Sample project + +You can look at the +@java[@extref[Cluster example project](samples:akka-samples-cluster-java)] +@scala[@extref[Cluster example project](samples:akka-samples-cluster-scala)] +to see what this looks like in practice. + ## When and where to use Akka Cluster An architectural choice you have to make is if you are going to use a microservices architecture or diff --git a/akka-docs/src/main/paradox/distributed-data.md b/akka-docs/src/main/paradox/distributed-data.md index 22b9b20543..6b20c4374e 100644 --- a/akka-docs/src/main/paradox/distributed-data.md +++ b/akka-docs/src/main/paradox/distributed-data.md @@ -10,6 +10,13 @@ To use Akka Distributed Data, you must add the following dependency in your proj version="$akka.version$" } +## Sample project + +You can look at the +@java[@extref[Distributed Data example project](samples:akka-samples-distributed-data-java)] +@scala[@extref[Distributed Data example project](samples:akka-samples-distributed-data-scala)] +to see what this looks like in practice. + ## Introduction *Akka Distributed Data* is useful when you need to share data between nodes in an diff --git a/akka-docs/src/main/paradox/fsm.md b/akka-docs/src/main/paradox/fsm.md index ba08754d06..1d58891174 100644 --- a/akka-docs/src/main/paradox/fsm.md +++ b/akka-docs/src/main/paradox/fsm.md @@ -10,6 +10,13 @@ To use Finite State Machine actors, you must add the following dependency in you version="$akka.version$" } +## Sample project + +You can look at the +@java[@extref[FSM example project](samples:akka-samples-fsm-java)] +@scala[@extref[FSM example project](samples:akka-samples-fsm-scala)] +to see what this looks like in practice. + ## Overview The FSM (Finite State Machine) is available as @scala[a mixin for the] @java[an abstract base class that implements an] Akka Actor and diff --git a/akka-docs/src/main/paradox/general/supervision.md b/akka-docs/src/main/paradox/general/supervision.md index d1f44a5261..8619537c7f 100644 --- a/akka-docs/src/main/paradox/general/supervision.md +++ b/akka-docs/src/main/paradox/general/supervision.md @@ -4,6 +4,12 @@ This chapter outlines the concept behind supervision, the primitives offered and their semantics. For details on how that translates into real code, please refer to the corresponding chapters for Scala and Java APIs. +## Sample project + +You can look at the +@extref[Supervision example project](samples:akka-samples-supervision-java) +to see what this looks like in practice. + ## What Supervision Means diff --git a/akka-docs/src/main/paradox/index-cluster.md b/akka-docs/src/main/paradox/index-cluster.md index 498e632591..1dc8c1c6ee 100644 --- a/akka-docs/src/main/paradox/index-cluster.md +++ b/akka-docs/src/main/paradox/index-cluster.md @@ -13,5 +13,7 @@ * [cluster-metrics](cluster-metrics.md) * [distributed-data](distributed-data.md) * [cluster-dc](cluster-dc.md) +* [multi-jvm-testing](multi-jvm-testing.md) +* [multi-node-testing](multi-node-testing.md) @@@ diff --git a/akka-docs/src/main/paradox/index-network.md b/akka-docs/src/main/paradox/index-network.md index 3a4da612e9..4b0c655844 100644 --- a/akka-docs/src/main/paradox/index-network.md +++ b/akka-docs/src/main/paradox/index-network.md @@ -11,6 +11,5 @@ * [io-tcp](io-tcp.md) * [io-udp](io-udp.md) * [camel](camel.md) -* [multi-jvm-testing](multi-jvm-testing.md) @@@ diff --git a/akka-docs/src/main/paradox/multi-node-testing.md b/akka-docs/src/main/paradox/multi-node-testing.md index 53ac1fcfa8..c417bd2573 100644 --- a/akka-docs/src/main/paradox/multi-node-testing.md +++ b/akka-docs/src/main/paradox/multi-node-testing.md @@ -10,9 +10,11 @@ To use Multi Node Testing, you must add the following dependency in your project version=$akka.version$ } -If you are using the latest nightly build you should pick a timestamped Akka version from -[https://repo.akka.io/snapshots/com/typesafe/akka/akka-multi-node-testkit_2.11/](https://repo.akka.io/snapshots/com/typesafe/akka/akka-multi-node-testkit_2.11/). -We recommend against using `SNAPSHOT` in order to obtain stable builds. +## Sample project + +You can look at the +@extref[Multi Node example project](samples:akka-samples-multi-node) +to see what this looks like in practice. ## Multi Node Testing Concepts diff --git a/akka-docs/src/main/paradox/persistence.md b/akka-docs/src/main/paradox/persistence.md index 37159c72fe..577dae7f42 100644 --- a/akka-docs/src/main/paradox/persistence.md +++ b/akka-docs/src/main/paradox/persistence.md @@ -21,6 +21,13 @@ LevelDB-based plugins will require the following additional dependency: version="1.8" } +## Sample project + +You can look at the +@java[@extref[Persistence example project](samples:akka-samples-persistence-java)] +@scala[@extref[Persistence example project](samples:akka-samples-persistence-scala)] +to see what this looks like in practice. + ## Introduction Akka persistence enables stateful actors to persist their internal state so that it can be recovered when an actor diff --git a/akka-docs/src/main/paradox/remoting-artery.md b/akka-docs/src/main/paradox/remoting-artery.md index f4b3b10407..4e4cee583f 100644 --- a/akka-docs/src/main/paradox/remoting-artery.md +++ b/akka-docs/src/main/paradox/remoting-artery.md @@ -708,12 +708,6 @@ 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. -## Remoting Sample - -You can download a ready to run @scala[@extref[remoting sample](ecs:akka-samples-remote-scala)]@java[@extref[remoting sample](ecs:akka-samples-remote-java)] -together with a tutorial for a more hands-on experience. The source code of this sample can be found in the -@scala[@extref[Akka Samples Repository](samples:akka-sample-remote-scala)]@java[@extref[Akka Samples Repository](samples:akka-sample-remote-java)]. - ## Performance tuning ### Lanes @@ -942,3 +936,8 @@ akka { } } ``` + +You can look at the +@java[@extref[Cluster with docker-compse example project](samples:akka-samples-cluster-docker-compose-java)] +@scala[@extref[Cluster with docker-compose example project](samples:akka-samples-cluster-docker-compose-scala)] +to see what this looks like in practice. diff --git a/akka-docs/src/main/paradox/remoting.md b/akka-docs/src/main/paradox/remoting.md index aa458b1bd0..fc6a9f19f6 100644 --- a/akka-docs/src/main/paradox/remoting.md +++ b/akka-docs/src/main/paradox/remoting.md @@ -358,13 +358,6 @@ 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. - -## Remoting Sample - -You can download a ready to run @scala[@extref[remoting sample](ecs:akka-samples-remote-scala)]@java[@extref[remoting sample](ecs:akka-samples-remote-java)] -together with a tutorial for a more hands-on experience. The source code of this sample can be found in the -@scala[@extref[Akka Samples Repository](samples:akka-sample-remote-scala)]@java[@extref[Akka Samples Repository](samples:akka-sample-remote-java)]. - ### Remote Events It is possible to listen to events that occur in Akka Remote, and to subscribe/unsubscribe to these events @@ -629,3 +622,8 @@ Keep in mind that local.address will most likely be in one of private network ra * *192.168.0.0 - 192.168.255.255* (network class C) For further details see [RFC 1597](https://tools.ietf.org/html/rfc1597) and [RFC 1918](https://tools.ietf.org/html/rfc1918). + +You can look at the +@java[@extref[Cluster with docker-compse example project](samples:akka-samples-cluster-docker-compose-java)] +@scala[@extref[Cluster with docker-compose example project](samples:akka-samples-cluster-docker-compose-scala)] +to see what this looks like in practice. diff --git a/build.sbt b/build.sbt index 8bab842edb..e359277e61 100644 --- a/build.sbt +++ b/build.sbt @@ -213,7 +213,7 @@ lazy val docs = akkaModule("akka-docs") "extref.akka.http.base_url" -> "http://doc.akka.io/docs/akka-http/current/%s", "extref.wikipedia.base_url" -> "https://en.wikipedia.org/wiki/%s", "extref.github.base_url" -> (GitHub.url(version.value) + "/%s"), // for links to our sources - "extref.samples.base_url" -> "https://github.com/akka/akka-samples/tree/2.5/%s", + "extref.samples.base_url" -> "https://developer.lightbend.com/start/?group=akka&project=%s", "extref.ecs.base_url" -> "https://example.lightbend.com/v1/download/%s", "scaladoc.akka.base_url" -> "https://doc.akka.io/api/akka/2.5", "scaladoc.akka.http.base_url" -> "https://doc.akka.io/api/akka-http/current",