Mongo Smash!

MongoDB

I’ve been mostly ignoring the so-called ‘NoSQL movement’ for a while now. I’ve been so heavily invested in relational databases that I couldn’t imagine ever moving to something else. Document-based databases seemed interesting but felt like it required a different way of thinking about data. CouchDB has its’ REST interface which is kind of cool, and most of the other NoSQL databases tout map/reduce stuff, which again, is kind of cool. I don’t think I ever had a computational problem so large, that it would have benefited from map/reduce, so it didn’t pique my interest.

The other day, I was researching various file storage systems and came across MongoDB’s GridFS. GridFS is a layer that sits on top of MongoDB that takes file storage requests, splits them into binary chunks and stores them as separate documents (and can reverse that process when retrieving files). Traditional knowledge and prior experience told me that you never ever want to store files in a database, but after reading on how MongoDB implemented it, it kind of made sense and felt OK. The data is stored as binary JSON objects, which I like. JSON never done me wrong, it’s actually my preferred data format.

So, I downloaded the pre-compiled mongodb for OS X and decided to experiment with it for a bit. My previous experiment with Hadoop made my head spin, so I had low expectations but I was so wrong. It was so drop-dead simple that I was inserting, retrieving documents and files, literally within minutes. Both the client and server software consists of a few small executable files. Nice. The PHP extension was easy to enable, and the driver even implements fluent interfaces! Nice. The Mongo client uses javascript to interface with the server, which makes sense being that it stores the data as BSON, it also makes it feel very ‘web-oriented’. After an hour of playing around with MongoDB, I was able to get a master-slave setup working, as well as a sharded data-set. I was impressed. Very Nice. I started imagining how my current databases could fit into Mongo, and all the different methods of scaling and replicating that it offers.

Although I originally was looking into MongoDB for it’s GridFS capabilities, I quickly realized the beauty of it’s capabilities as a real database. There is even work being done on some Godfather-esque auto-sharding which is awesome, a bit scary and very interesting. MongoDB is open-source, and is being actively developed and supported by a local NYC company 10gen which makes me feel all the more confident with considering rolling this out at work.

In the software engineering world, I think there are all kinds of development philosophies and when you come across software that is in-line with your philosophy, it makes it so much easier to grok, and it feels good.

Gizmodo’s iPhone Story

Ok, so it seems that Gizmodo bought a stolen iPhone prototype and wrote a story about.

Deplorable? Maybe. Some other tech journalists seem to have this ‘better than thou’ attitude about it, which kind of pisses me off. Is it because they paid for the stolen phone?

Sometimes journalists do illegal things to get a story, they trespass, they pay for ill-gotten information, they hack a politicians email account. If Gizmodo paid someone for stolen property that proves Apple has been purposefully hiding the cure for cancer, would that make it noble and justified? OK, it’s just a phone, but who are we to judge what is and what is not newsworthy? If I have my facts straight, there was no absolute way to tell if this purchased prototype was indeed Apple’s property. Simply having an Apple logo on it does not mean it belongs to Apple. Even if the person who ‘found’ the prototype told Gizmodo that it was stolen, still doesn’t mean it necessarily was.

Yes, it’s just a frakkin phone, not a big deal in the grand scheme of things, but I don’t think they did anything un-journalistic about it.

I think those bloggers who say ‘they would never have even thought of paying for this prototype’ are liars, or are afraid of their blogs (and in some cases, their careers) falling out of Apple’s good graces.

Hello World

So I’ve always toyed with the idea of a writing a blog, like every other person on the internet (even Brady has one).

So I figured it’s about time, and my first post would be about one of the most important days of my life, the birth of my son Sebastian.

February 14th, 2010, Sebastian’s estimated due date. Tess and I went for a walk at the boardwalk in Long Beach, secretly hoping the ocean air might entice him to join us. Nothing. The next day we were at the OB for a checkup. No Dilation, no contractions. They monitored his heart rate and checked him out via sonogram, and everything seemed ok, so we continued to wait. A few days later, I get a call from Tess, the OB is going to induce labor because the baby is so big, and he’s past due! I rush home we get ready and head to the hospital later that evening.

I was an absolute nervous wreck, but I tried not to show it. Inducing labor was all about waiting, and 24 hours later, the doctor finally said she’s going to perform a C-Section. 9:30p we were prepped and in the operating room. I held Tess’s hand while they doctors did their thing. We heard our son’s voice for the first time at 10p, Tess and I looked at each other with wide teary eyes, and not a minute later I was holding the new addition to our family.

19141_315239162367_6120727_n