Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Communication protocol is peer-to-peer protocol: every message is sent between one node-sender and one node-receiver.
  2. Communication protocol is an internal protocol used for system messages exchange between Ignite nodes:
    1. There is a limited amount of peers, and all peers are aware of versions of each other.
    2. All peers are aware of all possible messages and their schemas.
    3. 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).
  3. 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).
  4. Messages can be pretty big, contains cache entries (putAll, historic rebalance).
  5. Code changes should be minimal.
  6. Users applications deployed on cluster (services, etc) must support compatibility by itself.

Current implementation of Communication protocol:

  • All peers hold predefined messages schemas.
  • Messages follow schema in strict way - no fields are skipped and order of fields is guaranteed.
  • Peers send messages as byte stream serializing fields one by one, no delimiters are used between fields and messages.

Proposed changes

Message DTO

...

  1. Message#writeTo, Message#readFrom Ser/des logic is depends on a remote peer version IgniteProductVersion.
  2. Code of ser/des is Message#writeTo, Message#readFrom is auto-generated and stored separately from message Message DTO classes.
  3. Add @Since, @Until  annotations for Message classes and fields.
  4. Marshalling must be done within Message#writeTo with specifying remote version to marshaller.
    1. byte[] fields in Message must be forbidden.

Marshaller 

  1. Marshaller#marshal, Marshaller#unmarshal is depends on remote IgniteProductVersion.

Version check

  1. Ignite CI must notify for IF-clauses with condition based on IgniteVersion older than (curVer - 1).
  2. Ignite CI must forbid merging code changes if Message DTO changed without corresponding @Since, @Until annotations.
  3. Ignite CI must forbid code changes if Message DTO contains byte[] fields.

Nice to have (for later research)

...