APE Project

What's APE ?
Previously named ACE (Ajax Chat Engine), APE is an OpenSource technology edited by Weelya which allows to exchange datas between thousands of users, through a web browser without reloading. The development of ACE (then APE) started on 2005 with the democratization of the AJAX technology.
Very lightweight and scalable, APE is a HTTP server that does real time data streaming. Unlike Comet, APE does not stream data into a frame, thus your browser will not be flooded with data.
It uses all the lastest browser features and provides backward compatibilty for older ones. Fully written in C language, it has small footprint and does not require any dependencies.
How it works ?
The APE Project is divided in two parts : a server and a client.
Ape Server
The APE Server is fully written in the low-level C language to provide best performances, for the moment the engine can be installed on Linux 2.6.19+ kernel, and does not requires any dependencies.
APE is a HTTP Streaming server implementing POST and GET methods of the HTTP protocol, but does not replace a regular Web Server (such as Apache, Lighttpd or Nginx). The APE Server is only called when AJAX persistant request are made.
The APE Server keeps the connection openned waiting for datas ready to be sent to a user. Once datas came for a specific user, the server close that connection (due to the AJAX technology), to be able to read those datas. Then, the APE server send them to the user while re-opening a new permanent connection. If datas have come when the connection was close (the duration of the connexion closing/re-opening is a few milliseconds), those ones are keeped in queue (placed into RAM), and are sent when the connection is re-openned.
APE does not store any datas in a database and events are directly firered to given user.
APE has its own session management system, and can handle by himself to send messages users to users.
Usually, a web browser can only keep two connections openned at the same time through a same domain. To solve this problem, the user of a website implementing the APE Server, connects to different hosts of APE, and the messages sent are broadcasted to all his clients.
The entry data format for the APE Server is a syntax called RAWs, wich are commands/actions treated in intern by the server. APE provide an easy way to add new RAWs while written plugins (see below). Here is an example of received RAW :
APE Entry Data Syntax (RAW) Example
<source lang=php>
GET /?dummy&METHOD&param1&param2&paramN&dummy HTTP/1.1
</source>
Here the METHOD is the RAW, it could be a CONNECT, a LEFT, a MESSAGE or anything else.
---
The APE Server only send JSON datas to the client, and has its own right defined protocol. Here is an example :
APE Return Example (in Object notation)
<source lang=php>
stdClass Object
(
=> LOGIN
=> 1219632348
=> stdClass Object
(
=> a03504b826514ab5a24b51f1e5d3fbbf
)
)
</source>
Ape Client
The APE Client is written in Javascript, and is a Framework based on the Mootools Library. The Client Core handle the basics of sending, receiving and dealing with the server RAWs.
Like the server, the client can be plugged with modules, enabling to create UIs in relation with APE, such as a chat client for example.
Modules
Modules can be added to the server, currently developped in C language, the ability to write them in LUA and PHP will be soon implemented.
The client can be plugged with modules, developped in Javascript and with the use of the Mootools library.
See Also
*Push_technology
*Reverse_Ajax

 
< Prev   Next >