Moving a monolithic application to a modern cloud architecture can be difficult and often result in a greenfield development effort. However, it is possible to move towards a cloud architecture using Docker Enterprise Edition with no code changes and gain choice , security and operational agility in the process.
Part 3 of the series begins the modernization process. I’ll take one aspect of the current application and break it out into a microservice. As written, the application writes to the database directly, but direct writes to the database can easily overwhelm the application by a large number of requests.
One solution is to implement a messaging queue. As in the part 2, I’ll follow several guidelines:
- Leave existing code in place.
- Design the new code as a separate and reusable application
- Deploy the microservice locally using Docker Enterise Edition
- Test the code
In this part of the modernization process, I add a message queue comprised of a REST interface that writes to a Redis database. The user data is held in Redis until it’s requested by a worker service that does the write to the database. The message queue uses Spring Boot to implement both the REST interface and the Redis database functions. I chose Redis because it has a method to pull the data without continuous polling, creating an efficient messaging queue.
To learn more about Docker solutions for Developers:
This syndicated content is provided by Docker and was originally posted at https://blog.docker.com/2018/03/video-series-modernizing-java-apps-developers-part-3/