3 ms·
Database-as-an-integration-layer is a well known anti-pattern. It's tempting because it's easy, and at first glance it seems to solve lots of problems (consist
by nl 12y ago
Database-as-an-integration-layer is a well known anti-pattern.
It's tempting because it's easy, and at first glance it seems to solve lots of problems (consistency, communication etc).
It's a big mistake.
If multiple service are reading and writing from the same DB it rapidly becomes impossible to change things.
Things like input validation changes suddenly have to be implemented in multiple places (which is hard), and done simultaneously (which often becomes hard enough to stop work being done).
In a microservice based approach, the data flows though shared services, and so changes can be done in fewer places.
(Note that read-only, reporting-style databases are separate. I think there is a good case for these being shared)
- dragonwriter 12y agoMultiple services reading from the same DB can -- and should -- be using different accounts that have access to different objects that abstract the underlying data model from the various clients and keep them loosely coupled. This is almost as old of a recommendation as relational DBs themselves. You can create a tightly coupled design with a shared DB, but there is nothing inherent with shared DB integration requires that.