Skip to content

add changes queue support #18

@benoitc

Description

@benoitc

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 POST to /<storage>/_queue. An id is returned allowing the listener to watch changes on it.
  • named queue are created by a PUT to /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:
    1. During watching operations a controller ask for N blobs
    2. if no blobs are available a NOP is sent to the listener
    3. Once the N blobs are received by the listener an ACK is sent to the queue
    4. If an ACK is received on the queue, blobs received are deleted from the queue
    5. If a NOP operation is received on the queue, nothing is done. NOP operations are used to maintain the connection alive
  • Queues are persistent.
  • Queues can be automatically deleted if they has been active since a while. Optionnal.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions