Without polling the server, an expensive operation, there isn’t a simple way send a Javascript client frequently updated server data. This is a problem if you want to make a multiuser game or chat application in Javascript. A post on ajaxian proposes a solution: Daniel Prieler’s jsSO library, which proxies real time communication between Javascript clients through Flash and an RTMP server:
The data-transfer and the connection to the server are maintained by a simple embedded Flashmovie in your page. The communication with other clients runs through the local Flashmovie and the Red5-Server.
The data-flow between two clients looks like this:
Javascript/jsSO <-> Flashmovie <-> Red5-Server <-> Flashmovie <-> Javascript/jsSO
Red5, by the way, is an open source implementation of Adobe’s Flash Server. It can be used to stream or record video, or provide low latency, event-based communication via remote shared objects.
Fast multiplayer Javascript games, here we come.
jsSO – Flash Shared Objects in Javascript [via ajaxian]
Red5











I worked on a project a while back that used PUSH to communicate between the server and Javascript. The client would open an AJAX connection to the server that would stay open until there was new data to be had. It was by no means reliable, but when it worked – it worked.
… but ActionScript and JavaScript are both implementations of ECMAScript. The syntax is so similar that with the advent of the free Flex SDK tools, I don’t see a use case where JavaScript would be a better choice for an on-line game with a Flash-based server than a native Flash game client.
Still, a very cool feat… I guess I’m just looking for what the ideal use case is.
// What's Trending
Raspberry Pi Design Contest
Ten Tips for Adhesive Tape
Seventeen Sneaky Secret Hides
I Have a (Puzzling) Dream
Lost PLA Casting from 3D Prints
10 Things to Connect to Your Raspberry Pi
Maker Faire: Day Two
47 Raspberry Pi Projects to Inspire Your Next Build
// What's Shared
A better way to slice a pumpkin
DIY Nerf Darts
100 Dollar Store Organization Ideas for Craft Rooms and Beyond
In the Maker Shed: Minty Boost USB Charger
Mad’s Mouse House
Lace Princess Crowns
I Have a (Puzzling) Dream
Play the Rings of a Tree Trunk Like a Record
// Most Commented
DIY Hacks & How To’s: Get Emergency Power from a Phone Line
Resin Casting: Going from CAD to Engineering-Grade Plastic Parts
Ten Tips for Screws and Screwdrivers
Ten Tips for Better Measurement
Makers on TV: Big Brain Theory
Is it a Hackerspace, Makerspace, TechShop, or FabLab?
Arduino Announces New Wireless Linux Board
Grow: A Portable CNC Router System