aviyelverse / Open-Source-Requests

A curation of paid and unpaid requests for the community to work on.
18 stars 4 forks source link

WebSocket/Server sent events implementation #43

Open ghost opened 2 years ago

ghost commented 2 years ago

We want to implement some notion of server transmitted data, as we want to be able to transmit to the client when a batch job is completed, and as an example notify that a file is now ready to be downloaded. Should expandable upon later, such as pushing a notification when a user is mentioned in a comment on an order, etc.

Part of this ticket is investigating how we should approach this, as WebSocket/SSE is not very "RESTy". One idea would be to subscribe to an event, and when detected push to the client "you should GET /admin/batch/", to keep it slim and still make use of the existing RESTFUL API.