Posts

Showing posts with the label Asynchronous Processing

REST API using Play Framework with Java

Image
REST API using Play Framework with Java Introduction           In the latest Play 2.6 release, they have decided not to support Activator. I was searching online for a basic application in the latest  Play 2.6 release . But I could not find any post or tutorial . Hence I decided to come up with this post.   In this post, we will be creating an Application using Play Framework in Java with GET, POST, PUT and DELETE APIs for CRUD operations on an Employee Entity class. To keep things simple, all data will be kept in memory in a simple map. Play as a framework does support UI as well, however in this tutorial we will be focusing only on the services part and not the UI. Play Framework                 Play Framework is built on Akka and is based on a lightweight, stateless, web-friendly architecture. Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalab...

REST API and CRUD Operations with Akka HTTP

Image
REST API and CRUD Operations with Akka HTTP Introduction         In this post, we will be creating an Akka HTTP Application with GET, POST, PUT and DELETE APIs for CRUD operations on an Employee Domain class. All data will be kept in memory in a Vector. Akka HTTP         The Akka HTTP modules implement a full server- and client-side HTTP stack on top of akka-actor and akka-stream. It’s not a web-framework but rather a more general toolkit for providing and consuming HTTP-based services.  Most important features that Akka HTTP provides are:                Asynchronous processing  Non blocking I/O operations  For more details on Akka HTTP, you can check: Akka HTTP Website . Requirements to Run the Application: 1. Intellij IDE with SBT and Scala Plugins In this tutorial I will help you to build an Akka HTTP Application in a few simple steps. Step 1: Dependencies ...

Asynchronous Processing (@Async) in Spring Boot

Image
Asynchronous   Processing (@Async) in Spring Boot Introduction       I am assuming that you have a Basic Knowledge of Spring Boot and have a Basic Spring Boot Application running in your machine. If not, please check my blog on Basic Spring Boot Application by going to the link:  Spring Boot Tutorial In this tutorial, we will be creating a Spring Boot Application which has the ability to perform Asynchronous Processing Requirements to Run the Application: Java Maven IDE of your choice Once you have a Basic Spring Boot Application, here are the additional steps required to add  the ability to perform Asynchronous Processing. Step 1: Add  @EnableAsync annotation and Add TaskExecutor Bean to Application Class      @EnableAsync annotation turns on Spring’s ability to run @Async methods in a background thread pool. This class customizes the used TaskExecutor. Here I am limiting the number of concurrent threads to 3 an...