views:

80

answers:

4

I would like to design webapps (eg. games) that have low latency. I presume that the header of ajax would add latency. What I really would like is a protocol where the connection is never broken, and both client and server can push data to each other immediately. (and thus comet isn't really a choice, since there is communication only one side). Better would be to send data as binary and compress it.

Edit: I want an alternative to java/flash/silverlight because my platform is ipad/iphone, which DOES NOT support java/flash/silverlight

Please do not recommend any thing that is/needs java/flash/silverlight, thank you

A: 

Flash, Java, and Silverlight all support sockets. This will give you a continuous connection w/o http headers that can allow data to be sent in either direction.

The downside is, it won't work in all network environments.

Jesse Collins
+1  A: 

What you are probably looking for can most easily be accomplished using Flash and Socket programming in Actionscript. That will allow you to maintain a constant connection to a server (which you would also have to write, i would recommend haXe for that), and provide a decently low latency for exchanging information.

Keep in mind though that communicating at this level will be challenging as you will be required to design your own protocol for packing and unpacking the data you send.

Jason Miesionczek
A: 

Look at BlazeDS which uses AMF as a serialization protocol between the two. BlazeDS is a Java server platform for building applications in Spring using AMF serialization to Flex/Flash applications. AMF is a binary protocol that has a very small footprint. There is an example floating around the net comparing JSON, XML, and AMF in flash applications.

http://www.jamesward.com/census/

http://insideria.com/2008/09/amf-vs-json-vs-xml.html

chubbard
+1  A: 

Depending on your timeline and ability to impose user requirements, you could use WebSockets. See link text for info about browser support.

Jacob