You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 17
Next »
ID | IEP-75 |
Author | |
Sponsor | |
Created | |
Status | DRAFT |
Motivation
Thin clients need a standardized way to serialize data for Table and Key-Value APIs. In 2.x, we used the same Ignite binary format that was used for server communication and data storage. However, in 3.x there are different formats for data storage and transmission (TODO: links), and those formats are not meant to be used by thin clients.
Description
Requirements
The goal is to find an existing serialization format that satisfies the following requirements:
- Binary (as opposed to text, like JSON, for performance reasons)
- Supports nested object graphs
- Supports primitives, not only objects (for example, integer or Guid value can be serialized independently)
- Schemaless: any object of any type can be written without prior set up
- For Table APIs (when the schema is present), we can use field IDs instead of names for performance reasons
- Can work without classes ("binary mode" in terms of 2.x): servers should be able to inspect the structure in serialized form
- Extensible (can add custom types)
- Well-supported implementations in all languages of interest (Java, C#, C++, Python, JavaScript, PHP)
- Fast and compact
Comparison
Name | Comments | License |
---|
MessagePack | JSON-compatible schemaless binary format | Java: Apache 2.0, C#: MIT, C++: MIT (nlohmann/json), Python: Apache 2.0, JavaScript: MIT, PHP: MIT |
CBOR | - Based on MessagePack
- Less popular than MessagePack, less implementations, outdated PHP impl
- Standardized (RFC7049)
, but MessagePack is simpler. - Included in stdlib in .NET 5
![(warning)](/confluence/s/34gb19/8804/10mvnxf/_/images/icons/emoticons/warning.svg) - "Use MsgPack instead of CBOR": https://diziet.dreamwidth.org/6568.html
| Java: Apache 2.0, C#: CC0, C++: MIT, Python: MIT, JavaScript: MIT, PHP: PHP License |
FlexBuffers | "Schemaless cousin of Google's FlatBuffers". Can be accessed without parsing, copying, or allocation. |
|
BSON |
|
|
UBJSON | Seems to be abandoned, implementations (e.g. C#) are not maintained |
|
Popular formats like Avro, Thrift, ProtoBuf, FlatBuffers and others are not mentioned, because the don't satisfy one or more requirements above (schemaless, etc).
Risks and Assumptions
// TODO: ?
Discussion Links
// TODO
Reference Links
Tickets
key |
summary |
type |
created |
updated |
due |
assignee |
reporter |
priority |
status |
resolution |
JQL and issue key arguments for this macro require at least one Jira application link to be configured
|