Working with Akka Serverless

Akka Serverless allows you to focus on what is important to you—​writing your code:

  • Akka Serverless SDKs provide service development APIs that:

    • Leverage gRPC for high-performance communication between services with language-neutral serialization.

    • Allow you to code in the language of choice. Code generation tools are available for Java and Javascript.

    • Offer a choice of state models that support a variety of use cases.

  • The Akka Serverless hosted environment provides:

    • A deployment platform that includes integrated logging and monitoring.

    • Runtime state management that ensures responsiveness, resilience, and elasticity.

    • Two interfaces for working with your services and projects—​the browser-based console, and the akkasls command line tool:


Use your programming language of choice

Akka Serverless uses gRPC, which is not tied to any programming language, for communication between services. Lightbend maintains and supports SDKs for Java and JavaScript. See Language support SDKs for more information on our support policy.

The Open Source community has developed SDKs for the following languages:

  • Dart

  • Go

  • Kotlin

To write your business logic, you will need to know how to code in your chosen language. However, you will not need to learn a substantially different paradigm for using that language: The API for Akka Serverless SDKs are compact and straightforward.

The development process

Development tasks include:

  • Design Akka Serverless services by identifying which type of components and state model you will use. Similar to a microservice, each Akka Serverless service is a unit of functionality that can contain components: stateless Actions, stateful Entities, and Entity Views. For an introduction to these components, see What is an Akka Serverless service?.

  • Set up your development project using your favorite IDE or editor. We offer code generation tools for JavaScript and Java that create the appropriate project structure for a service, generate a starter service, and support you through development.

  • Define the messages that will invoke your service over gRPC using Protocol Buffers new tab. gRPC is a language-agnostic open-source framework for communications between services. It is not necessary for you to learn the details of gRPC, or how to write gRPC clients in your language of choice, but you might find it helpful to get a general understanding of how gRPC works.

  • Use a gRPC compiler to generate the service and client interfaces.

  • Code your Component business logic.

  • Package your services in container images. How you create the container for your service depends on the language and build tools you use. After packaging, publish the container images to a registry. To deploy to Akka Serverless, you must provide access to the registry containing your images.

  • Set up your Akka Serverless deployment project using the Console or the akkasls CLI. You can add multiple container images to one project.

  • Iterate.

The following image illustrates the tasks you perform and shows what Akka Serverless does for you:


The deployment runtime

Akka Serverless provides a scalable, fully-managed cloud platform for your services. The diagram below illustrates an Akka Serverless project at runtime. Akka Serverless has scaled the deployed services into clusters to handle demand. The exploded service shows the proxy, which manages communication and persistence and includes your service container image.

An Akka Serverless project

Development project to deployment project

During the development and deployment process, a service moves through three environments: the development project, which contains the source code and tests, and can be hosted on any source control system; a container registry where you publish the packaged image; and the deployment project on Akka Serverless, where Akka Serverless runs the container image.