7

Could anyone that has used both share his/her experience? What are the main differences and which one do you prefer? Thank you.

mario.tco
  • 674
  • 1
  • 7
  • 19

3 Answers3

7

Different socket.io vs APE:

  • socket.io is coded in javascript(node.js) while APE is coded in C. I believe that is a big difference when you want to contribute. Maybe because you like the project or maybe because you want some more functionality. I think it will be easier to contribute Socket.io because you program Javascript, which is easier to grasp according to a lot of people(I Agree, although C is also very cool language).
  • I believe socket.io supports a lot more browsers/transport compared to APE, but I am not sure. Socket.io information vs information from APE page:

APE Server is an Comet server implementing the POST and GET methods of the HTTP protocol. It does not replace a regular Web Server (such as Apache, Lighttpd or Nginx), however, the APE Server is only used for AJAX Push.

So I guess APE supports less transports then socket.io.


Like Raynos said it is difficult to compare those two products and I believe you should play with them both and then decide which one you like more.

Same Socket.io/APE:

  • You can both code in Javascript to communicate with the server. I think you will have more freedom using socket.io because everything is exposed via Javascript.

Experience:

I only have experience with socket.io and I like it a lot.

Alfred
  • 60,935
  • 33
  • 147
  • 186
  • APE does not run on Windows. It means if you are develop project on Windows you have to install linux on virtual box or use the others. – vee Sep 01 '14 at 17:50
3

Having spent some time developing with Node.js, I can't say that APE appears to be better than node. Based on sheer popularity, it seems that Node.js is probably the developer's choice -- and node.js appears to be more versatile as well.

Node essentially is you making a full on HTTP or TCP/IP. So, all of the mime type handling, data buffering, response headers, and server side routing are all things you'll have to do with your code. Node does streaming as well. I'm not sure about whether this is considered less problematic than normal ajax long polling at this point.

After googling around, I've found that people consider APE to be more of just a plain ol' push server, in which comet functionality is already there to be consumed, rather than Node, which would have you write your own. Don't be afraid of the prospect of writing things out with node though, they've got a very thorough documentation, and their methods are very easy to learn. I had some serious functionality written out in minutes.

Check this out also: http://groups.google.com/group/nodejs/browse_thread/thread/9d9b301479851b1f?pli=1

Kristian
  • 21,204
  • 19
  • 101
  • 176
3

I played a little bit with node.js, tried out socket.io - but in the end did a big project with APE.

I think, as always, there is the question of what you want to achieve. Only comparing the server parts: With node.js you get a machine that won't do anything on it's own, you need to write it yourself (or use libraries) With APE, the handling of channels and connections is already built in (compiled C). Still you need to build parts of your own logic on top with JS - or use the examples.

On the client side, socket.io provides a client framework with three commands - and APE has it's APE_JSF that handles the connections (which brings more functionality than socket.io regarding channels)

Personally, I prefer APE, even though there is a lack of documentation for beginners. However, keep in mind that APE won't deliver files/images, it's not a full Web-Server but optimized for real time push where it can handle ~10K concurrent users

Xosofox
  • 840
  • 1
  • 7
  • 21
  • They claim ~100K concurrent users. However, I also agree with you that the documentation really sucks. I have a post regarding the use of APE for my application, but I just don't know how to get started. Please help me out by giving me some suggestions at: http://stackoverflow.com/questions/8719755/how-to-hook-up-the-http-streaming-server-ape-ajax-push-engine-to-a-computation – Peter Lee Jan 04 '12 at 01:35