alphaspirit - Fotolia

How can microservices help modernize legacy applications?

Can microservices help modernize legacy applications? An expert lists ways microservices help developers break the monolith into functional services.

To modernize legacy applications, it may be worth it to break the monolith into microservices. The idea behind microservices is that they are small and easily updated. A collection of microservices makes it much faster to fix defects because there is much less code to analyze compared to a monolith. Another benefit of microservices is improved deployment to production, as they are self-contained and a good fit for loosely coupled architectures. With less tight coupling, there are fewer risks of problems in deployment, allowing more frequent releases.

But microservices' ease of deployment creates a shift in the responsibility for feature releases.  With a monolith, the IT department is heavily involved in new feature release schedules because so many things have to be ready for a new release. Microservices can push that release decision to the marketing department because teams can deploy new features easily and with much less risk.

Remember that to reap the benefits of microservices and a broken-up monolith -- and to truly modernize applications -- it's important not to bite off too big a piece to put in a service. Some architects do this because they want to demonstrate a project's value right off the bat. However, when architects take their time and slowly break up the monolith, it's easier to see where you can break off additional pieces. As things loosen up, you can break off larger services into their own classes.

Once you start breaking out functions into microservices, you'll be in better shape to refactor. Even if you have to break functions into poorly constructed microservices, that's OK. You can come back and refactor that microservice later. It's a smaller project than trying to refactor a function inside a monolithic app. When we do our refactoring, I coach everybody by saying, "You're better off getting halfway there today than all the way there next week."

Finally, a big benefit of using microservices to modernize legacy applications is the shorter learning curve for developers, which can make new hires productive quicker. Microservices offer flexibility of platform choice, so less platform-specific knowledge is required.  As long as the API is kept the same, each microservice can use a different tech stack.  If a microservice is better implemented using a Cassandra database instead of Microsoft SQL Server, it can be changed without affecting users.

Dig Deeper on Application management tools and practices

Software Quality
Cloud Computing
TheServerSide.com
Close