<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gireesh Punathil on Medium]]></title>
        <description><![CDATA[Stories by Gireesh Punathil on Medium]]></description>
        <link>https://medium.com/@gireesh.punam?source=rss-c733397ae20e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*U7vXQFEhokmuF3mL</url>
            <title>Stories by Gireesh Punathil on Medium</title>
            <link>https://medium.com/@gireesh.punam?source=rss-c733397ae20e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:27:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gireesh.punam/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Migrating legacy Java with AI]]></title>
            <link>https://medium.com/@gireesh.punam/migrating-legacy-java-with-ai-83055e0e9ebe?source=rss-c733397ae20e------2</link>
            <guid isPermaLink="false">https://medium.com/p/83055e0e9ebe</guid>
            <category><![CDATA[application-modernization]]></category>
            <category><![CDATA[java-migration]]></category>
            <category><![CDATA[ibm-bob]]></category>
            <category><![CDATA[enterprise]]></category>
            <category><![CDATA[open-source-ai]]></category>
            <dc:creator><![CDATA[Gireesh Punathil]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 05:34:05 GMT</pubDate>
            <atom:updated>2026-07-15T14:38:33.138Z</atom:updated>
            <content:encoded><![CDATA[<h3>Legacy Java: AI-assisted migration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uvvg9owfTA90w1Q2IVgkUw.png" /></figure><blockquote>“code untouched for twenty years, migrated in twenty minutes with IBM Bob!”</blockquote><h3>Context</h3><p>Application modernisation is not cheap. Industry data puts the average cost at $1.5M over sixteen months and nearly 80% of projects fail to deliver<a href="https://www.legacyleap.ai/blog/application-modernization-cost/">[1]</a>. Gartner reports that fewer than half meet their original budget, contributing to over $100B in global overruns across three years. The numbers are sobering, but it sets a perfect stage for AI-assisted migration.</p><h3>Introduction</h3><p>Java has evolved almost beyond recognition since its inception in the 90s. With every leap forward, legacy codebases fall further behind, accumulating security risks and incompatible dependencies. Migration is one of the most complex software operation that tests a developer’s skill, patience and confidence at times.</p><p>AI-assisted migration changes the equation. By automating the mechanical chore work and augmenting the intellectual heavy lifting, it makes modernization faster, more scalable and considerably less painful.</p><p>So let us put it to the test. We will take a deliberately extreme example: the oldest branch of a popular Java project (Apache Hadoop), verified that it is untouched since its last release 17 years ago with no dependency updates whatsoever and migrate it all the way to Java 25, capturing the surprises, challenges and opportunities along the way.</p><h3>First, manual approach</h3><p>The four steps I am doing just below is trivial and self-explanatory: obtaining the code and attempting a build on it as is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_soPWBZfONKmxdOVQd9zsQ.png" /><figcaption>clone the apache hadoop repo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tZRugJugfWZ6ULgmfQwgqA.png" /><figcaption>switch to the oldest branch</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYQUEcGjvo350FA9ZkGImg.png" /><figcaption>check Java version</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pdsyY8TZn7MXpHHxYfVPcQ.png" /><figcaption>attempt a maven build</figcaption></figure><p>You realize instantly that this isn’t even a Maven project, as it predates that era entirely. This is a project that was developed using Java 1.4, and built with Ant, using a build.xml as the build configuration, and beyond my expertise. At this point, the task is handed off to a Senior Java Developer for a proper modernization assessment. Here is the breakdown they came back with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JXvbLDXVZG8w54AVRgQClg.png" /><figcaption>manual migration assessment summary</figcaption></figure><p>Estimated time and cost: one week, $4000</p><h3><strong>AI-assisted approach: IBM Bob</strong></h3><p>Now let’s hand the same problem to IBM Bob: an AI coding assistant, and see how it tackles the challenge.</p><h4>step 1: first, load the project in the Bob workspace</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gz1VgezYxNwVK5AAZufRWA.png" /><figcaption>Bob loaded with the hadoop project in its workspace</figcaption></figure><h4><strong>A quick word on IBM Bob</strong></h4><p>IBM Bob is an AI SDLC assistant designed to augment existing development workflows and helps you work confidently with real codebases. Its core capabilities include generating and explaining code, writing and running tests, debugging issues and migrating legacy systems.</p><p>Built for enterprise use, Bob adapts to specific needs through three key mechanisms:</p><ul><li><strong>Purpose-built modes</strong> that optimise behaviour for different development scenarios</li><li><strong>A comprehensive toolset</strong> that extends capabilities beyond text generation</li><li><strong>Reusable instruction sets</strong> that let you define custom workflows, attach supporting files, and teach Bob specialised tasks for consistent, repeatable results</li></ul><p>Rather than walking through its full feature set, we will skip straight to the action and interacting with Bob directly, starting with our intent:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4gQTbWh46R9388rS2DWJ5A.png" /><figcaption>Step 1: input the requirement to Bob using its default mode (ask)</figcaption></figure><h4><strong>Defining the Scope</strong></h4><p>While Bob is capable of handling end-to-end modernisation tasks such as refactoring code into microservices, containerisation, defining CI/CD pipelines and more, we will keep our scope aligned with the assessment our Senior Java Developer provided, focusing only on those specific steps.</p><h4><strong>Interacting with Bob</strong></h4><p>The prompt was simple and natural:</p><blockquote>“let us modernize this project: build with Java 25 and maven configuration.”</blockquote><p>This triggers Bob’s predefined Migration<strong> </strong>workflow. Bob analyses the project’s code and configuration, then produces a step-by-step migration plan, with two very important guardrails built in: the ability to amend the plan before execution, and an explicit approval hook before anything is actioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UmWxnzcJoco3jgMUusomtw.png" /><figcaption>Step 2: input the requirement to Bob using its default mode (ask)</figcaption></figure><h4><strong>Step 2: modernize the build configuration</strong></h4><p>Bob extracted the build configuration from a 20-year-old Ant-based build.xml and generated an equivalent pom.xml for Maven.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vxfwWntp0KBCmGIlht9yMw.png" /><figcaption>step 2: modernize the build configuration</figcaption></figure><h4><strong>Step 3: Build with Maven</strong></h4><p>Along the way, we encounter several important but straightforward steps — such as restructuring the project workspace, updating .gitignore with newly added files, and generating a comprehensive README. None of these throw any surprises, so we will move straight to the most interesting part: the build itself.</p><blockquote><em>⚠️ </em><strong><em>Note:</em></strong><em> Bob expects tools like </em><em>mvn and </em><em>java to already be available on your system path. It doesn&#39;t install tooling by itself, so make sure your environment is set up before proceeding.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mau-hwgtMixmrQl0oKWq4A.png" /><figcaption>step 3: build with maven</figcaption></figure><h4><strong>Step 4: The build, analyze, fix Loop</strong> <em>aka HITL</em></h4><p>Now we enter the most compelling phase of any AI-assisted migration: the build loop.</p><p>Every developer reading this will know exactly what this means : the time, the effort, the grinding cycle of failure and fix that makes manual migration so draining. Here, we get to see how Bob handles it.</p><p>We lifted and shifted the build.xml configuration directly into a Maven pom.xml and fired off a build as-is. As expected, it failed.</p><p>The reason: several dependencies referenced in the original configuration (such as legacy Jetty artifacts) are no longer available on Maven Central. Twenty years is a long time in the Java ecosystem; libraries get deprecated, restructured, or replaced entirely. In this case, the Jetty v5 APIs have long since been superseded by newer versions, and the old artifact coordinates simply don’t resolve anymore.</p><p>The correct fix is a proper migration of the Jetty v5 API to a modern equivalent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvkU8rIULpI5BFG4gS5R7w.png" /><figcaption>step 3: build-analyse-fix loop</figcaption></figure><h4><strong>Step 5: iterate to complete</strong></h4><p>Skipping past a few similar dependency fixes, the build eventually succeeds. And here is the remarkable part: not a single line of code was changed manually, and the project workspace was never opened outside of Bob. The entire process was a matter of following Bob’s sequenced plan and approving each step as it came. And in most cases, little more than a rubber-stamp!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ZebSeffQ_F9BV0FYJEr7w.png" /><figcaption>step 4: few iterations to the successful build</figcaption></figure><h3><strong>Migration Success!</strong></h3><p>Run your standard sanity and regression tests to verify the migration is complete and nothing has broken in the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eg8O31MMfPKNG9y04McQug.png" /><figcaption>step 5: migration complete!</figcaption></figure><p>Now, comparing the effort estimated by our Senior Java Developer against the actual effort with Bob:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2V5bSb2H506kVm6EJj6gw.png" /></figure><p>Actual time and cost: 15 minutes, less than $100!</p><h3><strong>Conclusion</strong></h3><p>The numbers speak for themselves. A migration that a seasoned Senior Java Developer estimated at a full week’s work was completed by Bob in under an hour, without a single line of manual code changes.</p><p>But the more important takeaway isn’t the speed. It’s the nature of the work.</p><p>The manual approach demands that a skilled developer context-switch repeatedly between reading legacy code, researching deprecated APIs, debugging classpath errors, and writing documentation, all while carrying the full cognitive load of a 20-year-old codebase in their head. It is exhausting, error-prone, and a poor use of expert time.</p><p>Bob handles the mechanical layers of that work systematically and without fatigue., leaving developer exactly what they could focus on: judgment, validation, and the approval decisions that only someone who understands the business context can make.</p><blockquote>The human-in-the-loop is not a limitation of Bob, it’s a deliberate design choice that keeps the developer in control without burdening them with the grind.</blockquote><p>A few honest caveats worth noting: this was a focused migration scope. Larger codebases with deeper architectural complexity, custom frameworks, or significant business logic entanglement will present challenges that no AI tool resolves purely on autopilot. But the pattern is the same: AI assistance compresses the mechanical effort dramatically, freeing developer capacity for the decisions that actually require expertise.</p><p>For any team sitting on a legacy Java codebase and treating migration as a headache, that has changed. The barrier is lower and the timeline is shorter with AI assisted tools such as IBM Bob.</p><blockquote>“give back to Caesar what is Caesar’s, and to God what is God’s.” — New Testament, Mathew 22.21. Two thousand years later, the principle still holds. AI didn’t replace the developer. it simply divided the labour cleanly guided by a new cognitive justice:“give back to dev what is dev’s, and to AI what is AI’s.”</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83055e0e9ebe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modularity: types and use cases]]></title>
            <link>https://medium.com/@gireesh.punam/modularity-types-and-use-cases-61f1d713d251?source=rss-c733397ae20e------2</link>
            <guid isPermaLink="false">https://medium.com/p/61f1d713d251</guid>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[modularity]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[modernisation]]></category>
            <dc:creator><![CDATA[Gireesh Punathil]]></dc:creator>
            <pubDate>Wed, 28 Aug 2024 14:45:29 GMT</pubDate>
            <atom:updated>2024-08-28T15:11:36.001Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0x8S-WHbNkE1vu_fET6Gw.png" /></figure><h4><strong>Co-authored by: </strong><a href="https://medium.com/u/97dd5c118a52"><strong>Alshama M S</strong></a></h4><blockquote>“In the realm of the mind, knowledge is the key that unlocks all doors. And wisdom emerges from modulated use of knowledge” — Anonymous</blockquote><h4>Background</h4><p>Application modernisation has become a crucial priority for many leading organisations, driven by the significant shifts in platforms, tools, and frameworks in recent times, and the inability of legacy software to keep pace with these changes. Modernisation efforts are typically categorised into three approaches: re-architecture, re-factoring, and re-targeting. In this blog, we explore how modularity serves as a key strategy for application modernisation through re-factoring and demonstrate the various aspects of modularity across different dimensions.</p><blockquote>“Businesses should adopt a continuous modernisation strategy as a more cost-effective, lower-risk approach that increases time to market and accelerates return on investment.” — Gartner, Use Continuous Modernization to Optimize Legacy Applications By Stefan Van Der Zijden, Deacon D.K Wan, and Howard Dodd</blockquote><h4>Introduction to Modularity</h4><p>Imagine modularity as building with blocks — each block, or module, carries out a specific function. In software, modularity enables us to deconstruct complex systems into manageable, interchangeable components, similar to how objects function in programming, but on a larger scale. This structure minimises complexity, making code easier to manage, evolve, understand, and integrate.</p><h4>Why Embrace Modularity?</h4><p>The primary advantage of modularity is its simplicity. In large-scale applications, such as enterprise systems, or those requiring frequent updates, modularity ensures that changes in one area don’t necessitate modifications elsewhere. This ability to implement selective changes streamlines development, enhances system stability, and makes applications more adaptable to future requirements.</p><h4>Types of Modularity</h4><p>In the Java programming space, modularity comes in a few forms: Java Standard Edition (SE) modularity and Open Service Gateway Interface (OSGi) modularity. The OSGi modularity itself has two subtypes: Eclipse Plugin Development Environment (PDE)-based and bnd-based, both adhering to OSGi specifications. In this article, we will explore these different types of modularity and discuss the use cases where each is most effective.</p><blockquote>Java SE modularity: <a href="https://openjdk.org/projects/jigsaw/quick-start">https://openjdk.org/projects/jigsaw/quick-start</a><br>OSGi: <a href="https://www.osgi.org/resources/where-to-start">https://www.osgi.org/resources/where-to-start</a><br>Eclipse PDE: <a href="https://wiki.eclipse.org/PDE/User_Guide">https://wiki.eclipse.org/PDE/User_Guide</a><br>Bnd: <a href="https://bndtools.org/concepts.html">https://bndtools.org/concepts.html</a></blockquote><h4>Java SE Modularity: standard encapsulation</h4><p>Java SE 9 introduced a game-changer to the Java programming landscape: the Java Platform Module System (JPMS). Eating its own dog food, Java replaced the bulky, one-piece JDK with over 90 focused modules. The JPMS defines a specification around modular Java programs that can be applied not only to the JDK, but to enterprise grade applications as well. This shift means leaner applications, quicker launch times, and stronger security measures to name a few advantages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*Qub9ZNUrgBvVZMKC3-jPMg.png" /><figcaption>An example module-info.java</figcaption></figure><h4>OSGi: extended encapsulation with dynamism</h4><p>OSGi streamlines creating modular Java software, at grand scale. OSGi takes modularity up a notch by introducing a dynamic component system so that components of large applications can be managed in flexible ways. OSGi lets you control the life cycle of the constituent components of the application — installing, starting, stopping, updating, or removing them — without stopping the application and the whole runtime system in which they operate. This flexibility supports a modular architecture that’s easy to update and maintain, perfect for complex applications needing real-time updates.</p><blockquote>In JPMS terminology, application components are called modules, while in OSGi terminology, those are called bundles.</blockquote><p>OSGi defines modules as bundles. In the core of a bundle is a manifest which defines the module metadata, much in the same way module-info.java is for Java SE modularity. The manifest describes the bundle — the module’s internal composition and external dependencies among many other things. When developing applications, developers consult the manifest of participating bundles to design the composition and dependency models. When application needs to undergo changes, older bundles are detached and newer one attached to fit to the necessary changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*u_zYNC5Q7q-qZWvlkpUMdA.png" /><figcaption>A manifest file that describes an OSGi bundle</figcaption></figure><p>The two major school of thoughts in the OSGi world are Eclipse PDE (manifest-first philosophy) and bnd (code-first philosophy). In manifest-first, a bundle is developed and its manifest is defined and shaped manually based on the bundle’s evolving characteristics. For example, if a bundle consumes another bundle, a &lt;<strong>Require-Bundle&gt;</strong> header is introduced in the consuming manifest to reflect the requirement.</p><p>In code-first paradigm, the bundle is developed without worrying about the manifest, which is auto-adjusted based on the desired intent of the bundle. The intent is captured using byte code analysis, transparent to the application. bnd is a powerhouse in generating accurate OSGi metadata, ensuring bundles are correctly assembled with all needed dependencies. PDE and bnd together exemplify Eclipse’s robust ecosystem for developing, debugging, and deploying modular software.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*_S8-OmPYLrohCIgukBrsPA.png" /><figcaption>A bnd file that transparently manages an OSGi bundle</figcaption></figure><h4>Implications of Java SE and OSGi modularity styles</h4><p>Two major differences that substantially influences use cases of modularity are:</p><ul><li>Java SE modules do not carry version information, while semantic versioning is core of OSGi bundles. This substantially influences the management of dependencies in an application in its update cycle.</li><li>Java SE modules do not load through separate class loaders, while each OSGi bundles is loaded in its own classloader scope. This influences the visibility of internal types (classes) of modules, while enhances the dynamic life cycle management of the bundles.</li></ul><blockquote><a href="https://semver.org/">semantic versioning</a> is a labelling specification for software that describes representation of code changes in terms of a three-tier versioning scheme.</blockquote><h4>Use cases</h4><p>Java SE modularity fits general Java applications aiming for efficiency, security, and minimal size without worrying about the frequent changes in the depending modules. As SE modules do not carry version information, it is a manual process and often hard to consume newer versions of dependent modules. For that matter, SE modules are good for applications whose components are developed by the same team or co-located teams. In such cases, changes in the dependent module is easily illustrated to the team developing the consuming module, and necessary amendments made to bind the modules.</p><p>Microservices which are developed, deployed and managed independently and communicate only over service endpoints also can benefit from Java SE modularity. This is because the internal changes in modules are no way affecting the rest of the system, as they communicate over a well-defined communication protocol over the wire. However, due to the tiny nature of micro-services, need for large scale modularisation of such applications are unconvincing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*IYUVefO_dVwARMPqg-OKrw.png" /></figure><p>OSGi based modularity is a better approach for large scale applications that has complex dependency chain — either within the application or with third party software modules. OSGi suits applications that demand the highest level of adaptability. The in-built versioning mechanism proves critical when managing numerous modules that are developed, maintained and adopted independently.</p><blockquote>overarching trade-off: simplicity (JPMS) versus dynamism (OSGi)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-XSTt7H0PtpSq33h-T8wrg.png" /></figure><p>On the other hand, the selection of PDE versus bnd is purely a developer’s choice, not driven by different use cases. For example, a developer would choose to manage the manifest file manually, as they need to make sure the bundle’s nature is indeed reflected in the manifest for their own quality assurance. On the other hand, a developer who is focussed on high developer productivity with a continuous delivery environment would prefer code-first approach as they can focus only on the code, and not its manifesting nature.</p><blockquote>overarching trade-off: fine control (pde) versus fine abstraction (bnd).</blockquote><h4>Best Practices for Modular Development</h4><ul><li>Begin with the Basics: Start with essential modules and expand as needed, ensuring each module is complete and defined.</li><li>Keep Secrets: Modules should only reveal necessary interfaces, hiding how they work internally.</li><li>Define Clear Versioning: Apply consistent versioning to manage module dependencies and ensure smooth interactions.</li><li>Independently Test: Check modules on their own to guarantee modularity doesn’t compromise their function</li><li>Knowing your consumers and producers will help being more specific in terms of what capability your code is embodying</li><li>Reduce abstractions. Knowing your consumers and producers will help being more specific in terms of what capability your code is embodying.</li><li>Don’t mix modularity types!</li></ul><h4>Conclusion</h4><p>Eclipse’s support for modularity, through Java SE, and OSGi (through PDE and bnd) offers a solid foundation for creating efficient, scalable, and easy-to-maintain software. By leveraging modularity’s principles, developers can build systems that are not only streamlined and robust but also prepared for the future. Whether it’s the structured approach of Java SE or the dynamic capabilities of OSGi, Eclipse equips developers with the necessary tools to craft the modular applications of tomorrow in a more straightforward, understandable manner. Also Eclipse PDE is fast evolving to embrace the best features of bnd, making it one of the coolest modular development framework for large scale Java applications.</p><blockquote>“The art of programming is the art of organizing complexity” — Dijkstra</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61f1d713d251" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[InstantON: Innovation on the bedrock]]></title>
            <link>https://medium.com/@gireesh.punam/instanton-innovation-on-the-bedrock-73ef62e7c6ac?source=rss-c733397ae20e------2</link>
            <guid isPermaLink="false">https://medium.com/p/73ef62e7c6ac</guid>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[openj9]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[ibm-cloud]]></category>
            <dc:creator><![CDATA[Gireesh Punathil]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 04:26:39 GMT</pubDate>
            <atom:updated>2024-03-07T04:26:39.036Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*GQGOzAYLgmJ9F-YLttpwBw.jpeg" /></figure><blockquote>“Where shall I commence, monsieur?” — asked the mender of roads. “let us commence at the very commencement!” the curious monsieur wanted to know the whole history!</blockquote><p>did it start with famous browser wars of 90&#39;s? or with fight for supremacy by the backend languages? no, probably it all began with the internet itself — compete for speed and agility in the web workload. it took several turns over decades, evolved in many forms, delivering many new languages and paradigms while rendering many others obsolete in that process. at present, the front runner in this race is the asynchronous non-blocking I/O paradigm that improves request — response latency by large, by innovating on the bedrock of threading model itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*SIpil9K0sFt59ZcK66Jjew.png" /><figcaption>a simple node.js server that implements async I/O</figcaption></figure><p>should we stop here? no! cloud computing market share stands at 0.7T$ and is expected to double in 5 years. how do we respond to that credible forecast? invest, innovate and transform! leverage the characteristics of that computing environment, and build new strategies.</p><blockquote>innovation needs broader thinking. how? widen our operating space from the traditional <em>header compression</em> to <em>session optimisation</em> to <em>caching</em> to the <em>container host</em> or even to the <em>cluster</em></blockquote><p>there you go! in cloud deployment targets, execution environment is drastically different from the conventional types. <em>replicators</em>, <em>serverless</em> and <em>functions</em> tell us what they need: start up fast.</p><p>this use case led to several innovations - innovations that went deep in the bedrock of process life cycle definitions in the operating system!</p><p>one such innovation is <a href="https://developer.ibm.com/languages/java/semeru-runtimes/">IBM Semeru Runtime</a>’s InstantON feature. it leverages the peculiar deployment model in which it operates, specialises on use cases where provisioning latency matters, and exploits the underlying system to implement the capability.</p><blockquote>IBM Semeru Runtime’s InstantON feature is built on <a href="https://eclipse.dev/openj9/docs/criusupport/">Openj9 CRIUSupport</a> technology. It makes use of a linux feature <a href="http://criu.org/">CRIU</a> (checkpoint — restore in user space) to build this feature.</blockquote><p>Let us see how it works:</p><ol><li>write your code</li><li>identify context-free bootstrap sequence [ lines 4 through 6 ]</li><li>define a checkpoint at the context-free boundary [ line 9 ]</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tvq30KZI2-6wKtDZLQyzJg.png" /><figcaption>code for checkpoint — restore mechanism</figcaption></figure><p>4. build, run, collect a checkpoint and exit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3bwTJY6axaGeUXExihMcWg.png" /><figcaption>application bootstraps, warms up, collects a checkpoint and exits</figcaption></figure><p>5. restore from the checkpoint, run wherever you want to! The 100 million list entries that took 18 seconds to populate in the checkpoint phase is fully recreated in the Java heap and ready to use, along with the JVM as well as the whole application stack itself, in 10 milliseconds!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zl4TqVPEs1uw5yju-ofraw.png" /><figcaption>resuming the application from the checkpoint, potentially in many other systems</figcaption></figure><blockquote>The list in the code is symbolic; in reality it can be anything that your application wants to do before it starts its mainline production.</blockquote><p>there are several pre-requisites and gory details that I omitted. The intent is to give you an idea how it works and the value it provides in environments where latency matters, not to document the whole specification around checkpoint — restore mechanism. For a fully working setup, refer to this <a href="https://eclipse.dev/openj9/">openj9</a> blog <a href="https://blog.openj9.org/2022/09/26/getting-started-with-openj9-criu-support/">Getting started with openj9 CRIU support</a></p><p>The 18 s to 10 ms reduction — 1800 fold time saving — is not a number to benchmark. It can drastically vary based on what code is in the bootstrap, and how that will have to be restored. But this magic ratio serves as a ball park and makes a great appeal.</p><blockquote>Worth quoting this again: “any sufficiently advanced technology is indistinguishable from magic” — Arthur Clarke’s third law of profiles of the future. Similarly, innovations on the bedrock sprouts new programming paradigms downstream.</blockquote><p>Here is my full code, in case anyone wants to try:</p><pre>import java.nio.file.*;<br>import java.time.*;<br>import java.time.format.*;<br>import java.util.*;<br>import java.io.*;<br>import org.eclipse.openj9.criu.CRIUSupport;<br><br>public class Foo {<br> public static String t() {<br>  DateTimeFormatter formatter = new DateTimeFormatterBuilder()<br>   .appendPattern(&quot;HH:mm:ss&quot;).appendPattern(&quot;[.SSSSSS]&quot;)<br>   .toFormatter();<br>   return formatter.format(OffsetDateTime.now());<br> }  <br> public static void main(String args[]) throws Throwable {<br>  System.out.println(t() + &quot;: booting up...&quot;);<br>  // build a huge list: 100 million entries<br>  ArrayList l = new ArrayList();<br>  for(long i = 0; i &lt; 1e8; i++) l.add(i);<br>  System.out.println(t() + &quot;: booted up.&quot;);<br><br>  // take an app checkpoint<br>  checkpoint();<br><br>  // restore and resume from the checkpoint!<br>  System.out.println(t() + &quot;: restored &quot; + l.size() + &quot; entries.&quot;);<br>  System.out.println(t() + &quot;: now waiting for clients!&quot;);<br>  Thread.sleep((long) 1e6);<br> }<br><br> public static void checkpoint() {<br>  if (CRIUSupport.isCRIUSupportEnabled()) {<br>   new CRIUSupport(Paths.get(&quot;temp&quot;))<br>     .setLeaveRunning(false)<br>     .setShellJob(true)<br>     .setFileLocks(true)<br>     .setLogLevel(1)<br>     .checkpointJVM();<br>  } else {<br>   System.err.println(&quot;CRIU is not enabled / supported.&quot;);<br>  }<br> }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73ef62e7c6ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>