Instead of having to pack a request to binary format, use FFI
Today, when passing on a request from Lua to the box core, we have to pack it to binary format, and then unpack again in the box.
Instead, the "common API", that is, the box core API used both from the binary protocol and from Lua, should accept structured data.
An example of structured data for SELECT request:
struct select_request {
void *key;
u32 key_cardinality;
u32 offset;
u32 limit;
};
/* in other words, all arguments already decoded from the binary protocol format, and easy to process by the select code. */
The functions, responsible for client/server interaction (iproto_callback family of functions) will unpack the binary data and pass it on in structured form.
The Lua wrappers will be able to use FFI and avoid an unnecessary pack/unpack (which, by the way, also leads to type loss).
Blueprint information
- Status:
- Not started
- Approver:
- Kostja Osipov
- Priority:
- Medium
- Drafter:
- Kostja Osipov
- Direction:
- Approved
- Assignee:
- Roman Tsisyk
- Definition:
- Approved
- Series goal:
- Accepted for 1.6
- Implementation:
- Unknown
- Milestone target:
- 1.6.1
- Started by
- Completed by