Section 1: Set up your development environment
Select your preferred language (Java/Scala) above.
To follow tutorial steps you will need a code editor, a build tool, and
grpcurl (a CLI for sending gRPC calls). You can use your preferred code editor. We provide the steps for using IntelliJ IDEA from JetBrains. For the Scala Java version of the example, we use
Apache Maven as the build tool.
This tutorial uses a PostgresSQL database and Kafka. You may run local installations during development, but we recommend running both services using Docker . The template project’s root directory includes a Docker Compose file that you can use to run PostgresSQL and Kafka. The provided Docker Compose file also runs Zookeeper which is required to run a Kafka broker.
The following sections provide links for downloading and installing:
We also provide Downloadable example source of the different phases of completion.
The video based Akka Workshop Series series covers the details of setting up your development environment.
For the Java Shopping Cart example, we use
Mavenas the build tool. Install Maven if you haven’t already.
For the Scala Shopping Cart example, we use
sbtas the build tool. Install sbt if you haven’t already.
sbtis an interactive shell. If you start it with the
sbtcommand, you can repeatedly run tasks like
testin the sbt shell. In the tutorial we use the full command for clarity, such as
sbt compile. You can run tasks independently in this way, but it’s faster to leave the
sbtshell running and only enter the tasks. For example:
$ sbt ... sbt:shopping-cart-service> compile ... sbt:shopping-cart-service> test ...
We encourage you to enter the example code, even if by copying and pasting. If you get stuck or prefer to skip some main steps, we provide source files for download. The introduction of each page with tutorial development steps includes links to two zip files: one with completed source up to that point, and one with completed source for the steps described on that page.
In next step you will find instructions of how to download the starting template for the tutorial.
If you would like to run the full example, you can download the full Java sources. In this case, we suggest you scan the tutorial instructions to identify the source files that you can learn from.
If you would like to run the full example, you can download the full Scala sources. In this case, we suggest you scan the tutorial instructions to identify the source files that you can learn from.