Introduction
We live in a fast-paced software development landscape, where organisations constantly seek ways to enhance agility and speed up project delivery. One approach that has gained significant popularity is the adoption of microservices for integration.
Microservices offer several benefits from the perspective of both developers and architects, enabling teams to develop, test, and deploy code more efficiently while promoting flexibility and reusability. In this blog, we explore what microservices are, delve into the advantages they can bring to integration projects, and how they helped us overcome a specific problem we faced as an integration partner.
The problem
When working with one of our clients, we encountered a performance-related bug with a monolithic logic app that was causing issues and needed addressing urgently. The original logic app would periodically retrieve all changes to a specific type of data via an API (application programming interfaces), transform, and upload the changed data into a database, all within one logic app.
When considering solutions to this problem, we settled on a microservice architecture to address the performance issue and speed along development now and for the future. The diagram below outlines the solution before we improved it:
Our solution
Our approach involved deconstructing the single logic app into three separate logic apps, supplemented by an additional function. The actors included the following:
-
-
-
- Change Distributor – collect the changes via an API and send the changes to the function
- Microservice Function – to manage complex array filtering and aggregation
- Change Publisher – to handle the data transformation, send the data via sequential convoy
- Change Subscriber – receive and upload to a database in parallel using a sequential convoy
-
-
We improved performance by separating the core functionality of the one monolithic logic app into separate parts and taking advantage of the sequential convoy pattern. By better utilising the strengths of different Microsoft Azure products, we improved delivery time using multiple developers working in parallel with multiple developers. We also increased the overall performance time through several optimisations.
One of the great strengths of Azure Functions is that it can handle copious amounts of data quickly. With this in mind, we shifted the array filtering to a function which sped up the processing time from over an hour to mere seconds. This is a notable example of how breaking any monolithic application or function up with microservices can enhance performance, especially when using the strengths of the resources at your disposal. The diagram below shows the ‘after’ version of the solution:
Conclusion
My personal experience as a developer working with microservices was that I found it much easier to develop as it broke down the work into smaller pieces with defined inputs and outputs. This made it considerably less daunting going in and a lot quicker to bring to completion. When working simultaneously with other developers, having small, individual pieces made it extremely easy to make changes along the way and made coordinating our development a breeze. The same benefits applied to testing, too. Testing each resource in isolation, with a clearly defined expected input and output, allowed us to review each component individually as and when they became ready.
In conclusion, I believe a microservice architecture would benefit almost any application, not just exclusively Azure (although the advantages here are clear!) but any cloud development.
FAQ’s
- What are microservices in the context of project integration? Microservices are small, independent services that work together to form a complete application. In project integration, they enable teams to develop, deploy, and scale different parts of an application independently, enhancing agility and speed.
- How do microservices improve agility in project development? Microservices enhance agility by allowing teams to update and deploy individual components of an application without impacting the entire system. This modular approach enables quicker iterations, rapid adaptation to changes, and more efficient project management.
- What role do microservices play in accelerating project speed? Microservices contribute to faster project execution by enabling parallel development and deployment. Teams can work on different services at the same time, reducing the overall development and deployment time, and speeding up the delivery of project milestones.
- Can microservices integration reduce project complexity? Yes, microservices can reduce project complexity by breaking down large applications into manageable pieces. This simplification allows developers to focus on specific areas of the application, reducing dependencies and making the system easier to understand and maintain.
- What are the challenges of implementing microservices in integration projects? Implementing microservices involves challenges such as managing inter-service communication, ensuring data consistency, and dealing with increased operational complexity. Proper planning, adopting suitable technology solutions, and leveraging automation can help overcome these challenges.