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
- Notes from Bing Chat—Our First Encounter With Manipulative AI - 19th November 2024
- Project: Civic Band - scraping and searching PDF meeting minutes from hundreds of municipalities - 16th November 2024
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024