views:

953

answers:

2
+1  Q: 

Ajax Push Engine

Hi all, are there anyone hear about APE (Ajax Push Engine) before ? I'm building Rails application and trying to create group chat with this APE realtime engine, the problem is how to make Rails communicate with APE Server ? Are there any tutorial or reference on working APE with Rails ?

+1  A: 

The short answer is that "you don't" APE works with Javascript calls back to the APE server (typically proxied through Apache or whatever server you're using).

Conceptually, if you wanted to break out into different "rooms" or whatever, you'd setup defaults within the javascript from the rails settings.

Mike Buckbee
A: 

As far as I know, Mike's answer is not entirely correct.

For clients all clients the receiving part, in all scenarions, this is 100% correct: The communication is done by Javascript.

Also, the javascript can (and in many cases will be the best choice) be the most reasonable choice to push the info to the server too. This is the case with open communications of many to many people like in chat rooms.

However the following documentation page states clearly that we have other choices:

"Using inlinepush module to push data from your php/rails/python/... application to APE"

http://www.ape-project.org/wiki/index.php/Tutorial:How_to_write_an_application_with_APE

There are many cases that this could and should be so. I can think of at least 2 scenarios:

  • Applications that only logged in users could post things to others. Your app would handle the login and inline push info to the ape server.
  • Applications that broadcast live information from one source to many clients (in this case only the admin could post and this configuration is done on the server side also.

Let me note that I'm not using APE yet, I'm researching it and if I find I've posted any misleading info here, I'll come back and correct myself.

Iraê