Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ajax Push Engine

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 ?

like image 961
gkrdvl Avatar asked Mar 01 '23 08:03

gkrdvl


2 Answers

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.

like image 104
Irae Carvalho Avatar answered Mar 06 '23 21:03

Irae Carvalho


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.

like image 24
Mike Buckbee Avatar answered Mar 06 '23 21:03

Mike Buckbee