argoproj / argo-events

Event-driven Automation Framework for Kubernetes
https://argoproj.github.io/argo-events/
Apache License 2.0
2.34k stars 729 forks source link

DB event source #1827

Open tooptoop4 opened 2 years ago

tooptoop4 commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, argo-events only supports data-driven event pipelines for S3 like stores. This is a proposal to build a gateway to support watching/registering for events from an SQL or query-based backend data store.

Describe the solution you'd like A new gateway implementation that makes a connection to a database, supports a query pattern, and implements a simple cron expression to manual poll (or query in this case). We can probably leverage the go-cloud project's ability to connect to MySQL or PostgreSQL DBs for now.

Describe alternatives you've considered I'd also be interested in looking at databases where you don't have to implement manual polling mechanisms and the DB itself has a concept of triggers and possibly integrating argo-events to be a subscriber of these events...

Additional context Event conditions - a structured API or interface for performing the actual query / search. This has implications around what DBs/languages to support. A simple example would be to support SQL - like queries through an already established interface like the golang db package. This could be even easier to implement by leveraging the go-cloud project.

Payload - payload for the event contains the results/rows of the query

some of https://github.com/argoproj-labs/argo-dataflow/pull/215/files might be re-usable

Lata1980 commented 1 year ago

Hi @tooptoop4 I am a first time contributor. I have some experience using argo events and DB. I would like to contribute here.

whynowy commented 1 year ago

Hi @tooptoop4 I am a first time contributor. I have some experience using argo events and DB. I would like to contribute here.

👍

swathida-byte commented 8 months ago

I have Mysql database how do I use that as a event source in argo events?