How are real time web applications achievable with PHP?
9th January 2011
My answer to How are real time web applications achievable with PHP? on Quora
You don’t need to build your comet server using the same technology as the rest of your site.
I build apps in Django, which isn’t really suitable for comet due to its core expectation that an HTTP request/response cycle returns immediately rather than blocking. If I was building a comet application, I’d have the main site served by Django and then run a Node.js or Twisted or Tornado server on a separate subdomain (comet.example.com) and have my comet calls served by that.
Quora does something similar to this—if you run Firebug or similar you can see that Quora’s comet servers run on subdomains with names like tch972015.tch.www.quora.com. This also makes it easy to scale your comet stuff since you can just fire up more servers on more subdomains—you don’t even need to load balance them (though you probably should). I believe they use the same Python stack for Comet and the main site, but there’s no reason you have to.
More recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024