SpineEventEngine / web

Spine web server and JS client library.
https://spine.io
Apache License 2.0
1 stars 3 forks source link

Reconsider how JS client unsubscribes from subscriptions. #188

Open YegorUdovchenko opened 2 years ago

YegorUdovchenko commented 2 years ago

Spine Web client for JavaScript manages the list of active subscriptions and sends “keep-up” requests to the backend periodically with some interval (20-30 seconds, not sure). When an application that uses Spine Web client unsubscribes from some subscription, a client doesn't send any requests immediately but postpones them to be sent with the next "keep-up" request. This next request usually stays unsent because a user closes an application or signs out. I propose to leave the approach of sending "keep-up" requests as is and send requests that cancel subscriptions immediately.

Also, it would be useful to expand the client's API with a parameter-less method to unsubscribe from all active subscriptions. This would come in hand when a user signs out.