italanta/kujali

🏘️⚡ Add reactive subscriptions to Cloud SQL

Opened this issue · 0 comments

Prerequisites

Technical requirement

One of the great architectural features Firestore offers us in its DB design is the ability to listen to CREATE/UPDATE/DELETE events on the data.

With a more traditional SQL database this functionality does not exist.

We therefore want to add that functionality to SQL within our architecture.

Technical design

Integrate the use of Pub/Sub in the library connected to the SQL database.

Create a Pub/Sub topic and publish to it when you insert new data to the database. Create a generic DbEventOccured interface to define what data the Pub/Sub endpoint can handle.

DbEventOccured should include at least the table name, record id, data and id.