2019-11-06 08:00:40 +01:00
|
|
|
# Example projects
|
|
|
|
|
|
|
|
|
|
The following example projects can be downloaded. They contain build files and have instructions
|
|
|
|
|
of how to run.
|
|
|
|
|
|
|
|
|
|
## Quickstart
|
|
|
|
|
|
|
|
|
|
@scala[[Quickstart Guide](https://developer.lightbend.com/guides/akka-quickstart-scala)]
|
|
|
|
|
@java[[Quickstart Guide](https://developer.lightbend.com/guides/akka-quickstart-java)]
|
|
|
|
|
|
|
|
|
|
The *Quickstart* guide walks you through example code that introduces how to define actor systems, actors, and
|
|
|
|
|
messages as well as how to use the test module and logging.
|
|
|
|
|
|
|
|
|
|
## FSM
|
|
|
|
|
|
2019-11-18 11:23:28 +02:00
|
|
|
@java[@extref[FSM example project](samples:akka-samples-fsm-java)]
|
|
|
|
|
@scala[@extref[FSM example project](samples:akka-samples-fsm-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
This project contains a Dining Hakkers sample illustrating how to model a Finite State Machine (FSM) with actors.
|
|
|
|
|
|
|
|
|
|
## Cluster
|
|
|
|
|
|
|
|
|
|
@java[@extref[Cluster example project](samples:akka-samples-cluster-java)]
|
|
|
|
|
@scala[@extref[Cluster example project](samples:akka-samples-cluster-scala)]
|
|
|
|
|
|
|
|
|
|
This project contains samples illustrating different Cluster features, such as
|
|
|
|
|
subscribing to cluster membership events, and sending messages to actors running on nodes in the cluster
|
|
|
|
|
with Cluster aware routers.
|
|
|
|
|
|
|
|
|
|
It also includes Multi JVM Testing with the `sbt-multi-jvm` plugin.
|
|
|
|
|
|
|
|
|
|
## Distributed Data
|
|
|
|
|
|
2019-11-18 11:23:28 +02:00
|
|
|
@java[@extref[Distributed Data example project](samples:akka-samples-distributed-data-java)]
|
|
|
|
|
@scala[@extref[Distributed Data example project](samples:akka-samples-distributed-data-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
This project contains several samples illustrating how to use Distributed Data.
|
|
|
|
|
|
|
|
|
|
## Cluster Sharding
|
|
|
|
|
|
2019-11-18 11:23:28 +02:00
|
|
|
@java[@extref[Sharding example project](samples:akka-samples-cluster-sharding-java)]
|
|
|
|
|
@scala[@extref[Sharding example project](samples:akka-samples-cluster-sharding-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
This project contains a KillrWeather sample illustrating how to use Cluster Sharding.
|
|
|
|
|
|
|
|
|
|
## Persistence
|
|
|
|
|
|
2019-11-18 11:23:28 +02:00
|
|
|
@java[@extref[Persistence example project](samples:akka-samples-persistence-java)]
|
|
|
|
|
@scala[@extref[Persistence example project](samples:akka-samples-persistence-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
This project contains a Shopping Cart sample illustrating how to use Akka Persistence.
|
|
|
|
|
|
|
|
|
|
## CQRS
|
|
|
|
|
|
2019-11-18 11:23:28 +02:00
|
|
|
@java[@extref[CQRS example project](samples:akka-samples-cqrs-java)]
|
|
|
|
|
@scala[@extref[CQRS example project](samples:akka-samples-cqrs-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
This project contains a Shopping Cart sample illustrating how to use Akka Persistence.
|
|
|
|
|
The events are tagged to be consumed by even processors to build other representations
|
|
|
|
|
from the events, or publish the events to other services.
|
|
|
|
|
|
|
|
|
|
## Multi-DC Persistence
|
|
|
|
|
|
2019-11-18 11:23:28 +02:00
|
|
|
@java[@extref[Multi-DC Persistence example project](samples:akka-samples-persistence-dc-java)]
|
|
|
|
|
@scala[@extref[Multi-DC Persistence example project](samples:akka-samples-persistence-dc-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
Illustrates how to use Lightbend's [Multi-DC Persistence](https://doc.akka.io/docs/akka-enhancements/current/persistence-dc/index.html)
|
|
|
|
|
with active-active persistent entities across data centers.
|
|
|
|
|
|
|
|
|
|
## Cluster with Docker
|
|
|
|
|
|
|
|
|
|
@java[@extref[Cluster with docker-compse example project](samples:akka-sample-cluster-docker-compose-java)]
|
|
|
|
|
@scala[@extref[Cluster with docker-compose example project](samples:akka-sample-cluster-docker-compose-scala)]
|
|
|
|
|
|
|
|
|
|
Illustrates how to use Akka Cluster with Docker compose.
|
|
|
|
|
|
|
|
|
|
## Cluster with Kubernetes
|
|
|
|
|
|
|
|
|
|
@extref[Cluster with Kubernetes example project](samples:akka-sample-cluster-kubernetes-java)
|
|
|
|
|
|
|
|
|
|
This sample illustrates how to form an Akka Cluster with Akka Bootstrap when running in Kubernetes.
|
2020-01-22 12:57:07 +00:00
|
|
|
|
|
|
|
|
## Distributed workers
|
|
|
|
|
|
|
|
|
|
@extref[Distributed workers example project](samples:akka-samples-distributed-workers-scala)
|
|
|
|
|
|
|
|
|
|
This project demonstrates the work pulling pattern using Akka Cluster.
|