Piotr Nowojski created THRIFT-1848: -------------------------------------- Summary: 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: 1.0, 1.1, 1.2 Reporter: Piotr Nowojski
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. 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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira