Categories
Ideas

When to use NoSQL/key-value store?

I’ve been meaning to look into this for some time to get my head around these fancy new databases and find out when I should consider using them. I’ve come to the conclusion that you generally wouldn’t use an object/key-value database on it’s own.  You have your main relational database for important data that is definitely required, and then you can have multiple key-value databases to do a lot of the firehose-data grunt work across multiple servers.

A setup might look like:

Relational Database:

You need your relational database for things that a user absolutely has to have every request (e.g. you always need to access the users login details).

NoSQL/Key-Value Database:

However for things that don’t really matter (like posts, tweets, comments) then you can use a key-value store because who cares if all the comments/tweets etc aren’t listed every request as long as you show something and you know it’s going to be correct at some point.

I believe this is how reddit works it has postgres server(s) and then multiple cassandra servers for submissions.  I assume it’s similar for facebook except, I think, they use mysql & cassandra.

Conclusion:

For your next web app I’d start with your usual relational database of choice.  Once you get to the stage when you have the performance/scalability issues to deal with then you might take a bigger look into the NoSQL/key-value stores.

Some interesting links:

Categories
Firefox

Getting Live HTTP Headers to work with Firefox 4

UPDATE: The official Live HTTP Headers add-on now works with Firefox 4:

Download Here: http://livehttpheaders.mozdev.org/


Note this is a temporary solution, and worked for me with Firefox 4 b12:

  • Download the .xpi file (Use right-click save as or Firefox will try to install the add-on)
  • Rename .xpi to .zip
  • Unzip the contents
  • Edit install.rdf
  • Under the <–Firefox –> Section change <em:maxVersion>3.6.*</em:maxVersion> to <em:maxVersion>4.0.*</em:maxVersion>
  • Rezip the files
  • Rename it back to .xpi from .zip
  • In Firefox do file open, and open the .xpi file.

The add-on should install, just restart Firefox and use as normal.

Note: It works on my machine, however your mileage my vary.  Obviously, I recommend that you keep an eye out for an official update and install the proper version as soon as it’s available…

Categories
Firefox

Firefox Tip: Quick selection of awesomebar item

Can’t believe I didn’t notice this before; after typing in a few letters of the site you are looking for rather than pressing the down arrow key, you can just press Tab to highlight the next item in the selection of sites (and Shift-Tab to go backwards).  Yey for keeping your fingers on the home keys!

On an partially related note, I’ve been giving the Firefox 4 Beta (12) a try today – if you are using Firefox daily, and don’t mind losing some of your add-ons – upgrade now.  It’s rock solid, and like lightning compared to 3.6!