Skip to main content

Posts

Showing posts from September, 2022

JVM - Class Data Sharing

Topic: JVM Internals                                                                                                                         Level: Advanced Problem Statement When we run a Java application all the related classes and their dependencies associated are loaded at the runtime, adding to the startup time of the application as well as to the memory footprint. Every time when we launch the application, the process would be the same and starting up multiple instances of the application would add up significant latency, and also becoming memory intensive, as the same class-related data need to be replicated and loaded. What is CDS? AppCDS (Application Class Data Sharing) improves the startup performance of the application by creating an archive of the library classes/selected classes from the application classpath such that when the JVM loads, the shared archive is consulted which is memory-mapped to allow sharing of read-only JVM metadata for the classes among multiple JVM pro

Lancing JDK 19

Topic: JDK Release                                                                                                                            Level: Basic Introducing JDK 19 Java 19 is the 10th release since the transition to the 6-month release cadence of new JDK features, comprising of 7 JDK Enhancement Proposals. With the ever-releasing new JDK features catching up on the latest version could be a daunting task. However it is a gift in disguise, with the shorter releases,  Applications can effortlessly migrate to the successor versions by incorporating fewer minimal additions/deprecations in the features rather than having big bang migration housing innumerable changes. The steep learning curve and adaptation curve on the features introduced can be significantly lessened as the release cycles are periodic and incremental. Nurtures prompt experimentation and feedback for improvement and development of the released features (incubate and preview). Focusing on LTS (Long Term Support) r

Integration Patterns - Part Two

   Topic: Software Design                                                                                                        Level: Intermediate Integration Patterns - What? Coordinating, intercommunicating, interfacing and converging the functionalities across the distributed service APIs 1. Chained Microservice Pattern In the process of constructing a response to the client request, a sole microservice alone would not be able to collate/compose all the necessary data, assuming that the certain dependent functionality is isolated and distributed across multiple services by each level of business capabilities (unless it follows Aggregator Pattern that orchestrates concurrent responses for the request sent in parallel to all the underlying services). The pattern in which, assembling a response involves traversing multiple services sequentially, such that any of the consulted services assumes the role of orchestrating the  composition of the data for response thus forming chained flo

Integration Patterns - Part One

  Topic: Software Design                                                                                                        Level: Intermediate Integration Patterns - What? Coordinating, intercommunicating, interfacing and converging the functionalities across the distributed service APIs 1. API Gateway Pattern The API gateway is a service that acts as a single entry point interceptor facade in redirecting and routing incoming client requests to multiple distributed services. Residing in between the client application and the microservices it internally maps the incoming requests to the relevant services, by providing features such as  Reverse proxy Requests aggregation Routing requests Protocol abstraction (REST, gRPC, AMQP, etc.,)  and other cross-cutting features like Authentication Authorization policies Response caching Service discovery Retry policies Load-balancing Rate-limiting Throttling IP whitelisting,  Request transformations Circuit breaker  implementation for the serv

Decomposition Patterns - Part Two

Topic: Software Design                                                                                                        Level: Intermediate Decomposition Patterns - What? Breaking down the architectural design with respect to a defined context 1. Strangler Pattern Extracting a specific functional component from the application into an independent service component, then an intermediary facade is placed for routing the request traffic in tandem to both the legacy (for facilitating the functionality that is still not extracted) and the new component (for conducting the migrated functionality), and upon correctness completely decommissioning the functionality from the legacy design (by which strangling the primary application by component elimination). Thereby gradually and iteratively, achieving a microservice design transformation by decoupling the functionality. Eliminates complete big-bang migration risk. At a high-level overview, the Strangler pattern is developed in the below