eclipse-uprotocol / up-spec

uProtocol Specifications
Apache License 2.0
32 stars 25 forks source link

uE Liveliness using uSubscription #148

Open stevenhartley opened 4 months ago

stevenhartley commented 4 months ago

uProtocol is SOA 2.0 (event-based service oriented architecture) meaning, there are no logical connections between uEs, only messages sent across the various heterogeneous systems (ex. publish, notification, request, response).

In some scenarios, a service needs to know when clients disappear (terminated unexpectedly), this is to allow services to cleanup any active session (ex. turning on/off cameras). Today the only way to know for a service to be sure that the client is alive is if the client calls the service RPC periodically (watchdog), this is not efficient or ideal.

The pub/sub architecture pattern implemented through uSubscription provides the means for subscribers to subscribe either temporally or permanently to topics. Publishers can register to receive subscription change notifications whenever a subscriber has changed their subscription (subscribe() and unsubscribe()). Unfortunately the current uSubscription specification does not state how to handle terminated subscribers who are subscribed with temporal subscriptions nor how to detect liveliness.

We will propose a liveliness detection mechanism using uSubscription in this issue.

TODO: Fill out details explanation here