Chapter 2. Up and running


In this chapter

  • Fetching a project template
  • Building a minimal Akka app for the cloud
  • Deploying to Heroku

Our goal here is to show you how quickly you can make an Akka app that not only does something nontrivial, but is built to do it to scale, even in its easiest, early incarnations. We’ll clone a project from that contains our example, and then we’ll walk through the essentials that you need to know to start building Akka apps. First we’ll look at the dependencies that you need for a minimal app, using Lightbend’s Simple Build Tool (sbt) to create a single JAR file that can be used to run the app. We’ll build a minimal ticket-selling app, and in its first iteration we’ll build a minimal set of REST services. We’ll keep it as simple as possible to focus on essential Akka features. Finally we’ll show you how easy it is to deploy this app to the cloud and get it working on Heroku, a popular cloud provider. What will be most remarkable is how quickly we get to this point!

One of the most exciting things about Akka is how easy it is to get up and running, and how flexible it is, given its small footprint runtime, as you’ll soon see. We’ll ignore some of the infrastructure details, and chapter 12 will go into more detail on how to use Akka HTTP, but you’ll leave this chapter with enough information to build serious REST interfaces of all types. You’ll see in the next chapter how we can combine this with TDD (test-driven development).

2.1. Clone, build, and test interface

2.2. Explore the actors in the app

2.3. Into the cloud

2.4. Summary