/images/avatar.png

Hi! I'm Pratyaksha.

Gradle Cheatsheet

Gradle automates building, testing, and deployment of software from information in build scripts. Projects: A Gradle project is a piece of software that can be built, such as an application or a library. Single project builds include a single project called the root project. Multi-project builds include one root project and any number of subprojects. Build Scripts: Build scripts detail to Gradle what steps to take to build the project. Each project can include one or more build scripts.

Maven Cheatsheet

Maven is a project management tool for Java projects based on the concept of a project object model (POM). It can manage a project’s build, reporting, testing, and documentation. Maven can do the following things Manage dependencies Compile source code Deploy source code Run tests Can generate documentation from JavaDoc Create reports like unit test coverage Maven’s purpose is to: Easy to use. It hides away a lot of details making it easy to learn, use and share.

Service Discovery Pattern

Service Discovery Pattern It enables microservices to dynamically find and communicate with each other using a service registry. Services register themselves and can look up other services without manual configuration. Since service instances in a cloud environment are dynamic (they scale up/down and change IPs), a centralized registry is used to track their locations. It is essential in cloud environments where service instances frequently start or stop. Ensures automatic scaling, resilience and smooth inter-service communication.

Sidecar Pattern

Sidecar Pattern It deploys helper components (sidecars) alongside main microservices to handle cross-cutting concerns like logging, monitoring and configuration management. This allows the main services to focus solely on business logic. Centralizes tasks such as logging and monitoring, reducing complexity in the main service. Commonly used in Kubernetes environments, where each microservice runs with a sidecar for auxiliary functions. Key concepts: Independent: The sidecar is developed and deployed independently of the main application.

Saga Pattern

Saga Pattern It manages distributed transactions across microservices by coordinating a series of local transactions. Each service executes its transaction and triggers the next via events, with compensating actions undoing changes if a failure occurs. Ensures consistency in multi-service workflows, such as order processing involving payment, inventory and shipping. Provides fault tolerance by rolling back previous steps through compensating transactions when any step fails. Implementation: Choreography-Based Approach (Event-Driven): There is no central coordinator.