Monday, October 17, 2005

Flex 2 - IFBIN Comet AMF Server and Zorn Chat by Theodore Patrick

ZornChat is a simple chat application build using Flex2/AS3/AVM2 and the IFBIN Comet AMF Server. The Comet AMF Server uses binary sockets to deliver multiuser application using AMF binary. The ZornChat client and the Comet AMF Socket Server will ship in Flex By Example!

Zorn Chat Flex 2 UI

Requires Flash Player 8.5 within the Flex
Zorn Chat and Comet AMF Example

Flash Player 8.5 contains a new class flash.net.Socket that provides a real binary socket for Flash. The new socket class supports reading and writing AMF binary along with GZIP compression. The Socket class will revolutionize integration with servers and broaden the use of multi-user applications.

Zorn Chat sends all messages using AMF objects. The client sends something like so:

cometClient.writeObject( {name:"Ted" , message:"Hello:)" } )
cometClient.flush()

The Comet server receives the AMF binary of the message, reads it and sends it to all attached clients. Currently Comet can read AMF Binary but it cannot write. We are working to change that so that writing multi-user application with Comet is really simple. The server is written in Python using the IFBIN Sync libraries. The current Comet server has been tested up to 500 concurrent users sending messages every 10 seconds. The Comet server ships with full source and allows for easy customization.

IFBIN will be shipping other examples using Comet within Flex By Example. The Zorn Chat is showcased within Macromedia Labs.

More to come.

Ted ;)

0 Comments:

Post a Comment

<< Home