Skip to content

Open Sharding Protocol

Mark Winn edited this page Nov 1, 2019 · 1 revision

This page defines the wire protocol used by OSP.

 

OSP Protocol Version 2

 

  • 1 byte - protocol [1 = Google Protocol Buffer]
  • 1 byte - protocol_version (2)
  • 8 byte long integer - message sequence number
  • 1 byte - final request/response?
  • 1 byte - reserved for future use
  • 2 byte integer - message type ID
  • 4 byte integer - message length
  • message bytes (encoded according to the Google Protocol Buffer specification)
Total header length: 18 bytes

 

OSP Protocol Version 1

This version is used by myosp 1.4.

 

  • 1 byte - protocol [1 = Google Protocol Buffer]
  • 1 byte - protocol_version (1)
  • 1 byte - final request/response?
  • 1 byte - reserved for future use
  • 2 byte integer - message type ID
  • 4 byte integer - message length
  • message bytes (encoded according to the Google Protocol Buffer specification)
Total header length: 10 bytes