Effective Akka HTTP by Johannes Rudolph
Channel: inoio gmbh
Date: 2016-11-19

Recorded on a "Reactive Systems Meetup", sponsored by http://inoio.de

Come and join our next Meetups: https://www.meetup.com/de-DE/Reactive-Systems-Hamburg/
Slides: https://talks.virtual-void.net/effective-akka-http-2016/ 

Akka HTTP is a library to integrate services over HTTP. It helps you with both the server side ofproviding REST services and also the client side of consuming HTTP services. Using Akka HTTP, the behavior of a REST service is defined using the routing DSL, a concise, composable, and typesafe DSL inherited from spray, Akka Http's predecessor. But also on the client side, Akka HTTP contains all necessary ingredients to consume HTTP based services.

Akka HTTP is built for reactive systems: its implementation is fully asynchronous and provides a streaming API based on Akka Stream distinguishing it from spray. Streams really are the fundament of Akka HTTP as awareness of backpressure is built-in throughout the stack. This has several benefits: first, it can be more efficient because buffers can be kept small. Second, and more importantly, enforcing backpressure prevents that a fast consumer can overwhelm a slow consumer. This will allow a service built on Akka Http to stay responsive under load. Third, basing Akka HTTP on Akka Stream allows you to plug HTTP functionality together with any component that exposes a Reactive Streams or Akka Stream API while maintaining backpressure throughout the pipeline.

Nevertheless, experience has shown that mastering Akka HTTP's API with all its power can be challenging. This has been amplified by the use of streams which can be an unexpected source of nondeterminism the programmer is now forced to deal with.


In this talk, I want to give a short introduction to Akka HTTP. The focus is then on using it effectively, exploring a few common pitfalls and discussing best practices of building and consuming services with Akka HTTP.