using django and twisted together

女生的网名这么多〃 提交于 2019-11-30 07:35:50

I would not combine the two per se; calls into Django would happen synchronously which means that Twisted's event loop would be blocked. Better to treat the Twisted process as a standalone app using Django and to have a classic web server handle the Django app.

You are not likely to find a shared host that will allow you to run a Twisted app, so I would go the VPS route.

I have a project going that might be just what you are looking for (at least to get started). It is called Hotdot: http://github.com/clemesha/hotdot .

Also, I wrote up more details about this topic here: http://clemesha.org/blog/2009/dec/17/realtime-web-apps-python-django-orbited-twisted/

If forum application needs to get something from chat application, it's simplier to make forum application communicate with chat application with plain HTTP requests and to make them run separately.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!