Tuesday, February 24, 2009

PNUTS: Yahoo!’s Hosted Data Serving Platform

Problem: Scalable, available data storage for web applications.

Nugget: Provide a centrally managed storage system with support for relaxed consistency. Since we've read a few papers that do something similar (BigTable, Dynamo), the main differences in PNUTS seem to be a) support for multiple apps (important in a big organization like Yahoo) and b) geographic replication (important everywhere but not talked about in BigTable and Dynamo). The main implementation nugget seems to be use of a pub-sub message bus.

Why is it different from previous work? Mostly scale and geographic replication. Unlike BigTable and Dynamo, this is also more of a DB paper than a systems paper, so it talks about DB issues like how do you manage multiple apps using the system, how do you load data, etc.

Hard tradeoffs? CAP, as always.

Will it be influential in 10 years? Perhaps. It's a real system and it touches on some issues that data storage systems need to address (geographic replication for example). However, the actual design (including usage of YMB) may not stay the same.

Criticisms: I have two main criticisms. First, using a message bus is good from a software design point of view, but it moves complexity into the message bus. It would've been nice to have more design and evaluation of YMB. Second, the rate of 3000 requests/second for 384 tablet server machines is not too high. Why not add more clients to increase the workload, or make the clients use asynchronous requests?

Hive: Data Warehousing and Analytics on Hadoop

Problem: Mining event data generated by a large web application.

Nugget: Store data in a large distributed filesystem (HDFS) and query it with MapReduce (Hadoop). Provide an interface on top of this to let users express queries in SQL, create user-defined functions in Python, etc. Most importantly, manage metadata and schemas -- this is the primary difference between Hive and something like Pig.

Why is it different from previous work? This is a really interesting question given that the large-scale analytic DB space is pretty hot right now. The main reason given in the presentation is scale - Facebook expects the data warehouse to grow very large. They also mention that commercial products didn't have the appropriate availability, presumably due to not coping well with scale. However, perhaps one reason not covered is cost. From public pricing numbers, it seems that data warehouse DB products seem to cost from $100,000 per TB of user data for smaller databases down to $15,000 per TB of user data for very large ones (Teradata example). These prices may be discounted when you make an actual sale, but still, Hive is storing 200 TB of compressed data (and they seem to get 5x compression from the import numbers, so it might be 1 PB uncompressed), so this could cost tens of millions of dollars. At that price, building a cluster of 300 Hadoop machines and hiring ~10 programmers to build a data warehouse suddenly seems kind of attractive, even if the raw performance of Hadoop is not as good as that of an optimized DB engine. It will be interesting to see how this field plays out, as newer analytics DB startups (Greenplum, Aster Data, etc) are moving towards more shared-nothing, commodity-hardware systems.

Any hard tradeoffs? Certainly Hive had to sacrifice ACID and some amount of per-node performance in using Hadoop. On the performance side, it will be interesting to see how optimizations in Hive and Hadoop help (both systems have a lot of opportunity for optimization).

Will it be influential in 10 years? It's certainly influential today at Facebook. As more companies are starting to use Hadoop for data analysis (mostly of logs), they might use similar solutions (or even Hive itself, because Hive is open-source).

Wednesday, February 18, 2009

Dynamo, Amazon's Highly Available Key-Value Store

Problem: A large-scale data store that is efficient and reliable, for keeping up a large, highly available website. An especially interesting focus in this paper is the 99.9% SLA requirement - we haven't seen this in the Google papers for example (though they care about it too.)

Nuggets: Relax the consistency model. Design applications so that apps resolve conflicts, rather than trying to do it in the data store (for example, store mergeable "log entries" rather than absolute truth).

Why is it different from previous work? Scale, efficiency, and altering the problem a little (allowing some inconsistency if it can be resolved by the app).

Hard tradeoffs: Definitely a tradeoff between consistency/expressiveness of the data store and application complexity. We'd all like to write a shopping cart application such that the cart looks like a Ruby/Python/whatever object.. instead we have to worry about multiple keys, inconsistencies, etc.

Will it be influential? It's only spawned about 12 open-source look-alikes... The most interesting question is whether we'll have to trade application simplicity for scalability forever or we can find some abstractions that are "good enough" for e.g. the set of apps at Amazon.

Thursday, February 12, 2009

BigTable

Problem: Storing very large data sets in a structured format.

Nugget: Relax the relational model to provide a scalable yet flexible B-tree like store. Reuse as many "data center building blocks" as possible to make the system simple and robust (Chubby, GFS, SSTables, etc).

