Author: Utkarsha Musmade

Achieving Concurrency with Akka Actors

Reading Time: 3 minutes Java comes with a built-in multi-threading model based on shared data and locks. To use this model, you decide what data will be shared by multiple threads and mark as “synchronized” sections of the code that access the shared data. It also provides a locking mechanism to ensure that only one thread can access the shared data at a time. Lock operations remove possibilities for Continue Reading

Authorization using JWT

Reading Time: 3 minutes In this blog, we will discuss how to implement Akka HTTP authorization using JWT. So first let’s see what is JWT. What is JWT JSON Web Token (JWT) defines a compact and self-contained way for securely transmitting information between parties as a JSON object. The token is mainly composed of header, payload, signature. These three parts are separated by dots(.). The header contains a hashing Continue Reading

Twitter Future in scala

Reading Time: 2 minutes When we want a simple way to run one or more tasks concurrently in a Scala application. Including a way to handle their results when the tasks finish then we use the scala future. In this blog, we are going to discuss Twitter Future. Twitter futures are more explicit about where computations are executed than the Scala standard library futures. This approach has several advantages over Continue Reading

Integration testing using H2Database

Reading Time: 3 minutes Need of Integration Testing For doing unit tests, We use to do mocking. Consider we call getUser(), it calls the DAO that’s been mocked and returns “John” for the name and “21” for the age, assembles them and everything is perfect. No need to actually unit test a database there.What if there is any bug in database operations. If you mocked the database you can Continue Reading

Marshalling/Unmarshalling in Akka HTTP

Reading Time: 4 minutes In this blog we are going to discuss about Marshalling/Unmarshalling in Akka HTTP. Before discussing it lets have a look at Akka HTTP. Akka HTTP  offers a toolkit for providing and consuming HTTP-based services. The Akka HTTP modules implement a full server- and client-side HTTP. It provides client-side and server-side API to send HTTP requests and HTTP responses.To transfer data over the network, we need Continue Reading