Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OpenRewrite in Action: From Strategy to Execution

OpenRewrite in Action: From Strategy to Execution

Modern software systems age quickly — and changing them at scale is often costly, slow, and risky. But what if migrations, upgrades, and even full-on architectural shifts could be automated, reliable, and even… elegant?

The session will be a choose-your-own-adventure for developers, architects, and platform teams alike. It introduces OpenRewrite, the powerful refactoring automation platform enabling organizations to adapt faster, safer, and at scale. Whether you're looking to break free from vendor lock-in, manage cross-tier migrations in heterogeneous environments, or orchestrate complex upgrade paths across multiple teams and releases — OpenRewrite provides the foundation. After a brief introduction to OpenRewrite and the core concepts that make it tick — recipes, ASTs, refactoring rules, and semantic understanding — the floor is open. Together, we’ll explore three key dimensions:

First, we may look at tech stack liquidity — the idea that your tech stack should be a strategic asset, not a constraint. Learn how organizations use OpenRewrite to maintain digital sovereignty, reduce lock-in, and avoid painful migrations when vendors or frameworks evolve.
Next, we can shift into the nuts and bolts of polyglot migrations. This is where developers feel the magic: multi-format upgrades, across Java, YAML, XML, SQL, and more — with consistent, automatable rules that scale across thousands of repositories and teams.
Finally, for those thinking about delivery and safety, we’ll cover release timing and orchestration. Learn how teams use “release train metro plans” to identify the right upgrade order, avoid breaking dependencies, and roll out coordinated changes across complex systems.

All three of these are on the menu — but you’ll steer the session. Depending on interest, we’ll dive deeper into the strategic, the technical, or the operational. The goal: give you a clear starting point, tangible examples, and the clarity to take the next step in your organization’s modernization journey.

Avatar for Merlin Bögershausen

Merlin Bögershausen

September 15, 2025
Tweet

More Decks by Merlin Bögershausen

Other Decks in Programming

