使用 django 并扭曲在一起

发布于 2024-08-18 07:03:32 字数 254 浏览 2 评论 0原文

1)我想开发一个具有论坛和聊天功能的网站。聊天和论坛以某种方式链接。这意味着对于每个线程,用户可以在该线程的聊天室中聊天,或者可以发布回复论坛。 我正在考虑使用 django 进行论坛,并使用twisted 进行聊天。我可以将两者结合起来吗? 使用twisted开发的聊天应用程序链接到论坛。

2)如果我使用twisted和django,在将网站放在网络上时我应该使用哪种网络主机?我应该使用VPS吗?或者我可以获得支持两者的主机吗?

1)I want to devlop a website that has forums and chat.The chat and forums are linked in some way.Meaning for each thread the users can chat in the chat room for that thread or can post a reply to the forum.
I was thinking of using django for forums and twisted for chat thing.Can i combine the two?
The chat application devloped using twisted is linked to the forum.

2)If i use twisted and django what kind of web host shold i use while putting by website on web ?Shold i use a VPS? Or can i get a host that supports both?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

罪歌 2024-08-25 07:03:32

我不会将两者本身结合起来;对 Django 的调用将同步发生,这意味着 Twisted 的事件循环将被阻止。最好将 Twisted 进程视为使用 Django 的 独立应用程序 并让经典的 Web 服务器处理 Django 应用程序。

您不太可能找到允许您运行 Twisted 应用程序的共享主机,因此我会选择 VPS 路线。

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.

哎呦我呸! 2024-08-25 07:03:32

我有一个项目正在进行,可能正是您正在寻找的(至少是开始的)。它称为 Hotdot: http://github.com/clemesha/hotdot

另外,我在这里写了有关此主题的更多详细信息: http://clemesha.org/blog/2009/dec/17/realtime-web-apps-python-django-orbited-twisted/

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/

若有似无的小暗淡 2024-08-25 07:03:32

如果论坛应用程序需要从聊天应用程序获取某些内容,那么让论坛应用程序通过纯 HTTP 请求与聊天应用程序通信并让它们单独运行会更简单。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文