Skip to main content

Posts

Showing posts with the label jvm

Tech Conversant Weekly May 22 - Jun 03

Topic: General                                                                                                                                              Level: All Welcome to the world of cutting-edge technology! Every bi-week, we bring you the latest and most incredible advancements in the tech industry that are sure to leave you feeling inspired and empowered. Stay ahead of the game and be the first to know about the newest innovations shaping our world. Discover new ways to improve your daily life, become more efficient, and enjoy new experiences. This time, we've got some exciting news to share with you! With enhancements on switch expressions and patterns in switch, dealing with exhaustive switch cases both at the compile time and runtime constructs can get deceptive. Having sealed types partially addresses the exhaustiveness of the switch by ensuring type conformity and as with Records patterns and their nesting their component associated also defines the exhaustiveness na

Tech Conversant Weekly Dec 05 - Dec 10

Topic: General                                                                                                                                              Level: All In this post, we shall catch up on the multi-faceted technological updates that happened over the past week as well as a few that seized my attention, The Garbage collector in JVM abstracts away from managing the memory allocation of the Java application by releasing/dereferencing/defragmenting the object allocated in the memory preventing memory leaks and space depletion. Several GC implementations strategically try to balance on the below parameters for optimal performance of GC, 1. Low latency  2. High Throughput  3. Efficient resources usage (CPU and memory) Typical stages involved in the GC are, 1. Mark (Tracing) - the objects are tree represented and from the application root reachable nodes are painted (LIVE) and unreachable (NON-LIVE) are marked for GC. 2. Sweep - Nonlive objects cleared from the heap memory  3. C

Tech Conversant Weekly Nov 7 - Nov 12

Topic: General                                                                                                                                             Level: All In this post, we shall catch up on the multi-faceted technological updates that happened over the past week, Dealing with checked exceptions in functional interfaces via lambdas in Java Streams shatters the intent of a simplified functional pipeline making it verbose. By extracting the exception handling block to a class, Lombok annotation SneakyThrow, Apache Commons Lang Failable stream API, and Varv functional library with Streams offers alternatives for handlezing the try/catch scenario embracing code pipe flow, thereby optimizing lambdas in the Streams. https://blog.frankel.ch/exceptions-lambdas/ When we package and ship our application to the clients, making it evident on the dependencies (both stated and transitive) used in the application aids clients in making informed decisions, adhering to any defined standards,

Spring on GraalVM Implementation

Topic: GraalVM                                                                                                                            Level: Advanced Spring on GraalVM Implementation In this consecutive post ( prior post ), we shall exploit the theory of the previous post on GraalVM, Native Image, and Spring Native and set up a Spring Boot project running on GraalVM that leverages static analysis and linkage during the build time with ahead-of-time compilation delivering a windows native executable. Prerequisites GraalVM JDK 11 distribution ( https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-22.3.0 ) - ensure you revise the JAVA_HOME and PATH appropriately Native Image executable (for windows, https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16 ) Maven build tool IntelliJ IDE MySQL Windows 10 OS We will commence by downloading a Spring template with Spring Boot >=2.7.5 version running on JDK 11 with the dependencies for Gr

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