Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1835

Flatten wire protocol hierarchy

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.13
    • Affects Version/s: None
    • Component/s: Core
    • None

      The current wire protocol handlers are designed as a modular system, able to support pluggable future protocols through the max wire protocol version discovery. In theory, this might have been an ideal approach, but in practice it leads to large amounts of duplication, and is brittle in terms of the need to create instances of the handler, and the possibility of not having one (or the right one) during handshakes or testing.

      This work flattens the class hierarchy into a set of functions exported by the wireProtocol package. There is no need for an allocation of a handler instance here, since it has no state and simply provides a number of methods. Furthermore, this continues to break down the needless extra layer for wire protocol handling, letting us think of a future where these methods aren't necessarily associated with topology instances, but instead connections.

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: