you
welcome to section eight working with
akka HTTP in the previous section we
were working with a curse streams we
have looked into the main parts annika
streams sources flows and sinks and we
were working with graphs and stream I oh
and finally we tested them in this
section we will introduce another module
of akka akka HTTP we'll do a quick
introduction to the aqha HTTP module and
work with the client-side and
server-side api's we will then implement
a restful api server and introduce
testing let's start with the first intro
video first we'll look at how the HTTP
module fits into the aqha ecosystem and
then we'll see which modules it itself
is composed of let's start acha is a
toolkit for building highly concurrent
and distributed applications when you
think about distribution you think about
how to integrate the stuff that we've
just distributed if you want to
distribute your application across
threads acha gives you actors and when
you want to distribute your application
across machines acha gives you a cluster
and akka remoting when your application
wants to interact with external services
akka gives you a key HTTP since HTTP is
the de facto standard of many web-based
applications and the whole world talks
using this protocol it makes sense when
you want to talk to the external world
you use HTTP module acha HTTP isn't a
web framework it's a toolkit for
providing and consuming HTTP based
services this means the main goal of
akka HTTP is to integrate your
application with the external world and
if you think about implementing the web
application that has a lot of views it
needs to prepare assets such as images
that can press JavaScript and CSS and so
on thus it is better to choose the web
framework play rather than occur HTTP
the akka HTTP module is implemented on
top of extremes which are implemented on
top of a key actors each layer provides
additional capabilities and all limit
to what you can do with them it has a
full server and client side HTTP 1.1
stack in other words if you want to talk
with the external service you will need
to use a client-side API and if you want
to provide a service to the world you
will need to use a server-side API acha
HTTP is structured into several modules
acha HTTP core which contains a complete
low level for server and client side
implementation of HTTP such as a
connection and TLS management acha HTTP
which contains higher level
functionality such as marshalling
compression decompression as well as a
powerful routing dsl for defining
http-based ap is on the server side acha
HTTP test kit which contains a set of
utilities for verifying server side
service implementations next we have a
cat HTTP spray Jason which contains a
predefined glue code for serializing and
deserializing custom types from and to
Jason with spray Jason it is possible to
use acha HTTP with other Jason
serializes and there exist community
projects providing these integrations if
you prefer to use something other than
sprays JSON library which is very fast
that requires a bit of coding to set up
lastly we have a cat HTTP XML which
contains a predefined glue code for
serializing and deserialising custom
types from and to XML with Scarlett XML
at the end of the first video on acha
HTTP we just introduced acha HTTP module
and its structure