Implement Pluggable Stream Adapter

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • 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 an injected stream adapter.
      So that I can use the driver in environments that do not support the full Node.js stream module.

      User Experience

      • Driver uses provided stream adapter for operations like GridFS or Cursor streaming instead of require('stream').

      Risks/Unknowns

      Mapping Node.js streams to non-Node environments (like Web Streams) is complex. The adapter should simply require a Node-compatible polyfill (like readable-stream) rather than re-implementing the logic.

      Acceptance Criteria

      Implementation Requirements

      • Remove import: Remove require('stream') from all places inside src folder.

      Testing Requirements

      • Verify cursors, gridfs (which are streams) still function correctly (data events, piping) using the adapter.
      • Ensure node:stream is not loaded at runtime.

      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:
              Resolved: