12/28/12

light-weight server idea

This is an idea that came up in conversation with a friend, and I'm writing it here to put it somewhere.. hopefully I'll do it, but if you think it's a good idea, do it and let me know ;)

Idea: A server that allows any webpage to read and write data. Kind of like a pastebin for prototype websites to use. For example, let's say I want a very simple multiplayer chess game. Currently, I could host a JavaScript based webpage in Dropbox, but there's no way for one client to communicate with another. But what if the client could include a JavaScript file from some benevolent server that gives a simple API for reading and writing data — then the clients could write their moves, and poll for the opponent's move. It might even be simple to get real-time comet communication with whatever other clients happen to be logged into a given channel.

The data wouldn't need to be guaranteed to live forever, especially for applications like simple multiplayer games. Also, the client wouldn't need to depend too much on a particular benevolent server, since the server could be open source, and anyone who wants to run a server could do so, like Etherpad.

update: It may also be possible to include a simple login system. This would allow read/write access rules. For instance, someone could create a survey, and allow clients to submit data, but not allow clients to read the submitted data of other people (only a certain user could read that.. whichever user it was that setup that particular "bin").

This would also allow a strange mechanism whereby a user "runs a server on their own machine" which is really just a webpage logged in as a certain user which access to periodically update various bins according to certain "server logic".

No comments:

Post a Comment