NoSQL Essentials – Part 2 – Key-value databases

Key-value Databases

Key-value databases are by far the most basic of the NoSQL data stores. All major key-value databases, store their data in-memory, or at least provide the option to store in-memory or on disk. Some of the most popular key-value databases currently includes, Redis, Riak, Memcached, BerkleyDb, HamsterDB, Amazon Dynamo (This is part of the AWS suite and is proprietary to them).

In this article I am going to be focusing on Redis and Riak.

Key-value databases have been around for a long time. Memcached being one of the oldest and most widely used, however far from being the most feature rich over the last 5 years and is also significantly less performant than its competitors.

Continue reading

Setting up the Apache WSGI module on OSX 10.9

Last month I posted a blog article called Running a Flask application under the Apache WSGI module. I detailed all the steps when running on a typical Ubuntu/Debian machine. Today however, I thought I’d try and do the same setup on my mac. There were a few gotchas, which is why I’m writing this. As with most things Mac, I can’t promise this as a guide for everyone, just it worked for me and hopefully it will for you.

Ok, so before I get started, I’ve only performed this setup on OS X 10.9.4, one of the problems I had, was not a problem in versions prior to OS X 10.8. However if you’re that out of date, you might want to upgrade anyway.

Continue reading

NoSQL Essentials – Part 1 – Overview

NoSQL Databases

NoSQL was first used in the 1990’s as the name of a file based database, which used SQL, however this is not what we class as NoSQL today. NoSQL got coined again in 2009 by a new wave of databases, aiming to improve on the short comings of relational databases. In the last 2 years, NoSQL has started gaining huge interest throughout the compsci community. Here I hope to teach the core elements of NoSQL, as I know them.

Before I make a fool of myself, I would like to point out, I am far from being experienced with NoSQL databases. The below is almost a scrapbook, for my thoughts on what NoSQL is, why it’s useful, how to use it and things to be aware of. The majority of my knowledge thus far, has come from reading NoSQL Distilled by Pramod J. Sadalage and Martin Fowler. It is a great book and if you find this article useful and interesting, I would seriously recommend the investment.

Continue reading

Proxy pattern in PHP

The next structural design pattern in this series is called the proxy pattern. You can think of these, just like any other proxy. The aim here is to create a class which takes full responsibility for the execution of another class.

Yup you got it… technically they are wrappers as well, however they aren’t labelled this way.

Continue reading