From Ape Wiki

Jump to: navigation, search

Contents

[edit] APE Server

Fully written in the low-level C language, it provides the best performance, making it the fastest Comet server to date. For the moment the engine can be installed on any flavor of Linux based on the Linux 2.6.19+ kernel, and requires no dependencies, not even for the epoll-based event system. Under the hood, everything is implemented with HashTables using the DJB Hash Algorithm.

APE is a HTTP Streaming server implementing 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 called when AJAX persistent requests are made.

The APE Server keeps the connection open waiting for data to be ready to be sent to a user. Once data comes for a specific user, due to how the AJAX technology works the server closes the connection to be able to read that data. Then, the APE server sends the returned data to the user while opening a new permanent connection.

Image:ape-how-it-works.png

With a really powerful communication system, APE allows you to provide interactions supporting a lot of services between users, and allows using different transport methods while doing so. This huge amount of data transits through entities called Channels. Users "subscribe" to Channels to be able to receive a specific type of data. When the data is updated, that Channel then broadcasts the data to an unlimited amount of users who need that specific info.

APE can be used as a message-queue system, each user can subscribe and post a message to a user through a channel or directly. The data is stored in RAM on the server until the receiver gets it. A receiver can be a channel, user or external service.

At the same time, APE can be connected to an external service (such as IRC, Game Engine, Stock Values, etc.) and broadcast the information sent by this service as a message to a specific Channel or directly to a user, creating an abstract layer as sockets by acting as a proxy. The server is also capable of handling and modifying the data and is able to broadcast or store it as needed.

Finally, this complete and powerful communication system, allows you to stream multiple types of data real-time to multiple types of receivers.

[edit] Modules

[edit] APE Server Modules in C

[edit] Help