Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Google Spanner: First Globally Scalable Database With External Consistency

Unknown Lamer posted about 2 years ago | from the all-while-ironing-your-clothes dept.

Databases 49

vu1986 writes with this bit from GigaOm: "Google has made public the details of its Spanner database technology, which allows a database to store data across multiple data centers, millions of machines and trillions of rows. But it's not just larger than the average database, Spanner also allows applications that use the database to dictate where specific data is stored so as to reduce latency when retrieving it. Making this whole concept work is what Google calls its True Time API, which combines an atomic clock and a GPS clock to timestamp data so it can then be synched across as many data centers and machines as needed." Original paper. The article focuses a lot of the Time API, but external consistency on a global scale seems to be the big deal here. From the paper: "Even though many projects happily use Bigtable, we have also consistently received complaints from users that Bigtable can be difficult to use for some kinds of applications: those that have complex, evolving schemas, or those that want strong consistency in the presence of wide-area replication. ... Many applications at Google have chosen to use Megastore (PDF) because of its semi-relational data model and support for synchronous replication, despite its relatively poor write throughput. As a consequence, Spanner has evolved from a Bigtable-like versioned key-value store into a temporal multi-version database. Data is stored in schematized semi-relational tables; data is versioned, and each version is automatically timestamped with its commit time; old versions of data are subject to configurable garbage-collection policies; and applications can read data at old timestamps. Spanner supports general-purpose transactions, and provides a SQL-based query language." Update: 09/20 17:57 GMT by T : Also in a story at Slash BI.

cancel ×

49 comments

Sorry! There are no comments related to the filter you selected.

Sounds really great (1, Troll)

