Skip to main content

Posts

Showing posts from October, 2022

Spring on GraalVM

Topic: GraalVM                                                                                                                            Level: Advanced GraalVM - What? GraalVM is a virtual machine for seamless interoperability and polyglot language compilation that offers highly optimized runtime executable binaries, speeding the application startup and reducing memory consumption ideal for microservices, serverless, and cloud workloads in general. Any source code running on the Java Hotspot VM can also run on the GraalVM. Native Images - What? Native Image is a technology by which a java code is compiled ahead of time into a binary executable, termed a native executable which doesn't require a JVM to run. The notion of the native executable is to have optimized machine code (packaging only the necessary reachable runtime application classes, standard library classes, language runtime, statically linked native code from JDK, and other resources making it a lightweight artifact) o

Cross-Cutting Concern Patterns

Topic: Software Design                                                                                                        Level: Intermediate Cross-Cutting Concern Patterns - What? A concern that is applicable throughout the application of microservices that supplies a generic unified characterisation of functionality 1. External Configuration Application services often need to define configuration information related to database connectivity, logging, timeouts, port configs, external endpoints, queue connection properties, management endpoints etc., that would co-exist with the packaged/shipped application for deployment. Such configuration management setup introduces sophistication when there is a change in a configuration property, the associated application has to be recompiled, repackaged and redeployed leading to downtime and coordination overheads. Additionally violating the DRY (Don't Repeat Yourself) principle if multiple services use the same configuration properties

Observability Patterns

Topic: Software Design                                                                                                        Level: Intermediate Observability Patterns - What? Logging, Tracing, and Monitoring of multiple instances of distributed services across numerous servers 1. Log Aggregation With a microservices design paradigm, the application can have multiple services designated for fulfilling user requests in a discrete, loosely coupled manner isolated in their process boundaries. There may also be numerous instances of the service running facilitating load balancing and scaling on additional machines based on the demand.  As the services involved process the request it simultaneously generates log statements (information, warning, error, debug) related to its logic processing with a specified format directed to a defined log file. Log aggregation is responsible for consolidating the logs spanning across multiple instances onto a centralized service, such that we might be abl

Database Patterns

Topic: Software Design                                                                                                        Level: Intermediate Database Patterns - What? Given that microservices by nature are decoupled in design and isolated in functional service tasks, such that facilitating data access/update requirements across the distributed services while maintaining the ACID (Atomic, Consistent, Isolated and Durable) properties of the transactions involved.  The atomicity ensures that all or none of the steps of a transaction should complete. Consistency takes data from one valid state to another valid state. Isolation guarantees that concurrent transactions should produce the same result that sequentially transactions would have produced. Lastly, durability means that committed transactions remain committed irrespective of any type of system failure.  In a distributed transaction scenario, as the transaction spans several services, ensuring ACID always remains key. 1. Databas