Skip to content
Snippets Groups Projects
user avatar
Vladimir Davydov authored
Part of #6257

@TarantoolBot document
Title: Document IPROTO watchers

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.
4be5de4c
History

Tarantool

Build Status Build Status Code Coverage Telegram Slack Gitter Google Groups

https://tarantool.io/en/

Patch submissions and discussion of particular patches https://lists.tarantool.org/mailman/listinfo/tarantool-patches/

General development discussions https://lists.tarantool.org/mailman/listinfo/tarantool-discussions/

Tarantool is an in-memory database and application server.

Key features of the application server:

  • 100% compatible drop-in replacement for Lua 5.1, based on LuaJIT 2.1. Simply use #!/usr/bin/tarantool instead of #!/usr/bin/lua in your script.
  • full support for Lua modules and a rich set of own modules, including cooperative multitasking, non-blocking I/O, access to external databases, etc

Key features of the database:

  • ANSI SQL, including views, joins, referential and check constraints
  • MsgPack data format and MsgPack based client-server protocol
  • two data engines: 100% in-memory with optional persistence and an own implementation of LSM-tree, to use with large data sets
  • multiple index types: HASH, TREE, RTREE, BITSET
  • asynchronous master-master replication
  • authentication and access control
  • the database is just a C extension to the application server and can be turned off

Supported platforms are Linux/x86, FreeBSD/x86 and OpenBSD/x86, Mac OS X.

Tarantool is ideal for data-enriched components of scalable Web architecture: queue servers, caches, stateful Web applications.

To download and install Tarantool as a binary package for your OS, please visit https://tarantool.io/en/download/.

To build Tarantool from source, see detailed instructions in the Tarantool documentation at https://tarantool.io/en/doc/2.1/dev_guide/building_from_source/.

Please report bugs at https://github.com/tarantool/tarantool/issues We also warmly welcome your feedback in the discussion mailing list, tarantool@googlegroups.com.

Thank you for your interest in Tarantool!