-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans to support TThreadPoolServer or TNonblockingServer? #29
Comments
Thriftpy2 has already supported asyncio on 3.x and Tornado on 2.x. I think there is no need to support other nonblocking service implementations. |
But we do not refuse to accept it, if you have plans to realize them, I am glad to merge those pull requests in the future. |
So, I see. Thank you for your prompt reply. |
Actually, I've got some free time now and I'll take a look into it. Some help testing thread worker is extremely welcome. Thriftpy/gunicorn_thrift#61 |
@ethe I am very grateful for your practical experience and reply, which is very helpful for us to improve the server's interactive throughput performance. |
If you do not use gunicorn_thrift to proxy your thrift service in production environment, you should use it to start and manage multiple workers. ThriftPy aims to provide a minimal thrift service realization, if you need some advanced feature (like concurrent ability), you should use other tools (like Gunicorn) or package it by yourself. There are some suggestions to make your server handle more concurrent requests:
|
@ethe |
🤣 我的意思是 tornado (又)是一个 python 2.x 下非阻塞服务的非官方实现。你的英文还待加油啊兄弟。。 |
@ethe |
@victordudu1121 如果你认为序列化是瓶颈,可以尝试水平拓展以及 PyPy 。如果存在大量并发,可以先考虑尝试一下 gevent 。你整套迁移到 Tornado 的成本还是相当高的。 |
@microdog 您好! 我看tornado thriftpy2官方给的示例如下: |
@victordudu1121 使用 Tornado 的话,你在应用层面就不能进行长时间阻塞操作,几乎所有涉及到 IO 的操作都需要调整,比如你提到的 RPC 调用,需要你将 RPC 调用重构为与 Tornado 异步兼容的实现,或使用线程池去执行。而 gevent 的话,几乎可以无痛迁移。 Tornado 包含执行 HTTP 请求的例子可以看这个 PR 中的 Demo:Thriftpy/thriftpy#206 |
请问 有计划支持 TThreadPoolServer 和 TNonblockingServer 么? 我们有较强需求!
谢谢
braver
The text was updated successfully, but these errors were encountered: