Reputation: 2476
I have a website built in PHP and currently running on an Apache server (XAMPP locally). I would like to integrate a real-time chat system into the website. PHP and Apache not being geared for this in the slightest, I decided to work with Tornado and Python.
What is the easiest way to keep the base of the site in PHP and run it on Apache while delegating all the "chatting" to the Tornado server? I would like to be able to do this locally (...and needless to say, I have successfully installed Tornado and have been working on said script. However, I'm not sure exactly how to integrate it into the already existing site.)
Any advice greatly appreciated, thanks!
Upvotes: 0
Views: 973
Reputation: 304167
Easiest is to run Tornado and Apache on different ports/addresses
So you probably have Apache listening to port 80 already. Tornado could listen to port 81
If the server is multihomed, you could have Apache listen to a.b.c.d:80 and Tornado listen to a.b.c.e:80. This means that you'll at least have to have the Apache part and the Tornado part on different subdomains
If you need to run them all under the same domain and port, you'll need something lean and fast in front of them to work out which url gets routed to which server.
Upvotes: 1