Early Christmas for Developers - Courtesy of Facebook

Kyle already posted about this, but I think that Facebook's Thrift is more than noteworthy. It is part of a larger way of thinking, the way of web development. Thrift isn't the complete story, but it is a key part of the plot.

Why Thrift is Awesome

When a Blub developer sees Thrift, he'll think "Ha! We've had XML-RPC for years! What's the point of this?!". Well, that's why you're a Blub developer, pal. Thrift is awesome because XML-RPC is so shitty. XML, in terms of Java design patterns, is a ProblemCreatorFactory. In all seriousness, though, like PHP, XML is too easy to misuse: and this is why it's such a painful interchange format. That, and for small RPCs, XML can more than triple the size of data on the wire - normally not a big deal, but if you're doing thousands of RPCs per second, you'll have issues with that shiny new gigabit switch will be hurting, and so will your web service.

This, and Facebook also provided servers for this interchange format. To be honest, when I first read the Thrift release announcement, I thought, "aaah lame, they probably didn't give away the hard part - people are going to be hacking this together with lighty and apache". But no, they did give away the servers, which means that each RPC server you have is its own independent service, and doesn't sit behind a web server with a bunch of other RPC services.

What Facebook Missed

While they mentioned it in their white paper, I think it deserves a little more emphasis. You can serve these RPCs over HTTP. But, believe me when I tell you, HTTP is the only protocol that matters. Yes, it's true. If you have a service that you are pitching as scalable, and you're not interchanging data with HTTP, you are doing something wrong. Why? HTTP is stateless. In scalable, fault tolerant development, statelessness is the silver bullet. Having scaling problems? Just add more machines. If there's no state between client and server, then scaling is just a matter of a DNS round-robin and more machines. Realizing this will bring you closer to enlightenment, I promise.

What Facebook Really Missed

I need to start this section with a tangent. Google's success started the myth, "with internet business, superior technology is all that matters". Google's technology was superior, and without any kind of advertising whatsoever, just by word of mouth, they became the 800lb gorilla of the internet. This motivated a lot of smart people to work on a lot of hard problems, and instead of changing the world, they gave us social bookmarking and online photo sharing. Hooray.

Any investor who didn't figure it out during Web 1.0 will soon come to the harsh reality that great technology does not imply great clickthrough rate. Facebook has awesome technology, and employs some smart people, but is still trying to advertise useless crap to broke-ass college students. So, Facebook, to show my thanks for Thrift, I'll give you this advice: stop advertising t-shirts and posters, and start advertising fake IDs and snake-oil hangover cures.