Process overview

Specify service interface and domain model

Akka Serverless components include stateful Entities and stateless Actions. You define the service interface and—​for Entities—​the domain data model, in .proto files as gRPC descriptors. Separating the service interface and data model in different files allows you to evolve them independently.

The gRPC definitions describe the external interface, messages, and events. From the .proto files, the gRPC CLI, protoc, generates the code framework for remote procedure calls, data access, and serialization.

To help you get started, we provide code generation tools that generate a service. The Writing gRPC descriptor pages for JavaScript and Java provide more information on defining messages and events.

Implement components

Stateful services can implement Value Entity or Event Sourced Entity components and stateless services implement Actions. Typically, a stateful service should only have one Entity type, but can also include Actions.


Actions are stateless functions that can be triggered by gRPC or HTTP calls. They can also subscribe to published events, and they can send commands to other services based on the events they receive.

See more information on writing Actions in JavaScript or in Java.


For stateful services, you implement Value Entities or Event Sourced Entities that contain your business logic. At runtime, command messages will invoke operations on Entities. A command may only act on one Entity at a time. If you would like to update multiple Entities from a single command, you can use forwarding and effects.

Services can interact asynchronously with other services and with external systems. Event Sourced Entities emit events to a journal, to which other services can subscribe. By configuring your own publish/subscribe (pub/sub) mechanism, any service can publish their own events and subscribe to events published by other services or external systems.

Find more details and examples for developing:

Create unit tests

It is good practice to write unit tests as you implement your services.

Package service

You will use Docker to package your service and any of its dependencies. See the following pages for more information:

Run locally

You can test and debug your services by running them locally before deploying to Akka Serverless.

Deploy to Akka Serverless

After testing locally, deploy your service to Akka Serverless using the CLI or the Console. The following pages provide information about deployment: