phpjquerynode.jsape

Ajax Push Engine (APE) Vs Node.js


I am considering few options for pushing data from server to the client for my web application in real time.

I have implemented a polling based (each client sends http requests to the server after every 30 secs.) application which really doesn't scale up after 10 users are in. This app. is built using MySQL, PHP, HTML and jQuery.

Kindly suggest which one would be better considering the requirements below - APE Vs node.js

  1. Should be able to handle at least 400 concurrent connections at a time
  2. Server should be able to push data to all these clients.
  3. Clients would be sending across data between each other.

Solution

  • I strongly suggest you to take a look at the Socket.IO. It's a complete solution for server push, that includes both server side library (written in node.js) and client JS library that is made in a cross browser manner. I see no reason for you to implement your own code for doing what is already made, working and tested.

    The only case that socket.IO won't handle is your third request, but that is impossible anyway. If I understand you correctly, you would like two clients to communicate without help of third party server? You can't change HTTP into P2P, at least not now.

    If on the other hand you meant to communicate two users via your server (doing something like a private two-person chat) that is totally doable using socket.io.