This is a simple code built on a night of inspiration while learning Flex and Ruby. This contains a simple single user server – java & ruby versions [simpleServer.java & server.rb], a multiuser server [chat_server.rb] and the client [client.mxml].
Assuming you already have the free Flex SDK just use $> mxmlc client.mxml which will create a client.swf file for you.
User ruby chat_server.rb or run the Java file