-
Book Overview & Buying
-
Table Of Contents
Microservices Design Patterns in .NET - Second Edition
By :
One of the most challenging aspects of microservices is managing data. Unlike a monolithic system, where data typically resides in a single relational database, microservices adopt a decentralized approach to data ownership. Each service maintains its own schema and does not permit direct queries from other services.
In our healthcare management system, each microservice was designed to own its data and select the storage technology best suited to its domain. For example, the Patient Service uses PostgreSQL to store structured demographic and clinical data that benefits from relational integrity and transactional support. Conversely, the Notification Service employs a NoSQL database, optimized for storing message templates, delivery logs, and event metadata that require flexible schemas and high write throughput. This intentional use of polyglot persistence ensures that each service operates with a data model and technology stack tailored...