...
- Communication protocol is peer-to-peer protocol: every message is sent between one node-sender and one node-receiver.
- Communication protocol is an internal protocol used for system messages exchange between Ignite nodes:
- There is a limited amount of peers, and all peers are aware of versions of each other.
- All peers are aware of all possible messages and their schemas.
- At most time peers are of same version. In short period of time (during RU) messags schemas might differ, but not much (few messages might differ with few fields only).
- It is proposed to provide compatibility between versions that differ by 1 minor version, for example between 2.20.X and 2.19.X (but not between 2.20.X and 2.18.X).
- Messages can be pretty big, contains cache entries (putAll, historic rebalance).
- Code changes should be minimal.
- Users applications deployed on cluster (services, etc) must support compatibility by itself.
...
Message#writeTo, Message#readFrom logic is depends on a remote IgniteProductVersion.Message#writeTo, Message#readFrom is auto-generated and stored separately from Message DTO classes.Add Message#marshal(Marshaller), Message#unmarshal(Marshaller) methods - to marshal POJO fields if needed. Message fields contain:- primitive classes
- known collections
- POJO - that are other
Message - Users classes and java functions (e.g. ComputeJob), that will be serialized with
JdkMarshaller - byte[] fields (objects serialized externally) must be avoided as much as possible, because their compatibility can't be guaranteed
- Add
@Since, @Until annotations for Message classes and fields.
JavaSerialization
...
byte[] fields in Message must be forbidden.
Marshaller
Marshaller#marshal, Marshaller#unmarshal is depends on remote IgniteProductVersion.Code generator must inject JdkMarshaller into Message and use it during serialization if JavaSerialization annotation is used.
Version check
- Ignite CI must notify for IF-clauses with condition based on IgniteVersion older than
(curVer - 1). - Ignite CI must forbid code changes if Message DTO changed without corresponding @Since, @Until annotations.
- Ignite CI must forbid code changes if Message DTO contains byte[] fields.
...
{"serverDuration": 104, "requestCorrelationId": "601ab306993c94c9"}