Thursday, September 27, 2012

Thank You For NoSQL


I had recent encounters of having a de-normalized database for a web application and it got me thinking if we really do need a structured Database to run a web application. When I had first heard of such a thing it got me amused if all the DBMS and ACID paradigms that I had read at college was a mere joke.

 While I was designing for a B2C and C2C e-commerce online application I tried to incorporate the NoSQL approach. With the conventional approach of three-tier light weight architecture, it struck to me if indeed so much effort is needed for an application which does have any concrete logical schema to adhere too. Adding to that, if such a web application really needs so much investment? Though I was not spending a penny out of my pocket for the infrastructure, expect for the free internet that I enjoyed at my hotel room  :), I was and I would indeed spend a lot of effort trying to put in place a design and implementation which was really not needed for a business case as mine.

Apache Cassandra came out as my favorite for a NoSQL approach. I did like CouchDB by the way. But considering that Cassandra was the most matured among them I by suo moto got attracted more towards it. Not to forget my fetish towards Java also added to the stack as Cassandra did provide java APIs J

After a three day after office marathon (after office is specially meant for my project mates who should keep the notion that I was doing my research while at my desk: P, pun intended) I was able to put through a working proof of concept. With limited information available on the internet, it was a nightmare yet enjoyable to read through the documentation to get around the solution. I though really missed my set of favorite forums viz. StackOverflow and OTN.

I eventually was happy with what I had come up with but I still had umpteen doubts if Java APIs were really needed in the stack. This is where I moved to CouchDB which had not very pleasant HTTP ways of transmitting data. I am still turning stones to get through the HTTP mess ;)

The next part is to incorporate some kind of document repository. Zookeeper kept my left part of the brain busy with its in-memory features. Though it is not a classical document repository but I still think I can use it as one and I hope I am able to reap what I have sown.

The Limitations though remain that such a data cannot be harvested in a DWH from a data mining and cubing perspective but it does provide with seamless solutions which are more than just flexible. 

De-Normalization of database could now just be an optimization paradigm than a mandate !!






No comments: