Questions tagged [bigtable]

Bigtable is a distributed storage system (built by Google) for managing structured data that is designed to scale to a very large size: petabytes of data across thousands of commodity servers.

Bigtable

A Distributed Storage System for Structured Data

Bigtable is a distributed storage system (built by Google) for managing structured data that is designed to scale to a very large size: petabytes of data across thousands of commodity servers.

Many projects at Google store data in Bigtable, including web indexing, Google Earth, and Google Finance. These applications place very different demands on Bigtable, both in terms of data size (from URLs to web pages to satellite imagery) and latency requirements (from backend bulk processing to real-time data serving).

Despite these varied demands, Bigtable has successfully provided a flexible, high-performance solution for all of these Google products.

Some features

  • fast and extremely large-scale DBMS
  • a sparse, distributed multi-dimensional sorted map, sharing characteristics of both row-oriented and column-oriented databases.
  • designed to scale into the petabyte range
  • it works across hundreds or thousands of machines
  • it is easy to add more machines to the system and automatically start taking advantage of those resources without any reconfiguration
  • each table has multiple dimensions (one of which is a field for time, allowing versioning)
  • tables are optimized for GFS (Google File System) by being split into multiple tablets - segments of the table as split along a row chosen such that the tablet will be ~200 megabytes in size.

Architecture

BigTable is not a relational database. It does not support joins nor does it support rich SQL-like queries. Each table is a multidimensional sparse map. Tables consist of rows and columns, and each cell has a time stamp. There can be multiple versions of a cell with different time stamps. The time stamp allows for operations such as "select 'n' versions of this Web page" or "delete cells that are older than a specific date/time."

In order to manage the huge tables, Bigtable splits tables at row boundaries and saves them as tablets. A tablet is around 200 MB, and each machine saves about 100 tablets. This setup allows tablets from a single table to be spread among many servers. It also allows for fine-grained load balancing. If one table is receiving many queries, it can shed other tablets or move the busy table to another machine that is not so busy. Also, if a machine goes down, a tablet may be spread across many other servers so that the performance impact on any given machine is minimal.

Tables are stored as immutable SSTables and a tail of logs (one log per machine). When a machine runs out of system memory, it compresses some tablets using Google proprietary compression techniques (BMDiff and Zippy). Minor compactions involve only a few tablets, while major compactions involve the whole table system and recover hard-disk space.

The locations of Bigtable tablets are stored in cells. The lookup of any particular tablet is handled by a three-tiered system. The clients get a point to a META0 table, of which there is only one. The META0 table keeps track of many META1 tablets that contain the locations of the tablets being looked up. Both META0 and META1 make heavy use of pre-fetching and caching to minimize bottlenecks in the system.

Implementation

BigTable is built on Google File System (GFS), which is used as a backing store for log and data files. GFS provides reliable storage for SSTables, a Google-proprietary file format used to persist table data.

Another service that BigTable makes heavy use of is Chubby, a highly-available, reliable distributed lock service. Chubby allows clients to take a lock, possibly associating it with some metadata, which it can renew by sending keep alive messages back to Chubby. The locks are stored in a filesystem-like hierarchical naming structure.

There are three primary server types of interest in the Bigtable system:

  1. Master servers: assign tablets to tablet servers, keeps track of where tablets are located and redistributes tasks as needed.
  2. Tablet servers: handle read/write requests for tablets and split tablets when they exceed size limits (usually 100MB - 200MB). If a tablet server fails, then a 100 tablet servers each pickup 1 new tablet and the system recovers.
  3. Lock servers: instances of the Chubby distributed lock service. Lots of actions within BigTable require acquisition of locks including opening tablets for writing, ensuring that there is no more than one active Master at a time, and access control checking.

API

Typical operations to BigTable are creation and deletion of tables and column families, writing data and deleting columns from a row. BigTable provides this functions to application developers in an API. Transactions are supported at the row level, but not across several row keys.

References

Related Tags

528 questions
5
votes
2 answers

What is a good resource for database design on Bigtable/S3/Azure style databases?

Coming from a relational database background, I can make the transition to document oriented databases pretty quickly. Many of the most valuable "relations" are maintained by the hierarchy of the document. Many of the DODB variants of NoSQL also…
Dennis Burton
  • 3,282
  • 3
  • 23
  • 30
