O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The problem of shared data

Having common shared data among microservices is a huge pitfall. Firstly, all the microservice's requirements may not be satisfied with a single database. Also, it increases development time coupling. For example, InventoryService will need to coordinate the schema changes with the developers of other services that use the same tables. It also increases runtime coupling. If, for instance, a long-running ProductCheckOut service holds a lock on the ORDER table, then any other service using that same table will be blocked. Each service must have its own databases and data must not be directly accessible by any other service.

However, there is a huge situation that we need to take care of. The problem of transactions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required