简体   繁体   中英

Orion Context Broker delivery guarantees?

Thinking of 'production' usage of Orion Context Broker, I wonder what kind of guarantees are provided by the Orion Context Broker in terms of delivery of messages -- both from producer and consumer perspective? In particular, keeping in mind various possible failure scenarios (CB failure/restart, network transient failure, consumer failure/restart, etc), as well as possibility of resource congestion in the CB. Few examples:

1) if a context update operation succeeds, is it guaranteed that consequent queries will return the latest data (eg, even if CB failed right after acknowledging the update request, and then restarted)?

2) if a consumer subscribed for certain context information, is it guaranteed that it will receive all the relevant updates -- exactly once, at least once, or even at all? (eg, in case of transient network failure between CB and the consumer)

3) if a consumer updated its subscription, is it guaranteed that the consequent updates will accurately reflect it? (eg, if CB failed right after acknowledging the subscription request, and then restarted)

4) if a consumer is subscribed for context changes ('onchange', no throttling), and there are multiple consequent updates from the producer affecting the same attribute, is it guaranteed that each of the changes will be sent (or some might be skipped -- eg, due to too many notifications that CB needs to send during a certain period of time), in any particular order?

etc...

Thanks!

Answering bullet by bullet:

  1. In general, if the client receives a 2xx response ( inside of the response payload in the case of NGSIv1, HTTP response code in the case of NGSIv2) it can assume that the update has been persisted in context database, so subsequent queries will return that data (except in the case of running CB with -writeConcern 0 if the DB fails before the update can be persisted from DB memory to disk).

  2. In order to keep things simpler, CB uses a "fire and forget" notification policy. However, CB can be combined with HTTP relaying software (eg Rush , event buses, etc.) in order to implement retries, etc.

  3. Similar to case 1, if the client receives a 2xx response ( inside of the response payload in the case of NGSIv1, HTTP response code in the case of NGSIv2) it can assume that the update has been persisted in context database (except in the case of running CB with -writeConcern 0 if the DB fails before the update can be persisted from DB memory to disk), so notifications of such data (due to either existing subscriptions or new ones) will use the new value.

  4. All notifications will be sent as long as thread saturation (in the case of -notificationMode transient ) or queue saturation ( -notification threadpool:q:n ) don't occur. You can find more information about notification modes in Orion documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM