Modernizing a Legacy System: Build and Deployment
Streamlining Expense Tracking Process by Modernizing a Solution for a US-Based Expense Management Solution Provider
Centralized Expense Management Solution Provider
Our client is an industry leader providing centralized expense management solutions in the telecom and energy sector. They started their journey in the 1980s and have served several large customers with their platform.
Their product is a centralized platform for customers to get informed on their telecom and energy expenses. It helps businesses and government organizations cut costs by running analytics on monthly vendor invoices. Our client also becomes the intermediary between the customer and their vendors to help suggest optimizations of services consumed that reduce billing amounts.
WHAT WE DID
Decades-old systems often stand the test of time, but evolve to accrue a lot of technical debt. Our client's system did so too. The SaaS product was built over 20 years and faced several unexpected issues that caused downtimes and customer frustration. This led to a decision to dedicate time and money to the critical modernization process!
Our approach included the following:
Dot-voting exercise with stakeholders
Identifying their biggest pain points (frequent hotfixes and deployment issues)
Focus on modernizing their build and deployment pipelines
Control new technical debt from flowing in and resolve existing debt
Get them started with automated testing
Creating a strategy for transformation
Setting up a build management system
Introducing quality gates via CI/CD and Sonar
Bringing in testing frameworks and tools
Automating database upgrades
1. CREATING A STRATEGY FOR TRANSFORMATION
Our client’s significant issue was the lack of proper structure, whether in the codebase or processes they followed.
In our case, the way the source code was stored in the version control system and how a development environment understood it were at odds with each other.
We created a strategy to organize the entire source code, resulting in,
- Faster source code environment setup time
- Reduced onboarding overhead for new developers joining the team
- Accelerated build and release process by adopting conventions, leading to a decreased lead time for feature delivery
2. SETTING UP A BUILD MANAGEMENT SYSTEM
In the world of Java, Gradle is one of the standard build and dependency management systems.
For our client, setting up Gradle solved the massive problem of manually performing numerous tasks to create a build, all while hoping and praying the build doesn’t fail.
Tools like Gradle bring the following to the table:
- Automation: Steps to build and test are documented as executable code so that builds are automated, consistent, and reproducible.
- Uniformity: Configuration of software dependencies is stored in the version control system that enforces uniformity across different deployment environments like developer’s machine, test, and production. This uniformity reduces errors typically labeled by saying, “works on my machine”.
3. INTRODUCING QUALITY GATES VIA CI/CD AND SONAR
With Gradle available, our next goal was frequent and smooth deployments. Hence, we established CI/CD (Continuous Integration and Continuous Deployment) pipelines, which automate building, testing, scanning, and deploying code, bringing in predictability in every release.
Thanks to the introduction of proper code review processes, developers no longer work in silos and are responsible for peer-reviewing code changes before merging them into production. This stops new errors from stacking on top of existing problems.
We set up policies in Bitbucket to reject changes whenever a build fails. For this, we used Sonar, a tool that scans code to identify critical bugs. This way, errors that may cause runtime failures do not percolate into existing code.
The practice of putting quality gates is essential for the longevity of any enterprise application. The bare minimum quality gate that should be in place is ensuring the build’s success.
Prioritizing code quality was a huge milestone for our client.
4. BRINGING IN TESTING FRAMEWORKS AND TOOLS
The client’s existing system lacked test frameworks and libraries.
Reliance on manual testing meant prolonged feedback cycles. Testing and releasing new features took longer. This led to severe failures in production after deployment, indicated by high change failure rates.
The first step was to develop an automation testing framework. We introduced test libraries such as JUnit and Mockito, which also facilitated the adoption of practices like test-driven development (TDD). As a result, we began writing tests first before writing new code.
5. AUTOMATING DATABASE UPGRADES
Most organizations often overlook automating database upgrades as part of their release process.
Ad-hoc and manual database upgrades often lead to problems arising from human errors and a lack of uniformity across database environments.
Automating the process is the most foolproof method to avoid running manual queries on a database that can lead to unforeseen errors.
We integrated Liquibase, a database-independent tool to track database changes. This tool works as part of the codebase, automatically connects to the database, and upgrades it while maintaining a history of all changes made.
In most fast-moving teams, developers are constantly busy with tactical work. This fast-paced productivity is illusionary as the throughput of completed tasks often doesn't compare with the time spent.
As more code gets written, the hustle increases further. To break away from the loop, the start of a modernization journey should prioritize important housekeeping activities.
Before making code or architecture changes, you must do the following:
- Ensure uniformity in terms of structure and dependencies of developer, testing, and production environments.
- Automate all build, test, and deployment processes.
- Prevent the spread of all low-quality code while also teaching people what not to do.
- Run automated tests on every commit.
- Pair the best technologies with the best practices to get the most out of them.
Other case studies you may be interested in
Taking Mental Healthcare Solution Global
Making Mental Healthcare Accessible by Expanding the Solution Globally and Providing a Personalized Customer ExperienceREAD CASE STUDY