Re:Ask HN: What's the best data storage to use along with No...
by mathgladiator on Monday November 22, 2010 @05:23AM
(#1929332)
CouchDB requires a different mindset. I'm going to write a lot about it over the months as I use it and go to production with it.
I found that if you just think about CouchDB as as soup and you build views to build indicies that organize your data, then it gets really easy to work with.
I'm using this on some internal projects, and I'm getting very good velocity at working with CouchDB. Granted, there is a huge (and now) obvious flaw to my indexer function which I'm going to fix soon, but it works great.
I found that if you just think about CouchDB as as soup and you build views to build indicies that organize your data, then it gets really easy to work with.
I'm designing my WIN ( https://github.com/mathgladiator/win ) framework around node.js and CouchDB.
What I am doing is controlling my design documents via node.js using the fact that v8 will keep a string copy of the function for it's toString().
If you look at line 112 of win.js ( https://github.com/mathgladiator/win/blame/master/lib/win.js ), I define my indexer function to basically serialize a function from node.js into the design document.
I use this in the user system ( https://github.com/mathgladiator/win/blob/master/pages/page.... ) on line 202 to index the user documents by their id so I can use another function ($.get_index) to pull them out by their key.
I'm using this on some internal projects, and I'm getting very good velocity at working with CouchDB. Granted, there is a huge (and now) obvious flaw to my indexer function which I'm going to fix soon, but it works great.