APE (Ajax Push Engine)

APE is a full-featured OpenSource solution designed for Ajax Push. It includes a comet server and a Javascript Framework. APE allows to implement any kind of real-time data streaming to a web browser, without having to install anything on the client-side.

Ajax Push for realtime web

The development of the APE Project started in early 2006 as webserver converted into a fast chat server, dedicated to give the best Ajax performance. Over time it grew into an awesome piece of software based on principles and philosophies we care about (Open Source, Usability, Standards and the Future of the Internet). As for that, we think we have created something insanely great.


The APE Project is 100 % Open Source and FREE for commercial and non-commercial use, released under the GNU Public Licence version 2. We want to contribute to a better web by sharing our technologies.


APE works with all of the Internet browsers, it is cross-platform and cross-subdomain. It works on mobile devices, smartphones, video game platforms, as long as they include a web browser.

Only web standards

APE only uses web standards (with the use of Asynchronous JavaScript and XML (AJAX)). You do not need any plugins to be installed on your web browser, just enjoy!

Push, don't pull

APE is a Server for pushing real-time data to Rich Internet Applications, no pull! Data is sent, live, to thousands of clients, in a JavaScript socket fashion. It allows you to write real-time web applications without using any client plugins (Java, Flash...).

APE Project

The Ajax Push Engine Project is divided into two distinct parts communicating via a very efficient protocol. The most central part is our epoll-driven HTTP streaming server, the APE Server. Through the APE Protocol, the APE JavaScript Framework sends and receives the actions on the client side.

APE Server (Comet)

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.


  • Fully written in C
  • Publisher/Subscriber based
  • Scalable
  • Linux, BSD & Mac OS X Support
  • Epoll-Driven (KQueue for BSD)
  • Fully Asynchronous
  • Server-Side JavaScript (SSJS)
  • Built-in Message Queue system
  • Sockets
  • Extendable

Code example

Ape.registerCmd('foo', true, function(params, cmd) {
    cmd.user.sendRaw('bar', {
        hello: 'world',
        echo: params.ping
    sql.query('INSERT INTO table(log) VALUES("' + Ape.MySQL.escape(params.ping) + '")', function(res, errorNo) {
        Ape.log('Inserted ' + this.getInsertId());

APE Framework (JSF)

The APE JavaScript Framework receives information sent by the server (RAWs), handles the data, and sends back the users commands (CMDs). With a very small footprint (~10KB), the APE Framework loads really fast on your web browser, thus it's fully adapted for slow connections such as EDGE or 3G.


  • Based on Mootools, but also supports any other Framework for plugins (JQuery, dojo, ..)
  • Bring Socket API to the client (TCP Sockets)
  • Cross-Browser
  • Several Transport Methods (Long-polling, XHRStreaming, JSONP, Server Sent Events)
  • Sessions & Multi tabbing/windowing management

Code example

var client = new APE.Client();



client.request.send('foo', {ping: 'ho hey'});
client.onRaw('bar', function(raw, pipe) {
    console.log('echo : ' + raw.data.echo);
    console.log('Receiving : ' + raw.data.hello);

APE Protocol

To enable the communication between the Server and the APE JavaScript Framework (or whatever client you want), APE has it's own Protocol. It has a really small footprint, and it's really fast to interpret.


  • Async communication
  • Fully JSON powered
  • APE Specific
  • Send & receive multiple info into one packet
  • Specificaly designed for Comet Push
  • Small bandwith usage


To run APE Server you will need any one of the following supported Operating Systems:

  • Linux (with a kernel 2.6.16+)
  • MacOS X 10.3 computer
  • Windows computer with a virtual machine running Linux.
  • FreeBSD

Do you want to know more about APE?

APE in the wild !

Watch APE in its natural element. Check out our demos !

Get to know APE !

Check out the documentation and wiki.

Get APE !

Make something awesome yourself!

Open Source

APE Server, APE Javascript Framework and the following demos are OpenSource and released under the GNU Public Licence version 2.