Skip to content

Changes from v.1.7.4 in v1.9 #190

@dmdashenkov

Description

@dmdashenkov

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

  • Protobuf messages Subscriptions and Responses are introduced. The messages merely wrap lists of Spine core types:
message Subscriptions {
    repeated spine.client.Subscription subscription = 1 [(required) = true, (validate) = true];
}

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions