In a microservice based application where there are thousands of services with which information needs to be communicated across. There's a concept in materialized called CDC, Change Data Capture. We can take advantage of the incrementally updated materialized views and propagate the changes to some destination with event streaming platform such as KAFKA. As the database changes we publish those changes and services that need to be aware can subscribe to them. This way, it makes your third illustration more loosely coupled.
I am a professional DevOps Engineer with a demonstrated history of working in the internet industry. I am an avid Linux lover and supporter of the open-source movement philosophy.
Location
Sofia, Bulgaria
Work
Developer Advocate at Materialize | Community Manager at DigitalOcean | Co-Founder at DevDojo
In a microservice based application where there are thousands of services with which information needs to be communicated across. There's a concept in materialized called CDC, Change Data Capture. We can take advantage of the incrementally updated materialized views and propagate the changes to some destination with event streaming platform such as KAFKA. As the database changes we publish those changes and services that need to be aware can subscribe to them. This way, it makes your third illustration more loosely coupled.
Yep, Materialize also supports CDC:
materialize.com/docs/guides/cdc-po...
You can use it with Kafka, or if Kafka is not part of your stack already, there is a direct Postgres Source available.
You should check it out 🙌