Category Archives: NoSQL

“Synchronous” MongoDB Calls with Fibers

Here I’m showing an example of converting MongoDB node driver into “synchronous” APIs from callback based asynchronous APIs. We define two new classes to wrap up the native Db and Cursor. Two methods are converted: Db.Open and Cursor.toArray. The “sync” … Continue reading

Posted in JavaScript, Node.js, NoSQL | Tagged , , | Comments Off on “Synchronous” MongoDB Calls with Fibers

MongoDB Test2

Using a two-core server generating enough traffics and achived over 8000 ticks/s. mongod runs 65% CPU time.

Posted in Node.js, NoSQL, Ubuntu | Tagged | Comments Off on MongoDB Test2

MongoDB Test 1

Simple test in simulated ticks: single node process had throughput of 2394 ticks per second. mongod runs at 44% CPU usage.

Posted in Node.js, NoSQL, Ubuntu | Tagged | Comments Off on MongoDB Test 1

MongoDB Build

Spent a few hours building a simple MongoDB cluster with Digital Ocean VPS. Three nodes: Primary, Secondary and Arbiter. Primary node is located in New York and Secondary node is in San Francisco. Arbiter is also in New York leveraging … Continue reading

Posted in Node.js, NoSQL, Ubuntu | Tagged | Comments Off on MongoDB Build

Reset CouchDB Instance

It’s really easy to clean up a CouchDB instance as fresh as new. Just delete the database files and .delete folder in /usr/local/var/lib/couchdb and restart the CouchDB service. $ sudo /etc/init.d/couchdb stop $ cd /usr/local/var/lib/couchdb $ sudo rm -rf * … Continue reading

Posted in NoSQL, Ubuntu | Tagged | Comments Off on Reset CouchDB Instance

Riak vs CouchBase

CouchBase 2.0 went beta last month. Here`s a very comprehensive comparison between the two.

Posted in NoSQL | Tagged , | 1 Comment

Testing views in couchdb with curl

Couchdb has REST APIs and it works well with curl. Let’s build a contact database in Futon with following: Documents {"_id": "bill", "name": "bill", "groups": ["friends"], "type": "contact"} {"_id": "john", "name": "john", "groups": ["friends", "coworkers"], "type": "contact"} {"_id": "111-222-3333", "phone": … Continue reading

Posted in NoSQL | Tagged , , , , | Comments Off on Testing views in couchdb with curl