Link to sample projects

This commit is contained in:
Arnout Engelen 2018-08-28 16:10:20 +02:00
parent 4456d7752b
commit 91cbd6ed99
14 changed files with 70 additions and 25 deletions

View file

@ -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, 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) 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 You can look at the
["akka-docker-cluster" sample](https://github.com/muuki88/activator-akka-docker). @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.

View file

@ -10,6 +10,12 @@ To use Akka in OSGi, you must add the following dependency in your project:
version=$akka.version$ 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 ## Background
[OSGi](http://www.osgi.org/developer) is a mature packaging and deployment standard for component-based systems. It [OSGi](http://www.osgi.org/developer) is a mature packaging and deployment standard for component-based systems. It
@ -111,7 +117,3 @@ 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 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 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. 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)

View file

@ -10,6 +10,13 @@ To use Cluster Sharding, you must add the following dependency in your project:
version=$akka.version$ 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 ## Introduction
Cluster sharding is useful when you need to distribute actors across several nodes in the cluster and want to Cluster sharding is useful when you need to distribute actors across several nodes in the cluster and want to

View file

@ -16,6 +16,13 @@ To use Akka Cluster, you must add the following dependency in your project:
version="$akka.version$" 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 ## 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 An architectural choice you have to make is if you are going to use a microservices architecture or

View file

@ -10,6 +10,13 @@ To use Akka Distributed Data, you must add the following dependency in your proj
version="$akka.version$" 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 ## Introduction
*Akka Distributed Data* is useful when you need to share data between nodes in an *Akka Distributed Data* is useful when you need to share data between nodes in an

View file

@ -10,6 +10,13 @@ To use Finite State Machine actors, you must add the following dependency in you
version="$akka.version$" 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 ## 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 The FSM (Finite State Machine) is available as @scala[a mixin for the] @java[an abstract base class that implements an] Akka Actor and

View file

@ -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 and their semantics. For details on how that translates into real code, please
refer to the corresponding chapters for Scala and Java APIs. 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.
<a id="supervision-directives"></a> <a id="supervision-directives"></a>
## What Supervision Means ## What Supervision Means

View file

@ -13,5 +13,7 @@
* [cluster-metrics](cluster-metrics.md) * [cluster-metrics](cluster-metrics.md)
* [distributed-data](distributed-data.md) * [distributed-data](distributed-data.md)
* [cluster-dc](cluster-dc.md) * [cluster-dc](cluster-dc.md)
* [multi-jvm-testing](multi-jvm-testing.md)
* [multi-node-testing](multi-node-testing.md)
@@@ @@@

View file

@ -11,6 +11,5 @@
* [io-tcp](io-tcp.md) * [io-tcp](io-tcp.md)
* [io-udp](io-udp.md) * [io-udp](io-udp.md)
* [camel](camel.md) * [camel](camel.md)
* [multi-jvm-testing](multi-jvm-testing.md)
@@@ @@@

View file

@ -10,9 +10,11 @@ To use Multi Node Testing, you must add the following dependency in your project
version=$akka.version$ version=$akka.version$
} }
If you are using the latest nightly build you should pick a timestamped Akka version from ## Sample project
[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. 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 ## Multi Node Testing Concepts

View file

@ -21,6 +21,13 @@ LevelDB-based plugins will require the following additional dependency:
version="1.8" 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 ## Introduction
Akka persistence enables stateful actors to persist their internal state so that it can be recovered when an actor Akka persistence enables stateful actors to persist their internal state so that it can be recovered when an actor

View file

@ -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. It requires that you create the destination actors on the remote nodes with matching paths.
That is not done by the router. 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 ## Performance tuning
### Lanes ### 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.

View file

@ -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. It requires that you create the destination actors on the remote nodes with matching paths.
That is not done by the router. That is not done by the router.
<a id="remote-sample"></a>
## 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 ### Remote Events
It is possible to listen to events that occur in Akka Remote, and to subscribe/unsubscribe to these 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) * *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). 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.

View file

@ -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.akka.http.base_url" -> "http://doc.akka.io/docs/akka-http/current/%s",
"extref.wikipedia.base_url" -> "https://en.wikipedia.org/wiki/%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.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", "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.base_url" -> "https://doc.akka.io/api/akka/2.5",
"scaladoc.akka.http.base_url" -> "https://doc.akka.io/api/akka-http/current", "scaladoc.akka.http.base_url" -> "https://doc.akka.io/api/akka-http/current",