在 Apache 上使用 Comet/Orbited 构建 Django 应用程序,使用 mod_wsgi 还是 mod_python?
在 VPS 上构建 Django 应用程序。我对设置自己的服务器不太有经验,但这次我决定尝试一下 VPS。
我一直在做大量研究来学习如何使用 Apache Worker MPM“正确”设置 LAMPython 服务器。自然地,出现了 mod_python 与 mod_wsgi 的争论。
阅读 Graham Dumpleton 的博客和他的各种邮件列表回复,我学到了很多东西。特别是,通过使用工作器 MPM 可以大大提高 mod_python 的性能 - 如 mod_python 中的负载峰值和过多的内存使用
不管怎样,我决定使用 mod_wsgi(守护进程模式)+worker MPM,但后来我开始考虑实现 Comet,我有点困惑。
我正在考虑使用 Dark Porter 描述的技术来实现 comet ( http://darkporter.com/?p=7 )因为看起来它通过将所有内容都集中在一个进程中来进一步优化 django 设置,但他特别说他使用 mod_python 并且没有提及 mod_wsgi。
所以我的问题是:
1)是否可以使用 mod_wsgi 实现 Dark Porter 的方法?
2) 如果您要设置服务器来支持 Django+Comet,您会使用哪些组件以及为什么? (mod_python vs mod_wsgi / DarkPortersMethod vs MorbidQ vs RabbitMQ)
谢谢
Building a Django app on a VPS. I am not very experienced with setting up my own server, but I decided to try a VPS this time around.
I have been doing a bunch of research to learn how to "properly" setup a LAMPython server using the Apache worker MPM. Naturally, the mod_python vs mod_wsgi debate came up.
Reading Graham Dumpleton's blog and his various mailinglist responses, I've learned quite a bit. Particularly, that the performance of mod_python could be greatly improved by using worker MPM - as described at Load spikes and excessive memory usage in mod_python
Regardless, I had decided to go with mod_wsgi(daemon mode) + worker MPM, but then I started looking into implementing Comet and I got a bit confused.
I was considering implementing comet using the technique described by Dark Porter ( http://darkporter.com/?p=7) because it looks like it optimizes the django setup a bit more by having it all in one process, but he specifically says that he uses mod_python and makes no mention of mod_wsgi.
So my questions:
1) Is it possible to implement Dark Porter's method using mod_wsgi?
2) If you were setting a server to support Django+Comet, what components would you use and why? (mod_python vs mod_wsgi / DarkPortersMethod vs MorbidQ vs RabbitMQ)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,绝对。
我可能会使用由 Dark Porter 实现的 Orbited - 这是让代码运行的最简单的解决方案,并用纯 python 实现。更不用说,基于 Twisted,因此非常可扩展,并且拥有完善的 Django 用户社区。
Yes, absolutely.
I would probably use Orbited as implemented by Dark Porter - It's the simplest solution to get your code running, and implemented in pure python. Not to mention, based on Twisted and thus very scalable, and has a well-established community of Django users.