IT

NoSQL – the Assembly Language of Data Storage

An year ago (well, still 4 days to be one full year), I played with a Windows port of Redis (a NoSQL database).

I abandoned the project because of lack of time, but now, 4 days to one year, I’m back again on it. Why ? Mainly because I like the momentum NoSQL is getting, but, more importantly, because I think as the databases became heavier and heavier, something lightwight and blazing fast should have appeared.

Redis reached version 2.0 (vs 0.9.1 from one year ago), a lot of changes in past year… the JDBC emulating driver I used is now unmaintained and there’s a new kid on the block, Jedis.

Let me show you what I mean by Assembly Language similarities Since I’m more or less familiarized with basics of Redis now, check this out:
INCR key vs INC dest
or
SET key value vs la $a0,value
or
LINDEX key index vs LODS – load word at address index

and so on… I can’t make up my mind if the NoSQL of Redis is more CISC or more RISC 🙂 but due to the set intersections, and lists, it’s definitively leaning twards CISC.

But beside databases there’s also the big set of libraries needed to create a web application. I always felt that the amount of libraries required to make a basic Web Application was huge, and, beside the JVM interpreter, you look at more  than 20Mb of .jars ( so zipped content) just for starting. Which is HUGE amount of data, if you realize how games fit the 48Kb limit on 6Mhz Z80 CPU. Today’s programming world seems a waste from these resources point of view, not to mention the hardware required to run (Gigs of RAM, Gigs of CPU speed, etc).

I am surprised though that the challenge against the BIG came from the databases side – and instead of having a database engine be able to do everything (but at the price of the resources it needs / uses), the challenger is able to do atomic / basic things very fast.

And the momentum is growing:

http://www.google.com/trends?q=nosql

Google Trends for NoSQL

Google Trends for NoSQL on 24 Nov 2010

I think this is a normal and self regulating system now, the database ecosystem. Bears and squirrels sharing the same forest. You take your pick – you need wild, elementary, very fast or … trainable, obedient, with bigger brain ?

I hope there will be something like this for web applications too …… Right now you need:

  • presentation layer (javascript is still slow on big pages with many ajax requests, JSF has a very deep stack trace for each small tag you want to use it will actually invoke a LOT of methods till it actually replaces it with what it has to)
  • service layer (here you need something to abstract things a lot between the presentation and the database layer). somewhere here you need to also fit the validations.
  • database layer (huge code base here too, to abstract the databases away). and what do you do when you start having big performance issues ?

The Law of Leaky Abstractions stands strong. Among the myriad of tools that help you get to the results faster, if something is broken along the way, you have to know the tools anyway to be able to fix.

I want to see something like NoSQL but for Web too … a NoMVC ?

I’ll be watching. So far … “Your terms – nomvc – do not have enough search volume to show graphs.” (but I found a person: http://engineeredweb.com/blog/10/4/its-time-nomvc ).

It’s starting!

Leave a Reply