SpineEventEngine / web

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

Changes from `v.1.7.4` in `v1.9` #190

Closed dmdashenkov closed 1 year ago

dmdashenkov commented 2 years ago

To reproduce the v.1.7.4 changes in new 1.x releases, the following alterations must be done:

message Responses { repeated spine.core.Response response = 1 [(required) = true, (validate) = true]; }


 - On the server side, two new servlets are introduced. Their default request paths are `/subscription/keep-up-all` and `/subscription/cancel-all`. The servlets accept the `Subscriptions` message as the request and write the `Responses` message into the response. Both servlets process the subscriptions bulk (by keeping them up or cancelling them). Each subscription is processed independently of the others, and the responses in the `Responses` message reflect that processing. The sizes of the two collections, subscriptions and responses, are always the same. A response with index `n` corresponds to the subscription with index `n`.
 - On the client side, when it's time to send keep-up requests, instead of sending many to `/subscription/keep-up`, we send just one to `/subscription/keep-up-all`. We also send a single request to cancel all subscriptions that have been closed on the client via `/subscription/cancel-all`. Lastly, we delete locally any subscriptions that result in a `Response` other than an `OK`.

See #170 for more details on the implementation.
armiol commented 1 year ago

Addressed in #193.