Amazon Web Services

So, I’ve been doing some work with Amazon Web Services (AWS) recently and It’s been an interesting experience so far.

Until recently, I’ve been mostly resistant to using hardware virtualization for web applications. Most of my early career has been focused on squeezing the most performance out of physical servers, and adding another layer of software on top of that didn’t make sense to me.

Hardware has come a long way since then, modern CPUs now have hardware-assisted virtualization technology, and the software has become much smaller and more transparent. Scaling large web services nowadays is mostly focused on distributing demand across many small, individual servers. Cloud platforms, such as AWS, lends itself nicely to this paradigm.

To me, the strangest thing about Amazon’s Elastic Cloud Computer (EC2) is that the servers, and all the data on them, are temporary (they even charged by the hour!). You have a fully functional (virtual) server: RAM, CPU, disks and all, that come into existence and disappear with a few clicks of a mouse, and a few pennies on the dollar.

Software development has to be approached quite differently because AWS is not just virtual servers, it’s a complete ‘Cloud Environment’: persistant data can be stored in a ‘bucket’, using the Simple Storage Service (S3) or on a sort of virtual, external hard drive called Elastic Block Store (EBS).  If you need to handle extra traffic, you can program in some logic to spin up more servers, and even load balance the requests. There’s even a turnkey MySQL solution called Relational Database Service (RDS).

It’s quite nice not having to think about hardware (and the cost), and be able to focus more on creating software. On the other hand, parts of software may have to be rewritten specifically for the AWS platform, making it difficult if you ever want to return to a more traditional environment.

Overall, I think the future of the internet is cloudy …

Not that Incredible

HTC Incredible

I’m quite content with my iPhone 3GS, so I don’t follow much news with other smart phones. With that said, a co-worker had just picked up an HTC Incredible, one of the new smart phones that run Android OS, and he was quite excited about showing it off, which got me interested, so after 15 minutes playing around with it.

The screen was just as nice as my iPhone, but the interface had me and three other people confusingly tapping around trying to figure out how to navigate the darn thing. After flailing about and launching a dozen odd apps, the interface began to get sluggish and I remembered that the Android does ‘multi-tasking’, meaning apps continue to run in the background, even after you’ve left them. Some applications seem to have it’s own way of quitting, while others seemed to lack that feature altogether. The owner of the phone happily pointed out there was a free app he downloaded, an application killer. I also remembered reading about Android’s voice activated, turn-by-turn navigation, and it also took us a few minutes to figure out how to get it work, but once we did, it was quite amazing. The navigation app incorporates Google Maps, including street view, basically every location based features Google Map search has, is incorporated into the app.

Clumsy and anti-intuitive interface aside, the hardware was fantastic. The phone took beautiful photos and video (although multi-touch pinch-zoom seemed laggy and buggy in the photo viewer, maybe I didn’t quit enough apps?)

My last test was the controversial Flash feature. I browsed over to to kongregate to load up a Flash game. Bad first choice. I clicked tapped on the first game I saw (Kongai) and the frame rate was so low thus unplayable. Double tapping the game opened it in a new window which ran slightly faster, but still entirely too sluggish. Maybe it would work fine for flash ads, or basic animations, but I didn’t have enough time or patience to continue.

Android is an open platform, meaning anyone can develop any application they’d like on it, which I think is fantastic, but at the same time it feels like it’s trying to accomodate everyone by incorporating everything, and ultimately creating a confusing experience.

Mongo Smash!


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.