Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-90623

Decouple the the asio sync and async networking paths

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability

      Decouple the sync and async implementations of sinkMessage and sourceMessage in asio_session_impl. I believe that this will improve code maintainability, performance, and readability.

      I did a POC of separating the synchronous and asynchronous networking paths during skunkworks, and found that the refactors slightly reduced the CPU time spent in sinkMessage and sourceMessage during a ycsb workload, and showed minor performance improvements in ycsb workloads as well.

      Furthermore, I believe that this will improve the readability of the file, which may make further optimizations more obvious and easier to implement.

      Acceptance criteria:

      sinkMessage and sourceMessage call into de-futurized command paths that have no knowledge of async-specific concerns, and asyncSinkMessage/asyncSourceMessage have async-specific implementations.

      This may involve further use of the SyncAsioSession and AsyncAsioSession classes to further decouple the implementations, or may simply add specific implementations to CommonAsioSession (as I did in my POC).

            Assignee:
            Unassigned Unassigned
            Reporter:
            erin.mcnulty@mongodb.com Erin McNulty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: