Author: munandersingh

Server Streaming via gRPC

Reading Time: 2 minutes In this blog, we will see how we can do Server Streaming via gRPC. In Server Streaming, the client sends only a single request and got multiple responses. Server Streaming via gRPC Server streaming RPCs where the client sends a request to the server and gets a stream to read a sequence of messages back. The client reads from the returned stream until there are Continue Reading

Exception Handling in Spring Boot

Reading Time: 4 minutes Exception Handling in Spring boot correctly in APIs while providing meaningful error messages is a very desirable feature, as it can help the API client properly respond to issues. The default behavior tends to be returning stack traces that are hard to understand and ultimately useless for the API client. Partitioning the error information into fields also enables the API client to parse it and Continue Reading

Unary Streaming via gRPC

Reading Time: 3 minutes If you want to get multiple responses and send multiple requests, it is the time to use gRPC Streaming concepts. You cant do streaming with REST API as REST API uses HTTP 1.1. In this blog, I will go through how you can do Unary Streaming via gRPC. Types of APIs or Streaming in gRPC gRPC supports four types of APIs to support streaming. 1. Continue Reading

Still not switch to HTTP/2?

Reading Time: 4 minutes Hi folks! Your website doesn’t reload fast and takes more time to get response . Then this is perfect time to move to HTTP/2. The relatively new HTTP/2 protocol speeds up page load significantly and is widely supported by all major browsers and servers. You should be using it right now. What is HTTP? HTTP is based on the Client/Server model. Client/Server model can be explained Continue Reading

Spring Interceptors: How to use them correctly?

Reading Time: 2 minutes Hi folks! we’ll focus on understanding the Spring Interceptors and how to use it correctly. What is Spring interceptors When a request is sent to spring controller, it will have to pass through Spring Interceptors (0 or more) before being processed by Controller. Spring Interceptor is only applied to requests that are sending to a Controller. Spring Interceptor – HandlerInterceptor preHandle(): This method is used to intercept the request before Continue Reading

Why gRPC for Inter-Microservice Communication.

Reading Time: 3 minutes Hi folks! In this blog we will understand why one should use gRPC for inter-service communication over other RESTful services. What is gRPC? It is a high performance, open source universal RPC Framework. In simple words, it enables the server and client applications to communicate transparently and build connected systems. Google developed gRPC and made available open-source. With it, a customer can directly call methods Continue Reading

Compile protocol buffers using maven

Reading Time: 3 minutes Hi Folks! As part of this blog, we will explore how we can compile protocol buffers using maven. We assume the reader has the basic idea about protocol buffers and maven. Google developed Protocol Buffers for use in their internal services. It is a binary encoding format that allows you to specify a schema for your data using a specification language, like so: The snippet defines the Continue Reading

Different ways of Handling Exceptions in CompletableFutures

Reading Time: 3 minutes Hi Folks! As part of this blog, we will explore how we can handle exception in the different computing stages when we use CompletableFuture. We assume the read has the basic idea of the CompletableFuture. Nonethless, will start with the basic introduction of the CompletableFuture. What is CompletableFuture A CompletableFuture is used for asynchronous programming which was introduced as an improvement of the java Future API in Continue Reading

An Overview of the Stored Procedures in PostgreSQL

Reading Time: 4 minutes As you may know in all the versions up to PostgreSQL 10, it was not possible to create a procedure in PostgreSQL. In  PostgreSQL11, PROCEDURE was added as a new schema object which is a similar object to FUNCTION, but without a return value. Over the years many people were anxious to have the functionality and it was finally added in  PostgreSQL. Traditionally,  PostgreSQL has provided all Continue Reading

Encryption with PBKDF2

Reading Time: 4 minutes Passwords can be the most valuable data to an attacker because stolen passwords can provide attackers the ability to bypass most of the security perimeters that exists in the system. Since lot of people use the same password in several other systems, one system compromise can affect the security of other systems too. This is where we can use encryption as a solution for theses Continue Reading