This book is a part of Knoldus Reactive Programming Series. A few years ago, applications were much simpler and required all solutions at one place, we call them monolithic applications. Now a days markets are changing rapidly. You either adapt quickly or you go out of business. If your application is successful, you will start enhancing features day by day and as a result, your application becomes complex day by day and that complexity creates challenges in development. It will be difficult to fully understand and made changes fast and correctly. You must redeploy the entire application on each update. These type of application also has a barrier to adopting new technologies because it will affect the entire application. In this book, you will learn how you can manage this problem by dividing project into smaller pieces.
You will learn how quickly you can start transforming your monolithic application into microservices. Microservice can be developed using different programming language (Personally I don't suggest to do it). I prefer Akka HTTP because it is fully integrated into Typesafe stack. Since there are already a lot of scala frameworks to build REST APIs then the obvious question is Why Akka HTTP? There are many reasons to use Akka HTTP, which you will learn in this book.
I have written this book for those who want to start developing REST API right away and have a basic understanding of Scala. I don't exhaustively list all feature of Akka HTTP. I don't make you suffer through long and contrived example. I have tried to explain every topic of this book with short and easy to understand examples with test-cases.
Akka HTTP is available for both Java and Scala but in this book, we will go with Scala. I choose Scala because it cuts down on boilerplate and we can concentrate on the logic of our problems. In Scala, you are not limited to just object-oriented patterns to implement your code, you can bring in functional paradigms as well.
What You'll Learn
- Advantage of using Microservices architecture over monolithic
- Introduction to Akka HTTP
- Start coding in Akka HTTP
- Powerful JSON (un)marshalling support
- How to build server-side API
- How to build client-side API
- WebSocket support using Akka HTTP
By the end of the book, you will get the links of multiple sample projects of Akka HTTP.
Akka HTTP with SOLR
Akka HTTP with Slick
Akka HTTP with Neo4J
You will also get templates with frameworks like Angular.js, Spark Et al. You can clone these sample projects according to your requirement and start playing with restful web services.
Who This Book Is For
Those who want to start working on microservices architecture right away. The only pre-requisite to this book is that you are "comfortable" with Scala. However language is not a bar, even if you want to develop java microservices using Akka HTTP, you can still read this book to understand the concept. I have used the latest version of Akka HTTP in this book.
About The Author
Ayush Kumar Mishra is a Lead Scala Consultant based in Singapore. He is currently working with Knoldus, an organization where knowledge sharing and upskilling each Knolder is a way of life, which is the only organization to be partners with Lightbend, Databricks, Confluent and Datastax to deliver high-quality reactive products to its global clients. He has been working in Scala for more than 5 years. He loves to troubleshoot complex problems and look for the best solutions.
In his career, he has successfully developed and delivered various microservice based systems with Scala and Akka HTTP. When he is not programming, he writes technical blogs. Most of his blogs are related to rest api design. He has also transformed some monolithic systems into microservice based system.