Considering document-oriented data-stores

March 24th 2010

I am considering moving the database layer of one of my websites to a document-oriented data-store, specifically, CouchDB. I really like the idea of schemaless databases, and it seems like it would be a lot easier to manage and horizontally scale. Also, CouchDB is built upon Erlang, which is known for insanely robust concurrency, scalability, and availability.

One of the features that would be extremely advantageous to me is replication. My web application is a client/server package where many clients do work disconnected from the main network, and need to report back to the main server later. I’ve been able to implement this with MySQL and Rails, but it didn’t seem like a good solution.

In Rails, I had thousands of records that I wanted to replicate to a master web application. With ActiveResource, this can mean thousands of HTTP requests, and I would much rather avoid that. When using ActiveResource, I also ran into an issue with replicating data with deeply nested associations, and ID collisions, and unknown replication problems that caused some records to not be sent to the master web application.

So, I’m hoping to have more luck moving the responsibility of replication off of the application layer and onto the database layer with CouchDB.

blog comments powered by Disqus