Hi,
I'm trying to find relevant best practices/specs/literature/etc. to the general problem of using a restful API (say, a standard Rails app) behind a non-restful facade, like a XMPP API or a websockets channel.
For example, I've got a restful Rails app, and I want to expose a read-only asynchronous interface. It's pretty straightforward stuff, with the Rails app pushing to a Redis pubsub channel, which is in turn consumed from node.js, and sent to a websocket channel (1). Now, how would I best go about making this asynch api read/write? I'm thinking of the client sending to the server, over the websockets channel, what basically would amount to serialized http requests or lightweight json-encoded payloads that would in turn go to a Resque queue and then would be parsed from the main app, but I'd like to know if there's previous work/specs/architectures I can build upon, or simply more elegant approachs I might be overlooking.
(1) Obviously, you could replace 'websockets' with 'xmpp' and the general concern, restful apps behind non-restful interfaces, would still apply.
Thanks in advance for any help.