Category: fullstackdevelopment

  • How to implement SAGA design pattern in Spring Boot?

    How to implement SAGA design pattern in Spring Boot?

    Contents: Problem: Microservices come with their own advantages and disadvantages. One such disadvantage is managing distributed transactions. Let’s say your transaction spans 4 different microservices. How do you ensure that your transaction either commits successfully with all the 4 tasks succeeding or fails successfully if any of the tasks is not completed ( the completed…

  • Java 21 – Record Patterns

    Pattern Matching is a new area where Java has been introducing quite a few changes recently. It started with instanceof operator. Previously in Java , if you had to access an object whose instance type you didnt know prior, you had to use instanceof operator this way: You had to do a cast operation as…

  • How to implement CQRS design pattern in Spring Boot?

    How to implement CQRS design pattern in Spring Boot?

    Contents Problem: Let’s say you run a large scale ecommerce store. You have a large user base who query your system for products much more than they buy them. In other words , your system has more read requests than write requests. And so you would like to handle the high load of read requests…

  • Different ways to do versioning of REST APIs in Spring Boot

    Most of our web apps communicate through HTTP / REST APIs. These APIs can evolve over time. And hence maintaining different versions of them can be helpful. For example , lets say you have been hitting a REST API which returns the different products available on an ecommerce store. The owners decide to launch a…

  • Classes in Javascript vs Java

    Nothing happens outside a class in Java. To create an object you need a class. Even to print a simple “Hello World” you need a class. That is not always the case with Javascript. You can create objects without using a class. Everything need not be encapsulated within a class! There are similarities between the…

  • How to create HTTP/REST APIs using AWS Serverless framework?

    How to create HTTP/REST APIs using AWS Serverless framework?

    HTTP/REST APIs have become the defacto standard of communication between most web applications. You can create an API and deploy it on a server or on the cloud or go serverless . To go serverless you can use a tool like AWS lambda. And to ease the development and deployment of AWS lambda you can…

  • Postman vs Thunder Client for VSCode

    One of the common requirements in web application development is testing your API’s. In an era of API first apps , most of the functionalities in a web app are exposed as APIs to the outer world and to test these you need a tool. Postman has been widely used for this purpose. Postman has…

  • How to send emails in Spring Boot?

    How to send emails in Spring Boot?

    To send emails using the Spring Boot Email Starter in a Spring Boot application, you can do the following: STEP 1: Add the Spring Boot Email Starter dependency to your project: STEP 2: Configure the connection to the email server in your application.properties file: STEP 3 Inject the JavaMailSender bean into your service and use…

  • How to connect to Dynamo DB and do CRUD operations in AWS Serverless ?

    To connect to DynamoDB in the AWS Serverless Framework, you will need to do the following: The AWS SDK for JavaScript is a collection of libraries that allows you to interact with AWS services from your Node.js code. To install the AWS SDK, navigate to the root directory of your serverless application and run the…

  • How to implement retry design pattern in Axios?

    In the microservices world a lot of microservices often communicate with each other through API calls. These calls can often break due to network issues and other problems. It makes sense to retry these calls when these issues happen so that the likelihood of getting a response increases. For node js applications this can be…