Cornwallis (1188489) | about 2 years ago | (#41372979)

until Google decides to make it (and all your data) go away...

Re:Sounds really great (1)

Big Hairy Ian (1155547) | about 2 years ago | (#41373021)

Sounds like they are trying to elbow into Oracle territory. As for Google ditching it I doubt they'd be so lackadaisical about peoples mission critical data as they are about a glorified rss aggregate (IGoogle).

Re:Sounds really great (2)

javilon (99157) | about 2 years ago | (#41373089)

They don't tell you where to get it. And no source available from the website. Before they go into oracle territory they need a product and a price tag.

Re:Sounds really great (0)

Anonymous Coward | about 2 years ago | (#41374605)

They don't tell you where to get it. And no source available from the website. Before they go into oracle territory they need a product and a price tag.

The abstract is linked to in the article. If you can't figure out how to read a pdf or what spanner is, I'm afraid you're beyond help.
http://research.google.com/archive/spanner.html

Re:Sounds really great (1, Troll)

jellomizer (103300) | about 2 years ago | (#41373859)

I am sorry moderators if you find this fact unpopular but that is the point of Google development problems.
Google has a problem of pushing out new and innovative development stuff then a year or so, if it hasn't skyrocketed they will just kill the project.

As a developer you need to choose tools that you know will last, not something that will be here today and gone next week.

Re:Sounds really great (2)

Nerdfest (867930) | about 2 years ago | (#41374173)

They also give away the source on occasion ...

Re:Sounds really great (1)

Azure Flash (2440904) | about 2 years ago | (#41374955)

I would mod parent up if I could because I would've said the same thing, in different words and with a capital letter at the beginning of my sentence. I am seriously sick of Google stabbing users in the back.

Re:Sounds really great (1)

Anonymous Coward | about 2 years ago | (#41377239)

This is a paper on a piece of Google infrastructure, not a product.

Take your ignorant trolling elsewhere please.

This is a great step for people who need it (5, Interesting)

Chrisq (894406) | about 2 years ago | (#41373007)

Though not many people will need huge multi-centre databases it has cracked some of the big problems. Interestingly some of these don't appear to affect google's main business.

Spanner has two features that are difcult to implement in a distributed database: it provides externally consistent reads and writes, and globally-consistent reads across the database at a timestamp.

One of the issues with large distributed data systems was that reads at different nodes could retrieve data at a different (though consistent) state. I have seen this on google, a search shows a recent news item, then another doesn't show it again, before it finally covers all nodes and is generally available.

More to it than NTP... (3, Insightful)

vlm (69642) | about 2 years ago | (#41373015)

Making this whole concept work is what Google calls its True Time API, which combines an atomic clock and a GPS clock to timestamp data so it can then be synched across as many data centers and machines as needed.

I'm guessing there's a little more to it than reinventing and installing ntp on your DBMS server. That little bit more is the actual interesting part.

Re:More to it than NTP... (0)

Anonymous Coward | about 2 years ago | (#41373843)

I bet it was designed for geographic data, in part.

Re:More to it than NTP... (4, Informative)

glop (181086) | about 2 years ago | (#41373847)

GPS/Atomic clock is better than NTP. It's a system to distribute time that will have a 400ns precision (probably a couple microseconds once you reach the actual servers in the data center).
If you use NTP or message passing you can't synchronize data centers more accurately than a couple milliseconds (assuming you have paths that are quite stable between them as transit time can be corrected).
So basically GPS/Atomic clock lets you synchronize 2 systems that are far apart more precisely and without having to make them communicate.
Note that Atomic clocks protect them from GPS outages, so they can really rely on the timestamps.

Re:More to it than NTP... (0)

Anonymous Coward | about 2 years ago | (#41374745)

The Atomic Clock bit isn't just for GPS outages - the existence of both of these two independent time sources is necessary for correct operation (although I'm sure their implementation allows GPS to go away for a little while and continue estimating GPS from the Atomic source). The Atomic part provides a realiable local monotonic source (think clock_gettime(CLOCK_MONOTONIC)) that can be used as a serial time stream locally, which GPS time doesn't provide. Then GPS is used to coordinate everyone's ideas about everyone else's local clocks.

Re:More to it than NTP... (0)

Anonymous Coward | about 2 years ago | (#41377465)

GPS is clock based, so is perhaps to correct GPS clocking

Protect data from governments? (1, Funny)

schwit1 (797399) | about 2 years ago | (#41373075)

"Spanner also allows applications that use the database to dictate where specific data is stored ..."

Would this put data out of legal reach from the Patriot Act if the data were stored in Sveden or Grand Caymans?

Re:Protect data from governments? (0, Redundant)

Charliemopps (1157495) | about 2 years ago | (#41373159)

Since there are large sections of the patriot act that are sealed, and we have no idea whats in them, I'd say "no"
The US federal government feels that their goals are holy, and they will achieve them "by any means necessary"

Re:Protect data from governments? (2)

rhsanborn (773855) | about 2 years ago | (#41373175)

Sure, just ask Julian Assange, or Kim Dot Com.

And hopefully you have no assets or presence in the US. Because while they may not be able to easily get the data in the Grand Caymans, they'll be able to make the rest of your life hell.

Re:Protect data from governments? (0)

Anonymous Coward | about 2 years ago | (#41373439)

Sure if that somehow prevented governments from other countries from working together which it doesn't.

Re:Protect data from governments? (0)

Anonymous Coward | about 2 years ago | (#41383645)

No, swedes have their own "patriotic act" which allows them to eawsdrop on all communications in/through their country, so you're screwed, if you put your data there.

Who needs it? (-1)

Anonymous Coward | about 2 years ago | (#41373079)

Does anyone REALLY need data that big? If you look at IBM's mainframe centers, the ones managers think are big, they're actually PC tech, with processor units less powerful than the processor in a smartphone. (iPhone 5, 1500 MIPs, 2818-X03 costing $1.43million has the same power).

The only people who really need this are the mass surveillance guys, people like Google for their ads, and people like the NSA, GCHQ etc., for their massive surveillance programs.

Actual real business doesn't need it, it's still true that multinationals sell 300 million orders a year. In the 90's that would be run on big iron in, now it could be run on a home PC and would put far less load on it, than a man editing his home videos. The real tasks haven't gotten more difficult, it's not that much more difficult to collate 6 billion people's records, vs 4 billion, it's only mass surveillance that's the new driver for this.

Doug Cutting (0)

Anonymous Coward | about 2 years ago | (#41373203)

I wonder what Doug will be up to for the next year or so.

Why semirelational? (1)

leandrod (17766) | about 2 years ago | (#41373253)

From the original paper linked at the summary post above:

Spanner’s data model is not purely relational, in that rows must have names. More precisely, every table is required to have
an ordered set of one or more primary-key columns.

OK, relational keys should not be ordered. But the fact that each table must have a key makes it a relation, at least in
principle, so Spanner at first looks like it is in fact more relational than SQL. Am I missing anything?

Re:Why semirelational? (1)

Anonymous Coward | about 2 years ago | (#41373449)

RDBMs don't require you to define primary keys, Spanner does, because it's evolved from key-value DB. If you'd read on to next sentence:

This requirement is where Spanner still looks like a key-value store: the primary keys form the name for a row, and each table denes a mapping from the
primary-key columns to the non-primary-key columns.

Re:Why semirelational? (0)

Anonymous Coward | about 2 years ago | (#41373571)

I'm pretty sure that Codd's original book required every relation to have a primary key, even if the key is composed of all the columns. Otherwise, relationships can be non-unique.

Re:Why semirelational? (1)

leandrod (17766) | about 2 years ago | (#41377433)

Codd's original book

Not a Book, but an article. Granted, Codd published a book aftwards, but that was not original anymore.

required every relation to have a primary key, even if the key is composed of all the columns.

Precisely.

Not sure about what do you mean with relationships here. Relationships are a concept of ERDs, not of the relational model.

Re:Why semirelational? (1)

leandrod (17766) | about 2 years ago | (#41377469)

RDBMs don't require you to define primary keys

Yes, they do. The few of them, that is. SQL DBMSs do not, but they are not relational.

This requirement is where Spanner still looks like a key-value store: the primary keys form the name for a row, and each table denes a mapping from the
primary-key columns to the non-primary-key columns.

This makes little sense to me, because it describes not a key-value store — unless you consider the ‘value’to be all
non-primary key columns, which would stretch the definition of a key-value store —, but a relational database relation.

Re:Why semirelational? (0)

Anonymous Coward | about 2 years ago | (#41373523)

So, it's a VSAM file? Maybe next they'll invent a new type of disk controller that offloads the work of searching for the records (by key) to the controller.

Re:Why semirelational? (1)

slapys (993739) | about 2 years ago | (#41376645)

That's why Google developed F1: The fault-tolerant relational database over Spanner. This database provides a traditional schema without named rows, and supports transaction-based relational SQL queries. Very interesting: http://research.google.com/pubs/pub38125.html [google.com]

Re:Why semirelational? (1)

leandrod (17766) | about 2 years ago | (#41376905)

I do see how F1 is a fuller featured DBMS than Spanner, but it seems less relational, if it does not require that tables have
keys.

Tables without keys are not relations, so one could argue that Spanner is more, not less, relational than F1 and other SQL
systems.

GPS tampering (1)

nstlgc (945418) | about 2 years ago | (#41373297)

What happens when governments decide it's time to tamper with or block GPS signals?

Re:GPS tampering (2)

jiriw (444695) | about 2 years ago | (#41373385)

They will use WiFi triangulation to be location aware instead? :P

It seems it's the GPS clock signals they want to use here. When those are dropped I guess they'll fall back on their own atomic clocks. It might be a little less accurate 'though.

From T*A:

Google’s cluster-management software provides an implementation of the TrueTime API. This implementation keeps uncertainty small (generally less than 10ms) by using multiple modern clock references (GPS and atomic clocks).

Nothing in there about GPS being essential. Just needs 'multiple modern clock references'.

Re:GPS tampering (2, Informative)

Anonymous Coward | about 2 years ago | (#41373617)

Then you'll be too worried about aeroplanes falling from the sky and ships running aground to be worried about database consistency, I guess.

Re:GPS tampering (-1)

Anonymous Coward | about 2 years ago | (#41374063)

This!

Re:GPS tampering (1)

glop (181086) | about 2 years ago | (#41373833)

Atomic clocks would take a couple years to drift. So they have the time to hire some ninjas or lobby politicians to get this fixed before there is any impact.

Re:GPS tampering (1)

heypete (60671) | about 2 years ago | (#41374893)

What happens when governments decide it's time to tamper with or block GPS signals?

To what end? What possible purpose would that serve other than to interfere with critical systems like aircraft and marine navigation? (Yes, I know that aircraft and ships have backup means of navigation but it would still cause significant disruption.)

GPS certainly has other uses, precision timekeeping among them, and disruption of GPS would interfere with surveying, time transfer, and a variety of other functions. Pretty much any modern country uses GPS in some way and would suffer from disruption (it's for that very reason that the Russians have built GLONASS and the Europeans are building Galileo -- to provide some degree of independence and redundancy), so anyone looking to tamper with GPS signals would likely be shooting themselves in the foot.

Re:GPS tampering (0)

Anonymous Coward | about 2 years ago | (#41375375)

What happens when governments decide it's time to tamper with or block GPS signals?

Try reading the fucking summary. Here, I'll save you some trouble: "which combines an atomic clock and a GPS clock"

Huh (0)

Anonymous Coward | about 2 years ago | (#41373369)

"Spanner" can mean "peeping tom" in German. Go figure.

Re:Huh (1)

LQ (188043) | about 2 years ago | (#41373503)

And in British English is means, roughly, a fool. http://www.urbandictionary.com/define.php?term=spanner [urbandictionary.com]

Re:Huh (1)

Anonymous Coward | about 2 years ago | (#41377311)

And in American English it means a wrench.

Re:Huh (1)

someones (2687911) | about 2 years ago | (#41373845)

but also spanning like spanning tree.

Re:Huh (0)

Anonymous Coward | about 2 years ago | (#41379313)

Isn't that what Google is? Go ogle, du Spanner!

German Press Coverage (0)

Anonymous Coward | about 2 years ago | (#41373469)

The press coverage of this in Germany should be interesting. In german, "Spanner" is a derogatory term for a voyeur. Given that many Germans already feel like google is watching everything they do, they irony won't be lost on them!

Re:German Press Coverage (0)

Anonymous Coward | about 2 years ago | (#41375423)

The press coverage of this in Germany should be interesting. In german, "Spanner" is a derogatory term for a voyeur. Given that many Germans already feel like google is watching everything they do, they irony won't be lost on them!

I dunno, do they feel violated anytime someone talks about a wrench?

For a second there, I read that as Google Spammer. (1)

QilessQi (2044624) | about 2 years ago | (#41373621)

...and I thought, these Android apps are really getting out of hand....

Possibly an unfortunate choice of naming (1)

blind biker (1066130) | about 2 years ago | (#41373769)

I can imagine a lot of people misreading "Google Spanner" as "Google Spammer".

Re:Possibly an unfortunate choice of naming (1)

javilon (99157) | about 2 years ago | (#41375011)

Google spanner of code ?

Temporal Calculus (-1)

Anonymous Coward | about 2 years ago | (#41375485)

You'd think with all the high flying PhD types at Google, they'd come up with something that unifies software version control with data consistency in a relational programming model to get rid of the object relational impedance mismatch. Of course, to do this, you'd need something like a temporal calculus that can be expressed in relational terms, and you'd need a relational programming language such as the predicate calculus (that can be sugared into a functional (N:1 relation), hence procedural (statements as functions mapping states onto successive states)).

This they will not do because, well, that would entail real talent.

Minor typo, interesting DB (0)

Anonymous Coward | about 2 years ago | (#41378391)

In section 4, first para, last sentence

a read at t will see "every transaction that has committed as of t"

seems like it's really "every transaction that has committed with timestamp >= t"?

TT is pretty neat because it knows that somewhere there is an absolutely correct time, but nowhere in the DB to they actually know what the time is, only the value within an error bound. That said, there is no way the DB can know that something was committed at an exact time t, only that it was labeled with a timestamp that was close to the exact time, which is good enough.

So can you read the next row on the primary key to the next record greater than the one you are at?

I wonder how this compares in performance to the best Oracle can offer? Should they be looking over their shoulder, or looking ahead and figuring how to catch up.

Two 100ppm crystals might give you a 200uS/Sec error, but if you measure how they are drifting with respect to the timeservers, then the change in frequency offset should be more that an order of magnitude smaller. This might lower the crystal's contribution to the error bar 10-100x.

Nice job, thanks for publishing it.

Unfortunate name (0)

Anonymous Coward | about 2 years ago | (#41413367)

In German, "ein Spanner" is a peeping Tom.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>