support for nats.io as trigger? #1577
-
Hey, would it be possible to support nats.io as trigger for windmill? I could use https://github.com/sandstorm/caddy-nats-bridge as a workaround, but I'd prefer direct integration to keep complexity low :) All the best and keep up the great work, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
... thinking about it, even more powerful would be IMHO some kind of "Daemon Mode" script - i.e. a script which is running permanently (and restarted if it crashes). Then, this script could listen to NATS topics and trigger windmill logic as needed. Curious about your thoughts :) |
Beta Was this translation helpful? Give feedback.
-
I think adding a script as a daemon is somewhat better suited to a sidecar so that it can be handled by docker itself. I do have the plan to standardize all such external queue and event system under a collection of "adapters". I wrote one for postgresql listen/notify in https://github.com/windmill-labs/windmill-adapters and I think nats could work the same way. We would have a side container or deno run script that would listen to nats events and forward to windmill. WDYT? |
Beta Was this translation helpful? Give feedback.
-
That makes a lot of sense but I think to reduce complexity you could still make it work using a sidecar AND use autodiscovery. It's not as complex as one might think because windmill expose webhooks that are triggered upon any changes such as deploying scripts and flows. I am also open to have a native integration of NATS in windmill but that is a lot more complexity in both backend and frontend and I would think that one would want to a v0 of such system before investing too much in that direction. The sidecar would behave as follows.
WDYT ? |
Beta Was this translation helpful? Give feedback.
That makes a lot of sense but I think to reduce complexity you could still make it work using a sidecar AND use autodiscovery.
For instance, you could have a naming scheme such that all scripts and flows under
f/nats_discovery/mychannel
will listen to mychannel.This way, you can natively integrate into windmill current scheme without modifications and all the 'complexity' would be inside the sidecar.
It's not as complex as one might think because windmill expose webhooks that are triggered upon any changes such as deploying scripts and flows.
I am also open to have a native integration of NATS in windmill but that is a lot more complexity in both backend and frontend and I would think th…