[
https://issues.apache.org/jira/browse/TINKERPOP-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133853#comment-18133853
]
ASF GitHub Bot commented on TINKERPOP-2774:
-------------------------------------------
kenhuuu commented on PR #3527:
URL: https://github.com/apache/tinkerpop/pull/3527#issuecomment-6482044438
I have some design questions that I wanted to know about before posting more
review comments because it might change this implementation considerably.
Why was subclassing the synchronous Client, Connection, ResultSet, and
RemoteConnection chosen? The resulting relationships seem awkward because the
async classes are not actually substitutable:
- AsyncClient skips `Client.__init__()` and reimplements most behavior,
while inheriting properties such as executor, which returns None.
- AsyncResultSet adds future while retaining the inherited done API, and
changes `one()` from returning a batch to returning an individual item.
- `AsyncDriverRemoteConnection.submit()` replaces a synchronous contract
with a coroutine and is defined twice to satisfy the existing ABC.
Would independent sibling async classes using composition be cleaner, while
retaining GraphTraversal inheritance specifically to reuse the full DSL? That
would keep the synchronous path untouched, make async contracts explicit,
prevent accidental inheritance of blocking APIs, and allow clearer ownership of
connections and background tasks.
> Full async/await support in gremlin-python
> ------------------------------------------
>
> Key: TINKERPOP-2774
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2774
> Project: TinkerPop
> Issue Type: Improvement
> Components: python
> Affects Versions: 3.5.3
> Reporter: Ken Hu
> Priority: Minor
>
> Recently, there have been multiple instances of users asking about issues
> with event loops and aiohttp. This discussion nearly always ends up with the
> user requesting for async/await support in gremlin-python. This means full
> compatibility with asyncio and not needing to use threads.
> Async/await support is also a feature that those using newer, asynchronous
> web frameworks are asking for as gremlin-python can be a performance
> bottleneck due to its lack of support for async/await.
> My intention is that we can use this issue as a means of gauging the interest
> from the community for this feature. If you are interested in having
> gremlin-python support async/await then please leave a comment below.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)