Chapter 11. Building a reusable microservice platform
This chapter covers
- Creating microservices more quickly with a reusable platform
- Components of a reusable platform
- Packaging reusable middleware with NuGet
- Building a reusable platform from several NuGet packages
A microservice system can include many microservices. You’ll create new ones frequently, either because you’re adding capabilities to the system or because you’re replacing existing microservices. You want to able to create them quickly but include all the code that makes them behave well in production—that is, the infrastructure code you’ve created in the previous couple of chapters. In this chapter, you’ll create a platform—consisting of NuGet packages—that enables you to quickly create new, well-behaved microservices.
In chapter 1, I listed a number of characteristics of microservices, including this one: a microservice is responsible for a single capability. I explained that this characteristic is a variation of the Single Responsibility Principle. Taking this seriously drives you toward having many microservices. And as the system evolves, you’ll create new microservices fairly often when the system needs new end user functionality and as your understanding of the domain grows over time.