Protocol version 3

Issue #16 resolved
Rob Eden repo owner created an issue

These changes should be made in protocol version 3:

  • Byte channel RX window options (see #15)
  • UTF-8 string (#12)
  • Change ChannelInitResponse.reject_reason to string (drop ResourceKey usage)
  • Drop version header from all messages, except ChannelInit

Comments (5)

  1. Rob Eden reporter

    Compatibility through version 0 should be maintained. However, since some issues could be created in a newer VM by tolerating an older VM (such as not respecting channel rx windows), versions 0-2 are no longer accepted by default. Support for those versions can be re-enabled via the intrepid.min_supported_protocol system property (Example: -Dintrepid.min_supported_protocol=2).

    Support for version 0-2 will be permanently dropped in the future, though the ETA is currently unknown.

  2. Rob Eden reporter

    Virtual channel flow control, protocol version 3 (initial work)

    Virtual byte channels now implement flow control to throttle the rate of incoming messages to prevent OOMs due to a never-ending receive message queue. Flow control is disabled when connecting to older peers (not implementing protocol version 3).

    As indicated above, the protocol version has been incremented to version 3. The changes for proto version 3 are not complete in this merge (see #16), but they have begun. By default connections to hosts with proto version <3 are no longer allowed. To enable connections to older peers the system property intrepid.min_supported_protocol can be used. For example: -Dintrepid.min_supported_protocol=2.

    In addition to VBC flow control, proto 3 aims to optimize and clean up message formats. As a first step, this merge also removes the per-message-type version field in all messages but SessionInit and SessionInitResponse.

    Finally, MINA buffer allocation tunables have been added: * intrepid.mina.encoder.allocate_cached - When present, the caching allocator will be used rather than the simple allocator. * intrepid.mina.encoder.allocate_size - Initial size (in bytes) to use for message encode buffers. The initial size used to be 256k but has been reduced to 2k. * intrepid.mina.encoder.allocate_direct - When present, buffers will allocate as direct buffers.

    Fixes: #15 Relates to: #16

    → <<cset 8b895e4662ad>>

  3. Log in to comment