Transcript

  1. ©2025 Moderne, Inc. Training Agenda 3 OpenRewrite and Pizza Session

    Planning Sessions Sprints (30, 15, 5 min) Session Review Session Retro and discussion 01 02 03 04 05 5 mins 50 mins 5 mins 10 mins Open-end
  2. ©2025 Moderne, Inc. Result: Centrally-led, automated migrations made possible within

    the Netflix “Freedom and Responsibility” culture. “Do it for me, and I’m happy to accept the change.” — Netflix engineer “[Challenge accepted!]” — Jonathan Schneider, OpenRewrite creator & Moderne co-founder 5
  3. ©2025 Moderne, Inc. 11 How does the LST compare to

    other code representations? Characterized by serialization, type attribution, format preservation, and other metadata + another 600,000 nodes that didn’t fit in this graphic Text-based search Abstract Syntax Tree (AST) Lossless Semantic Tree (LST)
  4. ©2025 Moderne, Inc. 13 Over 4,000 recipes in catalog Apache

    License Version 2.0 Moderne Proprietary License Moderne Source Available License Fully open source, covering core framework, plugins, and community recipes. Available for use and customization by users and companies with their own code. Fully available to Moderne customers. Example recipes: • Find annotations • Dependency report • Format Java code Example recipes: • Migrate to Spring Boot 3.3 • Migrate Log4j to SLF4J • AssertJ best practices Example recipes: • Migrate to Spring Boot 3.5 • Post quantum cryptography • Fix vulnerable dependencies
  5. ©2025 Moderne, Inc. 10 What real, automated code remediation looks

    like No longer define an expected exception on the ‘@Test’ annotation Auto-refactoring relocates the original contents into a lambda argument in an ‘assertThrows’ call and formats per existing code style EXAMPLE: JUnit 4 to 5 migration: “assertThrows” call added to the test’s method body Accurate code changes that match the local code style across 1,000s of repositories. 9
  6. ©2025 Moderne, Inc. 14 Three ways to run recipes Maven

    and Gradle Build Plugins Moderne SaaS Moderne CLI Use build plugins to run a recipe against a single repository. LSTs are stored in memory. Use the Moderne CLI to run a recipe against multiple public repositories. LSTs are serialized to disk. Requires a license to run on private repositories. Browse a marketplace of over 4,000 recipes and run any of them against a selection of over 38,000 open source repositories. mvn rewrite:run gradle rewriteRun mod run . --recipe=<recipe> https://app.moderne.io
  7. ©2025 Moderne, Inc. 7 OpenRewrite scaled with Moderne Single-repository mode

    Multi-repository mode OpenRewrite OSS Project Serialize LSTs to disk to scale across repos OpenRewrite Gradle Plugin OpenRewrite Maven Plugin GitHub Copilot upgrade assistant for Java Amazon Q Developer JetBrains IntelliJ IDEA Broadcom App Advisor Moderne Platform Moderne CLI / IDE plugin Single- tenant SaaS Moderne proprietary IP Moderne DX Air-gapped service Shared OSS recipe ecosystem plus Moderne proprietary recipes for major migrations and security Codemods, linters, & other refactoring tech
  8. ©2025 Moderne, Inc. 14 Sessions Building Blocks to vote Achieving

    digital sovereignty with tech stack liquidity Unveiling Your Organization's Hidden Dependency Network Polyglot Migrations: Automating Cross-Tier Tech Upgrades at Scale
  9. 15 You have 3 Points The Slido app must be

    installed on every computer you’re presenting from
  10. ©2025 Moderne, Inc. 22 500+ repositories • Java backends •

    React frontends • Python services Log4j vulnerability hits => Manual patching: weeks of work Current Reality • Automated migrations • Hours instead of weeks • Consistent across all languages • Traceable and safe The Migration Challenge The Vision
  11. ©2025 Moderne, Inc. 18 Metrics That Matter • Repositories migrated/day

    • Lines of code transformed • Time to complete migration • PR approval rate • Consistency score • Test pass rate • Security compliance % • Technical debt reduction Velocity Metrics Quality Metrics
  12. ©2025 Moderne, Inc. Moderne case studies and ROI Started using

    Moderne Required Spring Boot version upgrade due to Spring4Shell vulnerability • Closed 384 maintenance stories Q4— 1100% increase YoY • Added 40 more business stories Q4— 30% increase in value Development teams can reduce business risk and add more business value every day. “We estimated a 30-50% reduction in the time required to complete the upgrade and refactoring tasks to Java 17 as opposed to doing it manually.” Insurance company Financial institution Healthcare Hospitality Pandian Velayutham Vice President of Technology Strategy MEDHOST “One of the key things that Moderne has done for our business is allowed us to lower our cybersecurity risk. As we continue to upgrade these libraries and get to the latest and the fully patched versions, we’re much, much safer.” Jason Simpson Vice President of Engineering Choice Hotels
  13. ©2025 Moderne, Inc. Has any of you ever carried out

    a framework migration in a production environment? POLL POLL 1
  14. ©2025 Moderne, Inc. Contents 3 Problem Automate Migrations Demo: Live

    migrations Post-quantum cryptography Strategic Implikation
  15. ©2025 Moderne, Inc. 32 • Ability to operate IT systems

    independently • Control over technological decisions • Responsiveness to threats Definition beyond political rhetoric Digital sovereignty Core problem: operational dependency Java EE + commercial JVM + JBoss EAP → Migration pressure due to EOL/licences
  16. ©2025 Moderne, Inc. 33 Enabling Property Tech-Stack-Liquidity An organisation's ability

    to make technological decisions reversible and respond quickly to new requirements. Measurable: time between decision and comprehensive implementation
  17. ©2025 Moderne, Inc. The ankle breaker Mathematics of complexity n

    Repositories x m frameworks = n x m combinations 50 repositories × 5 versions = 250 migration variants "Who works with more than 50 repositories?"
  18. ©2025 Moderne, Inc. Post-quantum: time pressure and standards 2024 NIST

    standards published 2025 BSI recommendations active 2030 EU mandates expected 2035 Quantum computers available? banks, insurance companies, public authorities affected by "Harvest now, decrypt later"
  19. ©2025 Moderne, Inc. Vendor Independence Framework change reversible No permanent

    lock-ins Security Agility CVE response in hours Log4Shell secured in parallel Future-Proofing Proactive modernisation Controlled process Cost Control Legacy support reduced Current versions everywhere Four dimensions of digital sovereignty
  20. ©2025 Moderne, Inc. Key Takeaways 1. Tech stack liquidity as

    a measurable KPI for digital sovereignty 2. Automation is possible – 85–95% of migrations 3. Post-quantum migration is a concrete, urgent use case 4. Typical ROI of 500-1000% at enterprise scale
  21. ©2025 Moderne, Inc. 44 "It's Just a Small Fix“ -

    famous last words of software engineering
  22. ©2025 Moderne, Inc. 45 09:02 “Yo, this needs a parameter”

    09:15 PR green and approved 09:18 merge success 09:28 CI on main green 09:29 click Release and Coffee 09:35 Next Issue Timeline The last Simple Fix
  23. ©2025 Moderne, Inc. 46 rewrite-migrate-java (1 module) Parameter is optional,

    no problem! What we thought Direct • moderneinc/rewrite-cryptography • moderneinc/rewrite-devcenter • moderneinc/rewrite-hibernate • moderneinc/rewrite-java-security • openrewrite/rewrite-hibernate • openrewrite/rewrite-liberty • openrewrite/rewrite-micronaut • openrewrite/rewrite-rewrite Transitive • moderneinc/rewrite-spring • moderneinc/rewrite-vulncheck • openrewrite/rewrite-recipe-markdown-generator, • openrewrite/rewrite-spring The Hidden Reality What We Actually Affected
  24. ©2025 Moderne, Inc. 47 We Navigate Our Software Blind No

    visibility dependency chains No impact analysis before unpredicted ripple effects Discovery through failures "Dieses Foto" by Unknown Author is licensed under CC BY-SA
  25. ©2025 Moderne, Inc. 48 Release Train Metro Plan Every software

    release is a journey through connected components.
  26. ©2025 Moderne, Inc. 49 The Metro Metaphor Metro Software System

    Stations Components/Artifacts Lines Dependencies Metro Map Dependency Graph Journey Planning Release Planning Service Disruption Breaking Changes By Unknown Author is licensed under CC BY-SA
  27. ©2025 Moderne, Inc. 51 Three simple (automatable) Steps Extract Process

    Visualize OpenRewrite analyzes your codebases with recipes Connect and enrich the dependency data Interactive metro map
  28. ©2025 Moderne, Inc. 52 OpenRewrite DataTables mod run . --recipe=ReleaseTrainMetroPlan

    <project> <groupId>org.example</groupId> <artifactId>core-lib</artifactId> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> </dependency> </dependencies> </project> repositoryPath groupId artifactId example/core org.example core-lib repositoryPath groupId artifactId example/core org.springframework spring-core ProjectCoordinates.csv DependenciesInUse.csv Recipes see Recipes produces
  29. ©2025 Moderne, Inc. 53 Data Pipeline ProjectCoordinates.csv DependenciesInUse.csv ParentRelationships.csv Kotlin

    Processing connections.json 1. Read information 2. Group by repositoryPath 3. Produce Graph representation
  30. ©2025 Moderne, Inc. 60 • ~10 services • ~50 dependencies

    • Simple relationships What teams think • 100+ components • 1000+ dependencies • Multi-level transitivity • Hidden coupling The Scale Problem What teams have
  31. ©2025 Moderne, Inc. 61 Week 1 – Discover Week 2

    - Integrate Week 3 - Operationalize Adoption Plan • Run recipes on your Teams codebase • Generate first visualization • Share "aha!" moment with Team • Add to CI/CD pipeline • Publish to team wiki • Train developers • Pre-release checks • Dependency reviews • Architecture decisions
  32. ©2025 Moderne, Inc. 62 Simple ✅ Understands build semantics ✅

    Handles multi-module projects ✅ Processes inheritance correctly ✅ Scales to thousands of modules ✅ Works across repository boundaries Why OpenRewrite Sematic Power Each producing a DataTable ReleaseTrainMetroPlan: - FindMavenProjectIDs - FindGradleProjectIDs - FindMavenParentRelationships - FindGradleParentRelationships - FindPotentiallyUnusedDependencies
  33. ©2025 Moderne, Inc. 63 Integration # .github/workflows/metro-map.yml name: Update Metro

    Map on: push: branches: [main] jobs: generate-map: steps: - uses: actions/checkout@v3 - run: mod run . --recipe=ReleaseTrainMetroPlan - run: python process_data.py - run: aws s3 cp metro-map.html s3://wiki/ “Its to complex” – 2 min to save hours “We have private code...” – Runs next to your Build “We use multiple build tools…” – Maven, Gradle, Bazel and more Automatic updates on every merge
  34. ©2025 Moderne, Inc. What is lurking in YOUR dependency Graph?

    POLL POLL 1 You don’t know until you map it!
  35. ©2025 Moderne, Inc. Key Takeaways 1. You can’t fix what

    you don’t see 2. Small changes have big impact 3. The tools you need exists 4. Don’t wait for the next incident to happen. Build your Metro Plan now! https://github.com/MBoegers/Release-Train-Metro-Plan
  36. ©2025 Moderne, Inc. 68 1. Inventory your polyglot landscape 2.

    Identify high-value migrations 3. Start with low-risk recipes 4. Build measurement baseline 5. Scale incrementally 6. Establish migration cadence Playbook • Start small, scale gradually • Version control your recipes • Communicate changes clearly • Measure everything • Build internal expertise • Don‘t push changes to Teams Your Migration Playbook Best Practices
  37. ©2025 Moderne, Inc. 69 Where to learn more docs.openrewrite.org moderne.ai

    app.moderne.io github.com/openrewrite youtube.com/@Moderne-and-OpenRewrite Google Shape;842;p69 O’Reily Book: AI for Mass-Scale Code Refactoring and Analysis