sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.46k stars 49 forks source link

Add real-time events through SSE and/or websocket endpoint #448

Open acouvreur opened 2 weeks ago

acouvreur commented 2 weeks ago

Create a Server Sent Event endpoint or a websocket endpoint to allow consumer to display live informations.

Such endpoint could be sent as response href/location header (X-Sablier-SSE-url, etc.) to fetch the events related to the initial query.

Plugins could then call this once and then just receive live update. And this connection would keep the session up all the time.

sftim commented 1 week ago

SSE updates would be handy.

For Kubernetes, I wonder if emitting Events is also appropriate?

acouvreur commented 1 week ago

Kubernetes events will be listened to because Sablier triggers this events by changing the cluster resources.

At some point this project is also some kind of abstraction on turning on and off workloads.

For each concrete implementation (docker, kubernetes, etc.) the project needs a uniformized way of saying: container has started/deployement is ready/etc.