Why is it different from previous work? Mostly due to the scale.

Hard tradeoffs: There seems to be a tradeoff between ACID consistency + SQL query expressiveness and scalability. It's hard to say whether this is fundamental but it might be.

Will it be influential? Yes, there are about 12 open-source clones of it in various stages of completion. I think a more influential idea for me is the high amount of reuse of existing systems/libraries that went into the architecture, which made it possible to build a robust and efficient system and to focus on application-specific "hard stuff" as opposed to general distributed systems / storage systems "hard stuff".

Chubby

Problem: Providing consistency as a service to data center applications (locking, naming, etc).

Nugget: Centralized Paxos group with simple API used for coarse-grained master locks; masters then control locking within a data center application using whatever technique is appropriate.

Why is it different from previous work? This is an actual implementation of Paxos trying to address "social" problems with getting developers to use this kind of system and making it easy to use. It can also be viewed as designing an API for a locking service, and certainly the filesystem-like API is nice because it's very easy to use.

Tradeoffs: There is a tradeoff between high availability of the application Chubby is used for and modifying application code. Chubby actually manages to provide pretty good availability (and fast reaction times, etc) without too much application modification, but it's still not automatically available.

Will it be influential? Yes, as people write more data center apps they will run into this problem for the same reason Google did. This is also a small enough search space that Chubby might be close to the final solution we end up picking.

The Google File System

Problem: Storing very large data sets cost-efficiently in a way that allows computations to be run over them.

Nugget: Use a very large block size, replication, and simplified non-POSIX semantics to support scaling to large clusters of commodity machines.

Why is it different from previous work? Mostly due to a different problem scale, although GFS also makes some workload assumptions (mostly append or write-once). The other difference is in the use of commodity hardware (NOW-style) as opposed to really specialized hardware (as in supercomputers etc); this is driven by cost.

Hard tradeoffs: There's certainly a bit of a consistency vs performance/scalability tradeoff going on. Another tradeoff that appears in practice has to do with block size.. GFS is suboptimal for storing many small files because it needs metadata for each one.

Will it be influential? Yes, it's being used in several open source projects (Kosmos, HDFS) by other companies, and it seems like a good primitive for a data center to contain.

Saturday, February 7, 2009

eBay Scaling Odyssey and All I Need is Scale

These are two very interesting slide sets on web application design principles and cloud computing at eBay. Building a web application that serves 2 billion page views per day and manages transactions with real money ($60 billion per year) is definitely nontrivial, especially if you have to balance reliability and performance with "feature velocity" and adaptability (the ability to constantly upgrade the product). Is it a real problem? Heck yeah. I think that supporting rapid evolution is one of the most underestimated aspects of web application development in the research community, and one of the main challenges in practice. I've seen this during my internship at Facebook too. It's nice that the presentations point out this problem right away. Evolvability is also one of the things that it's hardest to plan for when building a web application, especially given the need to constantly push out features to compete, and it gets harder and harder as your application grows. Having a set of guiding principles to follow from day 1 is very helpful.

The five principles the slides point out are familiar to anyone who's read about GFS, Dynamo, MapReduce, etc. It's nice to see consensus! The most surprising one to me was that eBay uses machine learning for automation, although this seemed to be more for the search side than the operations side.

The design patterns provide some good ideas as well. While I didn't fully understand the point of the scalable multicast and event queue patterns from the slides, I really liked the idea of a global message bus with logging to deal with failures, and of rollback. This reminds me of some of the elements of the Facebook architecture - for example, a common RPC format, Thrift, for service interactions, along with an RPC logging layer (Scribe). However, the Facebook architecture is somewhat different because you don't have a very clear concept of independent services yet, whereas eBay seems to be a more traditional SOA.

Their view on clouds is pretty promising - although they identify some "faux PaaS", they are actually considering using external cloud providers. This provides a strong case for cloud computing. One difference between eBay and other web applications though is that much of the data on eBay is public, so for example putting a search service in the cloud does not introduce a risk of losing consumer data. If a company like Facebook wanted to put services in the cloud on the other hand, they'd have to think very carefully because most of the site is private information.

Finally, the presentations also do a good job talking about tradeoffs. They mention CAP directly, and they say that they go for the A and P as much as possible. They also talk about the friction between performance, reliability etc and extensibility, though they don't try to say that this is an unavoidable tradeoff.