SourceForge Logo
Swocket

Swocket is a cross-platform modular XML Socket server framework implemented in Python with the intention of being used to communicate with Macromedia® Flash® 5 content but is easily usable with other platforms that support the same flavor of XML Sockets.

Goals

To significantly lower the barrier of entry for authoring impressive (near) real-time multiuser content in Macromedia® Flash®.

To create an extensible framework capable of handling almost any such multiuser content that can easily be integrated with existing databases on any server platform, even under high loads.

To be multipurpose. It is designed in such a way that only one server process is required for each server. It can support multiple services for multiple domains on just one port. Smaller memory footprints and increased capacity are inherent in this design.

No restrictions. Swocket is under the BSD license, which makes it possible for anyone to use it for commercial purposes or otherwise. Even Microsoft approves of this one. Personally, I wouldn't like to see someone get rich off of my software, but I'd rather that than inhibit progress by restrictng use of the code.

To be as open and non-proprietary as possible. I get seriously annoyed when a product has poor extensibility, especially when it costs money. I'm presenting a solution available to everyone that will evolve based upon the community that uses it. I hope others will contribute their extensions back to the public, but it's not a requirement... even if you decide/attempt to sell your version.

To do cool shit. There's a lot of fun to be had with multiuser software, but the least fun part is writing the server platform. I've already done most of the hard work, and I'm sharing it with everyone. So instead of worrying about the server you can work on your application. You don't have to write your own Apache every time you setup a webserver, so why should it be any different with XML Sockets?

Demos

digiIsland public test
An early version of an avatar system I'm working on with mario that uses Swocket to communicate. The source is not available, do not ask. However, we are considering it and will release it when/if the time is right and the source is ready.

mousetracker
a very simple handler that puts everyone else's cursor in view. You might be alone, try opening two browsers or inviting a friend.

tic-tac-toe
a simple chatroom/tic-tac-toe game. very basic and oldschool but it works!

moock chatroom
A version of Moock's excellent chatroom tutorial, slightly modified to use Swocket's included chatroom handler as the backend. It's actually more secure than the original.. the original lets you pretend to be anyone (even if they're online with you) if you connect to the XMLSocket server with modified code. My version also saves bandwidth and provides better response time by not expecting the server to send your own messages back to you. Note that this demo does not fully demonstrate the capabilities of the chatroom handler, the Tk client does. I'll have a more feature-complete demo for it up in the future.

Swocket 0.1pre2 is up, so if you still have the old version you should really upgrade. It's significantly different and is the same version I'm using right now. I'm going to have to make some sort of weird hack to get challenge/response authentication to work securely, but I'll try and get that SHA1 code up in a few days. I think I'm just going to have the server send a token to the client immediately after connect, a pseudorandom 32bit number should be good enough for most purposes, including SHA1.

Links

Project Page
Documentation

Required/Recommended Software
Macromedia® Flash® 5
Python
PyXML
Python-LDAP
pygame
PostgreSQL
MySQL

Sites using Swocket:
THREE.OH - Digital Design Journal
undefined

Other free XMLSocket resources:
moock >> web >>flash
Fig Leaf Software Flash 5 Demos
XML - RPC Flash Client

Commercial XMLSocket resources:
Xadra LLC Fortress
Nowcentral FlashNow
Fusion Inc. Alternator