Implement Pluggable Net Adapter

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a Developer
      I want the driver to use injected net adapter to create TCP sockets.
      So that I can connect to MongoDB in environments without a native Node.js network stack.

      User Experience

      • Driver uses provided net adapter instead of require('net').

      Risks/Unknowns

      • This is the biggest ticket because it forces us to update the state machine, encrypter, connect logic, and potentially other internal components to access the user-provided net adapter instead of the global module.

      Acceptance Criteria

      Implementation Requirements

      • Remove import: remove require('net') from all places inside src folder.
      • Use net adapter provided with the mongo client options.
      • If dns adapter is provided - connection must use its lookup method.

      Testing Requirements

      • Tests are running inside custom vm.Context without system net module available.
      • Existing integration tests should pass when custom net adapter is provided, no node:net should be imported.

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc
      • if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward

            Assignee:
            Unassigned
            Reporter:
            Sergey Zelenov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: