We are making a small real-time collaborative web-application, so far written in js/php running on apache. For the collaboration and chat part we'll need sockets so we thought about using nodeJS with socket.io.
These two answers show how to put php/apache and nodeJS together. My question would be:
- How could messages be send back-and-forth between the two servers? (Three i guess since the chat part would need a server of its own.) cURL for php->nodeJS; ajax for nodeJS->php?
- How can the nodeJS server serve multiple instances of the collaboration (for different currently running collab-projects)/chat (for different groups of people communicating with eachoter in "other chat rooms") program. socket.io has a chat program example but its a single page single application.
I don't need complex step-by-step answers, but I have no idea how more complex than barebone nodeJS apps work, and at the moment I am at a complete loss.