Versions Compared

Key

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

...

  • All peers hold predefined messages schemas (described with java classes).
  • Peers use JdkMarshaller (java serialization) to serialize and deserialize full message. Borders between messages are controlled by java serialization.
  • Responses with status code or ResponseMessage.

Management command protocol

There is an additional serialization protocol between control.sh (thin client) and server nodes

  • Management operates compute tasks for sending commands.
  • Compute args are serialized with IgniteDataTransferObject (that is actually simple compacted Externalizable - fields without java staff). 

This protocol is out of scope of this proposal.

Proposed changes

There should be one serialization framework for communication and discovery protocol. 

Message DTO

  1. MessageWriter, MessageReader logic is depends on a remote IgniteProductVersion.
  2. Message#writeTo, Message#readFrom is auto-generated and stored separately from Message DTO classes.
  3. Add Message#writeJavaObject - for serializing Java functions and user objects (ComputeJob, etc) with JdkMarshaller.
  4. Message fields contain:
    1. primitive classes
    2. known collections
    3. POJO - that are other Message
    4. Users classes and java functions (e.g. ComputeJob).
    5. byte[] fields (objects serialized externally) must be avoided as much as possible, because their compatibility can't be guaranteed
  5. Add @Since, @Until  annotations for Message classes and fields.

...