Skip to content

Tuple formats in IPROTO #3822

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

Open
4 tasks
Tracked by #4505
TarantoolBot opened this issue Oct 27, 2023 · 0 comments
Open
4 tasks
Tracked by #4505

Tuple formats in IPROTO #3822

TarantoolBot opened this issue Oct 27, 2023 · 0 comments
Labels
3.0 feature A new functionality iproto Related to the iproto protocol msgpack

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Oct 27, 2023

Product: Tarantool
Since: 3.0
Root document:
https://www.tarantool.io/en/doc/latest/dev_guide/internals/msgpack_extensions/
https://www.tarantool.io/en/doc/latest/dev_guide/internals/box_protocol/
https://www.tarantool.io/en/doc/latest/reference/reference_lua/compat/

SME: @ CuriousGeorgiy

Details

New MsgPack extension was added, MP_TUPLE, which is used exclusively
in IPROTO. It has the following structure:
+----------+-----------------+----------+
|MP_EXT = 7| MP_UINT | MP_ARRAY |
+----------+-----------------+----------+
^ ^
format identifier tuple data

New IPROTO features were added:

  • IPROTO_FEATURE_DML_TUPLE_EXTENSION = 7 — tuples in IPROTO_DATA are
    encoded as MP_TUPLE and tuple format is sent in response to DML
    requests.
  • IPROTO_FEATURE_CALL_RET_TUPLE_EXTENSION = 8 —tuples in IPROTO_DATA
    are encoded as MP_TUPLE and tuple format is sent in response to call
    and eval requests.
  • IPROTO_FEATURE_CALL_ARG_TUPLE_EXTENSION = 9 — tuples in IPROTO_TUPLE
    of call and eval requests are encoded as MP_TUPLE with their
    formats encoded as described below.

The IPROTO_FEATURE_DML_TUPLE_EXTENSION feature can be enabled in
net.box by setting the fetch_schema option to false when creating a
new connection.

A new IPROTO key for bodies of responses with data and bodies of call and
eval requests: IPROTO_TUPLE_FORMATS = 0x60 — a MP_MAP consisting of
MP_UINT keys (format identifiers) and MP_STRING values (tuple format
clauses).

A new backward compatibility option was added (and a new page,
https://tarantool.io/compat/box_tuple_extension, needs to be created for
it): BOX_TUPLE_EXTENSION_BRIEF — it controls the
IPROTO_FEATURE_CALL_RET_TUPLE_EXTENSION and
IPROTO_FEATURE_CALL_ARG_TUPLE_EXTENSION feature bits. It was added for
clients that assume to receive MP_ARRAYs in call and eval requests
arguments and response data.

Please refer to the design document for details.
Requested by @CuriousGeorgiy in tarantool/tarantool@d79e7a3.

Document:

  • MP_TUPLE MsgPack extension
  • IPROTO features
  • IPROTO keys
  • box_tuple_extension compat option
@xuniq xuniq self-assigned this Nov 2, 2023
@xuniq xuniq added iproto Related to the iproto protocol feature A new functionality 3.0 msgpack labels Nov 9, 2023
@xuniq xuniq removed their assignment Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 feature A new functionality iproto Related to the iproto protocol msgpack
Projects
None yet
Development

No branches or pull requests

2 participants