This chapter presents a number of scenarios in which microservices can be useful. Section 2.1 focuses on the modernization of a legacy web application. This is the most common use case for microservices. A very different scenario is discussed in section 2.2. A signaling system is being developed as a distributed system based on microservices. Section 2.3 draws some conclusions and invites the reader to judge the usefulness of microservices in the scenarios presented for themselves.
Modernizing an E-Commerce Legacy Application
Migrating from a legacy deployment monolith is the most common scenario for microservices. This section starts with a general description of such a scenario and then gets into the details of the legacy application and how to modularize it into microservices.
Big Money Online Commerce Inc. runs an e-commerce shop, which is the main source of the company’s revenue. It’s a web application that offers many different functions, such as user registration and administration, product search, an overview of orders, and, of course, the ordering process, the central feature of any e-commerce application.
The application is a deployment monolith: it can only be deployed in its entirety. Whenever a feature is changed, the entire application needs to be deployed anew. The e-commerce shop works together with other systems—for example, with accounting and logistics.