-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Changes queues are the core of blobs synchronisations and can be used by indexers or other agents, They can are created on the source and are semi persistent.
Key mechanism is the following:
- anonymous changes queue are created by a
POSTto/<storage>/_queue. An id is returned allowing the listener to watch changes on it. - named queue are created by a
PUTto/storage/_queue/<name>. If the queue exists, a conflicts is returned (409) . - Multiple listeners can watch a queue, the queue items are balanced between them. An option can be passed to only accept one listener for a queue.
- Queue can be watched using websockets or webrtc (data channels). A detection mechanism is provided to detect on the source the transport used.
- A watcher can continuously watch queue
- Items are received in bulk operation:
- During watching operations a controller ask for N blobs
- if no blobs are available a
NOPis sent to the listener - Once the N blobs are received by the listener an
ACKis sent to the queue - If an
ACKis received on the queue, blobs received are deleted from the queue - If a
NOPoperation is received on the queue, nothing is done.NOPoperations are used to maintain the connection alive
- Queues are persistent.
- Queues can be automatically deleted if they has been active since a while. Optionnal.