5
votes
2 answers

header on each page of big table of xtable?

How do you put on a big table of xtable the table header on each page?, So that is easier to read the table the table between pages. I use the following in Sweave: test.big<- xtable(test,label="table",caption='test') align(test.big) <-…
Ricardo Rod
  • 8,453
  • 9
  • 27
  • 39
5
votes
1 answer

Can materialized views be used as a fast denomalized big table?

Can Oracle Materialized views be used to join multiple related tables having foreign keys to create a larger denormalized big table which is refreshed instantaneously? On some investigations, it says that joins are not allowed while using fast…
JavaRocky
  • 19,203
  • 31
  • 89
  • 110
5
votes
1 answer

Reduce access time to Bigtable with Golang

I would like to reduce the access time to my table on my Golang RestApi. I have a Go restAPI with an enpoint that requires access to a bigtable database for each code specified at the request body. My design of the key access is …
5
votes
1 answer

Modeling Hierarchical Data - GAE

I'm new in google-app-engine and google datastore (bigtable) and I've some doubts in order of which could be the best approach to design the required data model. I need to create a hierarchy model, something like a product catalog, each domain has…
Iván Peralta
  • 851
  • 1
  • 9
  • 25
5
votes
2 answers

db.get() vs db.get_by_key_name() performance (GAE BIgtable/Datastore)

How does the performance of db.get() compare with that of db.get_by_key_name()?
5
votes
1 answer

At what rate do indexes "explode" in GAE's big table?

At what rate do indexes "explode" in GAE's big table? The excerpt from their documentation below explains that for collection values, indexes can "explode" exponentially. Does this mean that for an object with two collection values, there is an…
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
5
votes
3 answers

How is MegaStore different from BigTable?

It's been noted that Google App Engine is moving its datastore implementation from BigTable to MegaStore. What's the difference between the two?
jblocksom
  • 14,127
  • 5
  • 34
  • 30
5
votes
1 answer

Using Search API Python - Google App Engine Big Table

I would like to use Search API with an application that is already using a defined model (db.Model). For example, suppose that my model looks like this: class Greeting(db.Model): author = db.StringProperty() content = db.StringProperty() …
gather
  • 51
  • 3
4
votes
2 answers

how to handle very large data?

I'm about to start a new project which is basically a reporting tool which should have a rather very large database. The number of tables will not be large (<200), majority of data (80%) will be contained in 20 tables, all data are almost…
jenitshah
  • 131
  • 2
  • 10
4
votes
2 answers

GAE Cloud SQL and High Replication Datastore

With HRD and BigTable, you are forced to deal with eventual consistency for all queries that are not ancestor queries. Your code has to be robust enough to cope with the fact that the results may be stale. With Google's launching of Cloud SQL, they…
jsg
  • 143
  • 8
4
votes
1 answer

Issue with adding new properties to existing Google AppEngine data models / entities

In GAE, I have a model called Foo, with existing entities, and attempt to add a new property called memcached to Foo that takes datetime values for the last time this value was set to memcache. If I try to query and sort on this property, or even…
mshafrir
  • 5,190
  • 12
  • 43
  • 56
4
votes
3 answers

Implementing large scale log file analytics

Can anyone point me to a reference or provide a high level overview of how companies like Facebook, Yahoo, Google, etc al perform the large scale (e.g. multi-TB range) log analysis that they do for operations and especially web analytics? Focusing…
Rob
  • 5,512
  • 10
  • 41
  • 45
4
votes
2 answers

What changes do I need for my tables to work on AppEngine's BigTable?

Let's say I have a booking database consisting of users: user_id fname lname and their tickets ticket_id user_id flight_no and associated flights flight_no airline departure_time arrival_time What would I need to change to move this Google…
karl
  • 393
  • 3
  • 7
  • 14
4
votes
1 answer

Meaning of words used to describe the BigTable data model

I am learning how to use the Google App Engine. My question is on the meaning of words used to describe a BigTable database. I have read google's paper on big table This paper describes the BigTable data model in terms of rows, cells, column…
brif
  • 443
  • 7
  • 11