hasura / hasura/graphql-engine

Use CDC, like Debezium for event triggers instead of polling databases

Open
#9,852 2 comments 1 reaction 0 assignees View on GitHub
a/eventing/data-triggers k/enhancement t/gql-services
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

We like Hasura a lot and the event triggers also make a ton of sense. However, the tracking of event triggers leaves something to be desired.

### Describe the solution you'd like
#### Use [Debezium](https://debezium.io/documentation/reference/stable/index.html) like CDC for events
##### This has a lot of benefits as described below
* Tracking the events in some tables causes a lot of overhead when most will pass anyway, instead what could happen is, Hasura could use e.g. The WAL for postgres , and other mechanisms for other databases, and only write to database on failures for retries.
* This is also nice because then there is lesser or actually no load on database for events unless they fail in which case you need to know and store anyway.
* This also could help in searching for failures as successes could be simply noted without any details, and hasura console will get much faster.
* Another benefit could be hasura could allow multiple triggers on the same table and even column with some ordering as it is not adding any functions/triggers to the database.

### Describe alternatives you've considered

There is not much else to do other than then not use the nice features of hasura but use kafka to get change events from database and react to the changes using kafka or kafka streams.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.