Author: Shradha Saxena

Dependency Injection in Springboot

Reading Time: 2 minutes What is Dependency Injection? It helps in injecting one object into another object Make it easy to do loose coupling Managing and testing the code becomes easy Removes dependency from the program and provides information externally Consider an example: class Student { Marks marks; Student(Marks marks){ this.marks=marks; } public void setMarks(Marks marks){ this.marks=marks; } } Here the instance of Marks class is provided externally That Continue Reading

java concurrency

Project Loom: Threads Vs Virtual Threads

Reading Time: 2 minutes If you’d like to create a large number of processes in a cheap way, these processes must run in a concurrent way so that a scale is achieved for a large number of requests processing. To understand in which scenario the Thread needs to scale, let us look at an example below. Concurrency Example HTTP requests processing messages from the queue integrating external services orchestrating Continue Reading

JUnit and Mockito

Reading Time: 3 minutes This blog will explain to you the unit testing with the Junit framework Unit Testing It is a software testing technique in which we test individual components/parts of the software, i.e., a group of computer programs, usage procedures, etc. We do unit testing of an object while developing an application or project. The aim of unit testing is to isolate a segment of code (unit) Continue Reading

Git Merge Vs Rebase

Reading Time: 3 minutes There is always a question in everyone’s mind what to choose between merge and rebase!!This blog might help you to get such answers The first thing to understand about git rebase is that it solves the same problem as git merge. Both of these commands are designed to integrate changes from one branch to another branch– they just do it in very different ways. Consider Continue Reading

Demystifying Dispatchers in Akka

Reading Time: 2 minutes As the name suggests ‘dispatch‘ decides when the actor should dispatch a message and when it does not have to. In the situation in which you think that your actor system must get faster but it’s not working as per expectation then dispatchers are the first place, you should look at. It’s up to the Dispatchers to decide when to allow the actor to process Continue Reading

Scheduling Messages in Akka

Reading Time: 2 minutes Take a situation where you want to make an actor sleep and it should resume after a period of time. Or you want your actor to perform a task on a recurring basis then you must schedule a message. Here I will discuss how to do that !! Scheduled delivery of messages Often, a need exists to schedule the sending of a message to an Continue Reading

Understanding Akka Actor Lifecycle

Reading Time: 3 minutes So, here is a glimpse of how an Akka Actor Lifecycle works. The actor lifecycle begins as soon as the actor is created. The stages of an Akka Actor Lifecycle are as follows – preStart() Start Stop postStop() terminated Starting Actors Creating an actor automatically starts it. A started actor is fully operable. We can start an Actor with a preStart() hook. And for more Continue Reading