There could be some features in our application where we would be doing time-consuming operations. For those requests, we don’t want to hold our users to wait till their completion. How do we serve these requests? We take these requests in an async manner and tell our users that your request is received successfully and you will get notified once it is completed. Please follow the request tracker to check the live status of your request. It means we are storing the request and its status somewhere to give the updates to our users.

What happens to the running requests when the application gets shut down?

The running requests will be in…


There are many tutorials or blogs available to read about how to make a connection to the Cassandra database in a Springboot application using JPA maven dependency. Here is one of the tutorials from the Spring.

There is not much to do to write a Springboot application with the Cassandra database. There are 7 properties that need to be defined in the application.properties file and use @Repository annotation on an interface that extends CassandraRepository and we are almost done with our implementation required for Cassandra. …


Vavr(earlier known as SlangJava), is a functional library that helps to write code in Java using functional style as we write in Scala/JavaScript. It helps to reduce the amount of code and to increase robustness. Whenever we think about functional programming, Immutability is the first thing that comes to our mind. Vavr provides immutable collections and the functions that operate on these collections to fetch the desired results.

In Functional programming, Errors (or exceptions that are non-local goto statements) are not thrown instead they are also passed on to the very first method of the pipeline along with successful results…


Azure Blob storage is Microsoft’s object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that doesn’t adhere to a particular data model or definition, such as text or binary data. Any file, image, text can be uploaded to blob store.

There could be some scenarios where data need to be encrypted before getting uploaded to blob store. …


We already have POI utilities provided by Apache to write/read an excel file in Java. If there are less than 50K rows to be inserted in a file, any excel utility can be used. But, when we have a use-case to insert a million rows in an excel file, we need to look at the utilities to find the best one for our use-case.

Let’s take an example to understand it better. Suppose our Java application generates a report for the documents queried from Elasticsearch by a user. The given query has 1 million documents to be returned, so the…


Every Java application requires memory to run on JVM. This memory is taken from the available RAM of the system where the application is running. There are 2 kinds of memory: Stack and Heap.

Stack

It is the region of the RAM which is used to store the temporary variables or primitive data types in Java. It also stores the references for the objects that are physically created in heap.

It stores the variables created by the functions in the Last-in-First-out (LIFO) format and frees all the allocated memory when the function exits.

The stack is managed for each thread in…


Kafka is an open-source stream processing platform. It is developed to provide high throughput and low latency to handle real-time data.

Before we read about how to make our Kafka producer/consumer production-ready, Let’s first understand the basic terminologies of Kafka.

Kafka topic: It refers to a family or name to store a specific kind of message or a particular stream of data. A topic contains messages of a similar kind.

Kafka partition: A topic can be partitioned into one or more partitions. It is again to segregate the messages from one topic into multiple buckets. …


We live in an era where applications run on a huge volume. To make our applications search-efficient and space-economic, we need to truncate the aged data from the data store. Removing old data helps in reducing the search space where the query will be running to retrieve the results plus requires less hardware to store the documents. Removing an individual document from an Elasticsearch index is quite an expensive operation. Elasticsearch provides a better way to achieve this. …


We learned about Docker in this article how Docker helps us to have an easy and efficient deployment of an application. Dockers are scalable, but it requires a manual effort to achieve it. There are some problems we encounter if we don't use any docker container orchestrator.

  1. Containers could not communicate with each other.
  2. Traffic distribution becomes a big problem.
  3. Container management is overhead to manage the cluster manually.
  4. Auto-scaling is not possible.

In a production environment, we really need to think about these problems to have a robust, highly available, economical application. Here containers orchestrator comes to rescue us…


Java is a nice language that offers sequential, parallel, and asynchronous programming by creating lightweight processes (known as Threads) programmatically. It helps us to write an efficient program to achieve something.

Let’s first understand what are these 3 ways of a program?

  1. Sequential program: A list of N tasks is given, the program picks each of those tasks sequentially and performs some action. Suppose each task takes 1 second to complete, then our sequential program will take N seconds to complete.
  2. Parallel program: We are not happy with the sequential program and we want to improve its performance, here parallel…

Shivanshu Goyal

Software Engineer @Walmartlabs, India

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store