From Ape Wiki
Contents |
[edit] Introduction to APE
This tutorial explains how APE works and what you need to know before starting other tutorials. ape歪瑞鼓得
[edit] What is APE?
APE, Ajax Push Engine, is a full-featured OpenSource solution designed for Ajax Push. It includes a webserver and a Javascript Framework. APE allows you to implement any kind of real-time data streaming to a web browser, without having to install anything on the client-side.
APE is composed of a server (APE Server) and a client (APE Javascript Framework)
[edit] How do APE Server and APE Client exchange data?
APE Server and APE JSF communicate with raw and command.
- When the server sends data to the client, it's a raw.
- When the client sends data to the server, it's a command.
Raws and commands are JSON objects. Each raw and command is identified by a name and contains an object with data you send or receive. Check the Protocol page for more information.
[edit] Communication system
In APE the data between users is exchanged through a pipe. A pipe is a communication conduit to exchange data in different ways.
- Multi Pipe or Channel : A channel allows you to broadcast data to a group of users. When you join a channel the servers sends you some information about the channel and a list of users connected on it. When you send a message to a channel, this message is sent to all users connected on it.
- Uni Pipe or User : Each connected client is a user. You can exchange data from one user to another user.
Real world example : APE Chat demo when the demo starts and you can talk to all other users trough a Multi Pipe. If you click on an user in the users list, you will exchange data with this user trough a Uni Pipe
Pipes allow you to do many more things :
- Setting properties on a pipe (channel or user)
- Non interactive pipe
- Proxy Pipe (Allow you to connect a client to an IP:Port)
- ...
read the tutorial Understanding pipe for more information.


