Book Image

Akka Cookbook

By : Vivek Mishra, Héctor Veiga Ortiz
Book Image

Akka Cookbook

By: Vivek Mishra, Héctor Veiga Ortiz

Overview of this book

Akka is an open source toolkit that simplifies the construction of distributed and concurrent applications on the JVM. This book will teach you how to develop reactive applications in Scala using the Akka framework. This book will show you how to build concurrent, scalable, and reactive applications in Akka. You will see how to create high performance applications, extend applications, build microservices with Lagom, and more. We will explore Akka's actor model and show you how to incorporate concurrency into your applications. The book puts a special emphasis on performance improvement and how to make an application available for users. We also make a special mention of message routing and construction. By the end of this book, you will be able to create a high-performing Scala application using the Akka framework.
Table of Contents (18 chapters)
Title Page
About the Authors
About the Reviewer
Customer Feedback

Packaging and deploying the Akka standalone application

After developing any application, we package it as a distribution/assembly to run on any platform. In this trick, you will learn how to package an Akka application into a distribution and how to deploy it to run as a standalone application.

Getting ready

We will use the SBT assembly plugin to package the application into a fat jar. Just import the Hello-Akka project into the IDE. We are assuming that you have a working knowledge of SBT and its assembly plugin.

How to do it…

  1. For every SBT project, we have an assembly.sbt file in the project's project folder. If the file is not present, then we create one.



  1. Add the SBT assembly plugin dependency in the file:
        addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
  1. Now go to the project root directory and run the sbt update command from the command line and it will download the plugin dependency jar.
  2. Now go to the project root directory and run the sbt assembly command to package the...