Grokking Microservices Design Patterns
Vote
0% completed
Database per Service: An Example
The last lesson covered the architecture choices inside the pattern. This lesson shows the pattern in working code. We build one small feature: an order details page that shows product names next to quantities.
The Setup
Our example has two services, and each one owns its own data store.
- OrderService owns two PostgreSQL tables,
ordersandorder_lines. One order row has many order line rows. PostgreSQL is a relational database. - CatalogService owns a MongoDB collection (MongoDB's version of a table) named
products. MongoDB is a document database.
.....
.....
.....
Like the course? Get enrolled and start learning!