Dabbling in the messaging over Websockets waters

Doing some research into non-trivial messaging over Websockets at the moment, for the push-y parts of a restful API. The core decision I have to make is how to best approach using WS to transport not only trivial (i.e. chat) payloads, but richer ones including attached metadata and different message types. A somewhat different, but [...]