Search code examples
couchdbclouddocument-based-database

Authoritative server based on cloud technologies (couchdb or similar)


For a few days I've been thinking about creating new game of mine using CouchDB which I'm pretty familiar with, but the problem is - I need some computation or logic done on the server side (for example updating objects not related to any player, or changing some world parameters and what not). As far as I know CouchDB and similar technologies transfer all server logic (except for maps and privileges) on front end, but could something like this be done server side? Or, could I create some sort of a bridge that would communicate with players on one side and with some document based server on the other?

Has anyone had similar issues/ideas?

Regards, V


Solution

  • You could run a server process listening for database/document/view updates and react to changes in your world accordingly. The changes feed is your friend. It has an http interface, decouples your logic and there are libraries for a lot of languages.

    With couchdb's external processes, you can even make couchdb start and monitor your process.