• Type: Icon: Epic Epic
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 2
    • 3
    • 4
    • 150
    • Hide

      Engineer: Steve Silvester

      2022-04-05: Setting Target date to 2022-04-15

      • Steve has just about completed his investigation and the results are fantastic. He is going to be writing up a summary of his finding and the (minimal) performance implications.
      • We've filed an epic for the full implementation of Async PyMongo (PYTHON-3212) so Steve will begin capturing his thoughts in the scope doc while it is fresh. We're going to put this up for prioritization discussion at the upcoming QP prep.

      Engineer: Steve Silvester

      2022-03-22: Setting Target date to 2022-04-08

      • Steve recently began his investigation and has already created a POC that passes the majority of our tests with no noticeable slowdown.
      • Currently working on getting encryption tests to pass.
      • All is looking quite promising for async pymongo!

      Show
      Engineer: Steve Silvester 2022-04-05: Setting Target date to 2022-04-15 Steve has just about completed his investigation and the results are fantastic. He is going to be writing up a summary of his finding and the (minimal) performance implications. We've filed an epic for the full implementation of Async PyMongo (PYTHON-3212) so Steve will begin capturing his thoughts in the scope doc while it is fresh. We're going to put this up for prioritization discussion at the upcoming QP prep. Engineer: Steve Silvester 2022-03-22: Setting Target date to 2022-04-08 Steve recently began his investigation and has already created a POC that passes the majority of our tests with no noticeable slowdown. Currently working on getting encryption tests to pass. All is looking quite promising for async pymongo!

      Now that the driver supports Python 3.6+, it may be technically feasible to have asyncio support directly in the driver, and offer both asynchronous and synchronous APIs from the same library.

      Notionally we would convert the existing blocking methods to use async def and other async patterns with a new name like async_insert_one(). We would then use a decorator to provide the existing blocking methods by wrapping the async method. The decorator would wrap the method in a function that creates an event loop and runs the async method using coroutines or a thread pool if needed. It would also use the docstring for the wrapped method, perhaps translating any async-specific parts to synchronous language.

      The research would be to spend some time trying out this method on a small subset of methods, and to think through the implications to thread-safety and preserving the existing APIs. We would also need to plan to have Motor act as a shim to the new APIs and eventually be deprecated.

            Assignee:
            Unassigned Unassigned
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              4 weeks, 2 days