Simple Shared State Protocol
Nutshell: A protocol for sharing a virtual hash table on the network.
Uses: Any application where multiple users must be able to collaboratively make changes, and become aware of changes made to that space in real time. Simple uses are chat, bulletin boards, network games, etc.
Other Similar Stuff: Systems like Croquet, Subethaedit and other shared spaces must have something similar to this running under the hood, but I haven't found other efforts that are quite as simplistic and generalized.
Protocol v0.02 |
Server Messages: |
|
STATE <state num> <state action>... |
|
|
indicates that the state has changed as specificed by the state action |
Client Messages: |
|
REQ_STATE [<start state num>][-<end state num>] |
|
|
request state changes (optional range). Used by client to synch up after being off the network |
|
REQ_CHANGE <state action> |
|
|
request a change of state. |
|
REQ_IF_CHANGE <condition> <state action> |
|
|
request a conditional change of state (i.e. when the connection closes) |
Definitions: |
|
<state action> -> <meta> <command> |
|
<meta> -> meta information about the command |
|
<command> -> SET <addr> <value> | DELETE <addr> |
|
<addr> -> anything except a space (spaces are usually url encoded) |
|
<value> -> anything except a CRLF. encoding is not defined and is application specific |
|
<condition> -> CLOSE |
Code:
v0.02 (licence: GPL)
sssp client: OSX Win, source [written in RealBasic] (I know, I know, I need to learn wxWidgets...)
sssp server version 0.0.3 [written in ruby, just run it from the command line]
|