Systematic’s Java Migration Journey

Tech Byte

Systematic’s Java Migration Journey - From Java8 to Java17

Staying current with technology is undoubtedly critical in today's fast-evolving digital landscape. As the leading provider of advanced defence software, we are constantly working on enhancing our codebase, ensuring its stability, reliability, and scalability. In this Tech Byte, Mihaela Gheorghe-Roman, Software Architect in the Defence HQ team, outlines Systematic's migrating journey going from Java8 to Java17 - with an intermediate stop at Java11 - focusing on the motivation, overall architecture, benefits, challenges, and future prospects.


By Mihaela Gheorghe-Roman, Software Architect in Defence HQ.

Context: The Complexity of Defense Software

Building software for defense involves high stakes, as any disruption in service could have severe consequences for our customers and end users. Systematic's architecture encompasses a massive Java8 monolith application, .Net and Scala monoliths being migrated to Java, numerous Java8 plugins, and newly developed microservices. Acknowledging this complexity, the migration task is substantial.

Motivation for Migration

Despite the common saying; “If it ain’t broke, don’t fix it,” Systematic had compelling reasons to embark on this migration journey:

  • Improving Development Practices
    Leveraging new enhancements in Java language levels to write more maintainable and scalable code with lower error risks.

  • Security and Vulnerability Fixes
    Migrating to newer Java versions allows addressing vulnerabilities directly, eliminating the need for workarounds in Java8 code. Also, Java enhanced its security model with each version, offering more robust protection against vulnerabilities and attacks.

  • Extended Java APIs and Libraries
    Accessing the extended Java APIs and libraries provides developers with additional functionalities and tools.

  • Performance Improvements
    New garbage collectors in later Java versions contribute to performance enhancements. Also, newer versions have made considerable improvements in terms of speed, efficiency, and resource management.

  • Infrastructure Component Updates
    Necessitated by the need to upgrade Wildfly to a newer version and adopt the latest Spring Framework versions, requiring at least Java11 and Java17, respectively.

 

"Building software for defense involves high stakes, as any disruption in service could have severe consequences for our customers and end users. Therefore, the journey towards newer Java versions continues, ensuring that the software remains robust, secure, and equipped with the latest features."

Benefits of Migrating from Java8 to Java11 and Java17

  • Multi-release Jars
    Facilitates runtime class replacement.
    It supports multiple implementations within a single JAR file and caters to different Java versions.

  • Switch Expressions
    Allows case expressions with multiple values.
    Can be used on Enums.
    Enhances code readability and conciseness.

  • Pattern Matching
    Simplifies code for type checking and casting.
    Introduces pattern matching for instanceof and switch expressions, improving code readability.

  • Text Blocks
    Enables multiline text, facilitating cleaner representation of HTML, SQL, and license statements.

  • New APIs for Stream and Arrays
    Introduces enhanced APIs for Streams and Arrays, providing more capabilities for developers.

  • Records and Content-Specific Deserialisation
    Provides the option to use Records and introduces content-specific deserialisation.

Challenges in Migration

Despite the benefits outlined above, migrating from Java8 to Java11 and then Java17 is not without its challenges, including, for instance:

  • Missing Libraries: Some libraries may not be compatible or need updates.

  • Removed APIs: Changes in the Java API may require adjustments to the codebase.

  • Out-of-Date Dependencies: Upgrading dependencies to versions compatible with Java 17 is necessary.

  • Deprecated Language Functionalities: Adjustments are needed due to deprecated functionalities.


The Developer’s Perspective:  The Ongoing Journey

The migration journey doesn't end with Java17. Systematic plans to continue upgrading, and we have our sight set on Java21 or other LTS Java versions available when performing the next migration. The upcoming versions include enticing features like virtual thread sequence collections and record patterns. The commitment to staying current ensures that Systematic's software remains at the forefront of Java's capabilities, providing enhanced functionalities and improved performance.

In conclusion, Systematic's systematic approach to migrating Java reflects the commitment to progress and innovation of defence software development. The challenges encountered are outweighed by the benefits gained, and the journey continues towards newer Java versions, ensuring the software remains robust, secure, and equipped with the latest features.

About the author

Mihaela Gheorghe-Roman is a Software Architect dedicated to the Defence HQ team and an Assistant Professor at the University of Cybernetics and Informatics in Bucharest. 
In her professional career, spanning over 12+ years, she has worked in the telecom and defence domains with a focus on Java, Spring Boot, C, C#, Scala, and Angular. Mihaela enjoys sharing her knowledge with peers, be it on Medium, at conferences or in the office.

Systematic Tech Bytes

This is part of Systematic Tech Bytes, a series of tech blogs where our dedicated colleagues will share bits (and bytes) of their expertise, insights, and experiences in the ever-evolving world of technology. From the latest industry trends to insider tips, innovation highlights to problem-solving strategies, our team opens the door to their knowledge treasury, decoding the details of tech, one byte at a time.