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
|
|
|
|
|
|
2020-05-06 15:02:12 +02:00
|
|
|
@scala[[Quickstart Guide](https://developer.lightbend.com/guides/akka-quickstart-scala/)]
|
|
|
|
|
@java[[Quickstart Guide](https://developer.lightbend.com/guides/akka-quickstart-java/)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@java[@extref[FSM example project](samples:pekko-samples-fsm-java)]
|
|
|
|
|
@scala[@extref[FSM example project](samples:pekko-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
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@java[@extref[Cluster example project](samples:pekko-samples-cluster-java)]
|
|
|
|
|
@scala[@extref[Cluster example project](samples:pekko-samples-cluster-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@java[@extref[Distributed Data example project](samples:pekko-samples-distributed-data-java)]
|
|
|
|
|
@scala[@extref[Distributed Data example project](samples:pekko-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
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@java[@extref[Sharding example project](samples:pekko-samples-cluster-sharding-java)]
|
|
|
|
|
@scala[@extref[Sharding example project](samples:pekko-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
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@java[@extref[Persistence example project](samples:pekko-samples-persistence-java)]
|
|
|
|
|
@scala[@extref[Persistence example project](samples:pekko-samples-persistence-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
This project contains a Shopping Cart sample illustrating how to use Pekko Persistence.
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
## CQRS
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
The @extref[Microservices with Pekko tutorial](platform-guide:microservices-tutorial/) contains a
|
2020-11-30 20:00:39 +01:00
|
|
|
Shopping Cart sample illustrating how to use Event Sourcing and Projections together. The events are
|
|
|
|
|
tagged to be consumed by even processors to build other representations from the events, or publish the events
|
|
|
|
|
to other services.
|
2019-11-06 08:00:40 +01:00
|
|
|
|
2020-09-08 08:29:28 +02:00
|
|
|
## Replicated Event Sourcing
|
2019-11-06 08:00:40 +01:00
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@java[@extref[Multi-DC Persistence example project](samples:pekko-samples-persistence-dc-java)]
|
|
|
|
|
@scala[@extref[Multi-DC Persistence example project](samples:pekko-samples-persistence-dc-scala)]
|
2020-09-08 08:29:28 +02:00
|
|
|
|
|
|
|
|
Illustrates how to use @ref:[Replicated Event Sourcing](../typed/replicated-eventsourcing.md) that supports
|
|
|
|
|
active-active persistent entities across data centers.
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
## Cluster with Docker
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@java[@extref[Cluster with docker-compose example project](samples:pekko-sample-cluster-docker-compose-java)]
|
|
|
|
|
@scala[@extref[Cluster with docker-compose example project](samples:pekko-sample-cluster-docker-compose-scala)]
|
2019-11-06 08:00:40 +01:00
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
Illustrates how to use Pekko Cluster with Docker compose.
|
2019-11-06 08:00:40 +01:00
|
|
|
|
|
|
|
|
## Cluster with Kubernetes
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@extref[Cluster with Kubernetes example project](samples:pekko-sample-cluster-kubernetes-java)
|
2019-11-06 08:00:40 +01:00
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
This sample illustrates how to form an Pekko Cluster with Pekko Bootstrap when running in Kubernetes.
|
2020-01-22 12:57:07 +00:00
|
|
|
|
|
|
|
|
## Distributed workers
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@extref[Distributed workers example project](samples:pekko-samples-distributed-workers-scala)
|
2020-01-22 12:57:07 +00:00
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
This project demonstrates the work pulling pattern using Pekko Cluster.
|
2020-01-24 12:14:02 +00:00
|
|
|
|
|
|
|
|
## Kafka to Cluster Sharding
|
|
|
|
|
|
2023-01-18 08:13:01 +01:00
|
|
|
@extref[Kafka to Cluster Sharding example project](samples:pekko-samples-kafka-to-sharding)
|
2020-01-24 12:14:02 +00:00
|
|
|
|
|
|
|
|
This project demonstrates how to use the External Shard Allocation strategy to co-locate the consumption of Kafka
|
|
|
|
|
partitions with the shard that processes the messages.
|
|
|
|
|
|
|
|
|
|
|