Wednesday, February 4, 2015

Building a REST service in Scala with Akka HTTP, Akka Streams and reactive mongo

At the end of last year I wrote a couple of articles that showed how you can use to create a Scala based REST service () and how to create a websocket server with Scala, Akka and reactivemongo (). I wanted to explore the REST server part a bit more, but found out that at the end of 2013 was acquired by typesafe, and would be integrated with the Akka stack. So in this article we'll look at how you can use the Akka HTTP functionality to create a simple web server, and in a follow up we'll look at how the routing from was ported to Akka.

In this article we'll take the following steps:

  • Get some dummy data into mongoDB for testing. 
  • Create a server using Akka Http that uses a simple asynchronous handler to process requests. 
  • Create a server which uses a custom flow graph to process incoming requests. 
  • Test both of these servers with a http client also created with Akka-Http.
Read more here

Leave a Reply

All Tech News IN © 2011 & Main Blogger .