Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3pt] Document IPROTO watchers #2408

Closed
TarantoolBot opened this issue Nov 8, 2021 · 0 comments · Fixed by #3044
Closed

[3pt] Document IPROTO watchers #2408

TarantoolBot opened this issue Nov 8, 2021 · 0 comments · Fixed by #3044
Assignees
Labels
feature A new functionality iproto Related to the iproto protocol reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Nov 8, 2021

Document IPROTO watchers

Product: Tarantool
Root document: https://www.tarantool.io/en/doc/latest/dev_guide/internals/box_protocol/
SME: @ locker
Peer reviewer: @

Details

There are three new commands to support asynchronous server->client
notifications signaled with box.broadcast():

  • IPROTO_WATCH (code 74). Registers a new watcher for the given
    notification key or acknowledges a notification if a watcher is
    already registered. The key name is passed in IPROTO_EVENT_KEY
    (code 0x56). The watcher will be notified unconditionally after
    registration and then every time the key is updated with
    box.broadcast() provided the last notification was acknowledged.
    The server doesn't reply to the request unless it fails to parse
    the packet.

  • IPROTO_UNWATCH (code 75). Unregisters a watcher registered for the
    given notification key. The key name is passed in IPROTO_EVENT_KEY
    (code 0x56). A server doesn't reply to the request unless it fails to
    parse the packet.

  • IPROTO_EVENT (code 76). Sent by the server to notify a client
    about a key update. The key name is passed in IPROTO_EVENT_KEY
    (code 0x56). The key data (optional) is passed in IPROTO_EVENT_DATA
    (code 0x57).

When a connection is closed, all watchers registered for it are
unregistered.

Servers that support the new feature set the IPROTO_FEATURE_WATCHERS
feature bit (bit 3) in reply to the IPROTO_ID command.
Requested by @locker in tarantool/tarantool@4be5de4.

@xuniq xuniq added this to the Estimate [@xuniq] milestone Nov 18, 2021
@xuniq xuniq added feature A new functionality iproto Related to the iproto protocol labels Nov 18, 2021
@xuniq xuniq changed the title Document IPROTO watchers [3pt?] Document IPROTO watchers Dec 3, 2021
@xuniq xuniq changed the title [3pt?] Document IPROTO watchers [3pt] Document IPROTO watchers Dec 10, 2021
@patiencedaur patiencedaur added server [area] Task relates to Tarantool's server (core) functionality reference [location] Tarantool manual, Reference part labels Jul 9, 2022
@xuniq xuniq self-assigned this Jul 21, 2022
@patiencedaur patiencedaur added 1sp and removed 3sp labels Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality iproto Related to the iproto protocol reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants