thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King III (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-1848) Python asynchronous server
Date Sat, 26 Jan 2019 14:08:01 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-1848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James E. King III updated THRIFT-1848:
--------------------------------------
    Affects Version/s:     (was: 1.0)

This issue was marked as affecting version 1.0 which is not possible.   If you know which
version this issue was discovered in, please mark it as such.

> Python asynchronous server
> --------------------------
>
>                 Key: THRIFT-1848
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1848
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Python - Compiler, Python - Library
>    Affects Versions: 0.1
>            Reporter: Piotr Nowojski
>            Priority: Major
>         Attachments: thrift-1848-python-async-server-v2.patch, thrift-1848-python-async-server.patch
>
>
> As far as I know, there is no support in python for anything else, then 
> blocking communication/non-blocking/twisted. Non-blocking is not 
> asynchronous and we definitely don't want to use twisted. I'm really 
> interested in adding support for onCompleted/onError callbacks model. 
> After small research, I've found couple of discussions/complains about 
> missing such functionality.
> The main idea is to allow users (for example my project in my company...) to create single
threaded thrift servers, with one thread processing all thrift requests AND user created events.
Support for custom events (and events loop) is done, by adding support for "step()" method
in WorkerAsync(), which is being 
> called at least once a given timeout. Example code is in the tutorial py.async. 
> I have added "sleep(duration)" command to the py.async PythonServer which is being invoked
on PythonClient, which sleeps for given number of seconds (1.5 in PythonClient). 
> console1: ./PythonServer.py
> console2: for i in {1..100}; do ./PythonClient.py & done
> Second console will complete within ~2 seconds with only one thread on the server. On
TSimpleServer, TNonblockingServer or TThreadPoolServer with about 10 threads, it would take
much more time to complete.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message