views:

556

answers:

1

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

+3  A: 
  1. Yes, absolutely.

  2. 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.

samuraisam
Thanks very much for your response. The confidence in your response to #1 is reassuring.
cadwag
Awesome, if you have any trouble, let me know. I just completed a server a lot like the one you're planning, and went through several implementations. Since you're on a VPS, remember you're not limited to just Apache front ends.
samuraisam