REST APIs are used to access and manipulate data using a common set of stateless operations. Let’s make them robust

Male coding at desk
Male coding at desk
Photo by Nubelson Fernandes on Unsplash

Application programming interfaces (APIs) are everywhere. Most modern web applications expose APIs that clients can use to interact with the application.

They enable software to communicate with other pieces of software — internal or external — consistently, which is a key ingredient in scalability, not to mention reusability.

Like any technology, REST APIs bring their own unique security challenges. The question that remains is how to reduce those vulnerabilities.

Today we will discuss the following topics:

If you want…


GraphQL was developed by Facebook in 2012 to overcome the shortcomings we had with REST APIs

Photo by Dylan McLeod on Unsplash

GraphQL is a query language to retrieve data from a server. It is an alternative to REST, SOAP, or gRPC in some way.

GraphQL is a new API standard and offers a revolutionary approach to building data-driven applications. The project was first created by Facebook while they were shifting their mobile app from HTML5 to a native mobile app.

GraphQL follows the same set of constraints as REST APIs, but it organizes data into a graph using one interface. Objects are represented by nodes (defined using the GraphQL schema), and the relationship between nodes is represented by edges in the…


Discovery server, API gateway ZUUL, ribbon, inter-services communication and docker

Microservices is an architectural design for building a distributed application using containers. Microservices get their name because each function of the application operates as an independent service. This architecture allows for each service to scale or update without disrupting other services in the application.

Photo by Austin Distel on Unsplash

In this article, I will explain and implement bellow points


Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.

Photo by Dominik Lückmann on Unsplash

Today we will cover bellow things

Prerequisites: Before starting this article you must have knowledge of spring boot with Gradle dependencies. You can learn this from the below link


The purpose of a lock is to ensure that among several application nodes that might try to do the same piece of work, only one actually does it (at least only one at a time).

Photo by Emile Perron on Unsplash

In current days I worked on Redis lock-in distributed system. In distributed system Locking/concurrency management is a very important thing. Without prior knowledge, many unwanted problems may occur.

What we will learn here

Here I am sharing an application architecture. Suppose this is a bank wallet application backend. Its architecture is very simple. It has a single app server, single app node, single Redis server, and a single database


Making faster responses and decreasing dependency on expensive DB query.

Image Credit — Wikipedia

More often during API design, each API may server respond after querying data from a database or from external API calling. Sometimes there are some tables those data are not frequently changed, which means those tables are not transactional.

Database query or external API calls are very much expensive. In this case, we may cache those data into faster storage and server our client from that storage instead of fetch from there.

To achieve this goal, Redis has come. It not only caches data but also persistent with the database periodically and also it works in the distributed system.

Redis…


The remote worker must follow these practices

Photo by Stand some Work lifestyle on Unsplash

From the beginning of the year 2020, more people than ever before began working from home, and quite suddenly. Organizations and individuals didn’t get enough time to prepare for remote work or think about the best ways to smooth transition teams, processes, and culture to an online-only environment.

Working from home strategies has both positive and negative impact. It is found that working from home might make employees happier as it lowers stress and boosts morale, which drives employee efficiency and increases the production rate.
There’s no one-size-fits-all formula for remote work. Everyone has different ways of working. Different times at…


Every developer should know these commands.

Photo by Christina Morillo from Pexels

A database may contain one or more tables, functions, and it has a unique name. Each table is also identified by a name (e.g., “User,” “Product,” “Order”). Each table contains table relevant records with data.

SQL stands for Structured Query Language. The query language is one kind of programming language designed and developed to retrieve specific information from databases based on a query criterion, and that’s appropriately what SQL does. To put it simply, SQL is the language of databases.

SQL is database-specific, so that it may vary its syntax based on the database driver. …


Handle large traffic, improved application performance, and responsiveness

Image Credit — www.pexels.com

During an API call from a client, the server creates and assigns a thread of that request. This thread waits and is appointed until requests are served to that client.
Each server can open a limited number of threads, and if that number exceeds, then new clients request will store in the request queue of that server.
For the Tomcat server, its default number of threads maxThreads is 200, representing the maximum number of concurrent threads allowed to run at any given time.
There are other metrics, maxConnections, representing the total number of concurrent connections that the server will accept and process. Any…


Abstraction, Encapsulation, Inheritance, Polymorphism

Photo by insung yoon on Unsplash

OOP stands for Object-Oriented Programming.

OOP allows you to break down your software components into small-sized/bite-sized problems that you can solve — one object at a time.

DRY principles (Don’t Repeat Yourself) concerned about the repetition of code. You should extract typical behaviour of your code from your application and place them into a single place so that you can reuse them. OOP will help you to achieve it.

There are four main OOP concepts in Java. These are: Abstraction, Encapsulation, Inheritance, Polymorphism

Advantages of Object-Oriented Programming

Object-oriented programming has many more advantages over procedural programming:

Md Sajedul Karim

Back-end developer, Spring, JAVA, Distributed system, AWS, Google Cloud, Docker, CD/CI, Kubernetes, databases. https://www.linkedin.com/in/sajedulkarim/

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