Transaction Processing Foundations
Transcript
[MUSIC PLAYING] LAMPSON: I'm Butler Lampson. And Barbara has asked me to introduce Jim. This is Jim Gray, currently a colleague of mine at Microsoft. Jim and I go back a long way because we were both students at Berkeley in the late '60s. Since then, Jim has worked at a variety of industrial labs, IBM, Tandem, Digital Equipment, and recently, Microsoft. And he is one of the pioneers of the database and transaction processing business and indeed, laid many of the conceptual foundations for transaction
processing that we all depend on today to get our bank statements and our airline reservations and all kinds of other things to work. Right? GRAY: [INAUDIBLE]. [LAUGHTER] I'm sure you all have bank statements that don't work. [INAUDIBLE] [LAUGHTER] LAMPSON: I remember a few years ago, I got a whole series of bank statements that had entries of the form September 15th, $100 taken out of the ATM machine. September 15th, $100 taken out of the ATM machine. September 17th, canceling the second $100 withdrawal from the ATM machine. So clearly, that was a case where the nontransaction processing system hadn't done the right thing. And some person came along afterwards and said, oh, yeah. I recognize that mistake, undid it by hand. So transaction processing is really wonderful stuff. In fact, it took me many years to-- even though I worked on some of it more or less in parallel with Jim-- it took me many years to realize how wonderful it is.
It's this pixie dust that you can sprinkle on programs. You have a completely boring, run of the mill, sequential, non-fault tolerant program written by some random application programmer. And you sprinkle TP dust on it. And it magically becomes concurrent. It magically becomes fault tolerant, magically gets automatically scheduled and load balanced and everything you could possibly wish for. And it's the only thing like this that we know how to do in computing. If any of you can figure out another thing like that that we could do, another kind of pixie dust that we could sprinkle on programs, that would be a fabulous achievement. Anyway, in recent years, transaction processing-- more or less solved. Jim has moved on to other aspects of computing having to do with large quantities of data. A few years ago, he built a system called the TerraServer, which you can find on the web at terra.com, right? GRAY: TerraServer-- LAMPSON: TerraServer.com?
GRAY: TerraServer dot-- well, TerraService.net is the one that's really good. LAMPSON: TerraService.net. GRAY: "TerraService" as opposed to "server" because it's a web service. It also does the old stuff. But it does a lot of good, new stuff too. LAMPSON: It has a huge collection of satellite images of the world. And you can zero in on your very own house. The resolution, it's good enough that you can sort of see a blurry thing that corresponds to a car, right? GRAY: It's 1 meter. So if you have a small car, it's blurry. But if you have-- [LAUGHTER] --you have an American car, it's more than-- LAMPSON: It'll be several-- GRAY: 3 meters in 1 meter squares. LAMPSON: There'll be several-- [LAUGHTER] --there'll be several pixels. So it'll be built. GRAY: It'll be several pixels. LAMPSON: And today, he's going to talk to us about the next giant real-world database project, which is astronomy.
GRAY: So the database community has been, as Mike Stonebraker says, polishing a round ball for many, many years. We've been doing the same stuff we used to do better. And the advice that the database community keeps giving itself is to invest in application areas, broaden the database agenda to handle text, broaden the database agenda to handle a geospatial, broaden the database agenda to handle image data. And also broaden it to do data analysis, data mining,
and incidentally, data visualization. And I've been trying to take that advice to go into application areas and hope that the application areas will suggest interesting research problems for the database community and for myself in particular. And this is a story of what I've been doing for the last two years, working primarily with the astronomy community and trying to build what we sometimes call the World Wide Telescope or the Virtual Observatory.
And the idea is to try and take the astronomy archives that exist and the ones that are coming and make them a federated database which then is accessible to everybody everywhere. And in this new world, the best telescope in the world is the internet. So that's the top-level story. In doing this, I found myself working with quite a few people. I work with the people at Johns Hopkins quite closely. We correspond daily, basically, particular, Alex Szalay. Peter Kunszt is now at CERN.
Ani Thakar is still back at Johns Hopkins. And also to federate a database, you have to have two databases to federate. So I've had to try and find somebody else who has some data. And it turns out that the people at Caltech have both the Palomar Observatory and the Keck Observatory and have lots and lots of data from both of those telescopes. And so I've been working with them to get their data online. And now we're right in the throes of federating those two databases. So this is very much a work in progress. So what I'm going to do is first talk to you about astronomy data. Then I'm going to talk to you about the Virtual Observatory and then talk in detail about the Sloan Sky Survey. I'm giving a talk tomorrow that dovetails with this one that is much more detailed about database aspects. It's going to slight the first two parts of this talk and focus much more on the third part.
So at the top level, what I think is really going on here is that there's theoretical and empirical science. And then there's typically a tension between theoreticians and empiricists. In the last 50 years, there's been a new kind of science that's become increasingly popular and influential. And that's computational science. But most of computational science over the last 50 years has been simulations. People build an analytic model of some physical system. And they simulate it.
And they try and understand the science associated with a mechanical system or a physical system or a biological system by simulating it and use that as a way of building a scientific theory. Something that is happening increasingly now-- and it's been going on really for the last 15 years, but we are, at least in astronomy, at a cusp right now-- is that in the old days, people would go to the telescope and look through the telescope and write down what they saw. And then they would-- when cameras came along, they would take a camera and put it at the other end of the telescope. And then they'd look at the film.
But fundamentally, it was humans looking at data. And people would do most of the data analysis. And in this new world, there's a scientific instrument, be it the accelerator at CERN or be it the telescope in-- the people that I've been working with are using in New Mexico. And that device collects lots of data. It's basic unit of data is a terabyte, which is to say, a million megabytes. And it takes that data. And it sends it off to a data pipeline.
And the data pipeline takes that data and processes it and turns it into, in the case of nuclear physics, events, and in the case of astronomy, objects and spectra. And those objects and spectra go onto a disk. And at some later time, the astronomer comes along and looks at those objects and spectra and treats the collection of all the objects and the collection of all the spectra as a corpus. And they do analysis on that corpus, sometimes looking for odd things, sometimes looking for trends.
And this is a different kind of science. It's computational science. But it's data mining rather than simulation. In essence, the universe is your simulator. And you're getting the data out. And there's a lot of it. And there's so much of it that you-- no human being can look at it. You need a robot to analyze the data. So the astronomers, fundamentally, like many sciences, are writing Moore's law. So the picture at the bottom is the CCD chart. This is optical astronomy. The picture at the bottom is the number of pixels-- or, in fact, I think is it megapixels-- the number of megapixels that the astronomers have that's hiding behind some large telescope. The graph at the top is the number of square meters of telescope. So the picture at the top is how many photons they've got to work with. That's the aperture.
And the picture at the bottom is how efficient they are at harvesting those photons. And the CCDs are getting better and better and better. Right now, the astronomers have about a gigapixel. Right now, the astronomers are building a single telescope that has a gigapixel CCD. So what's fundamentally going on is that every two years, they double the amount of data that they've captured. Right now, they have a few petabytes, probably 1 petabyte of good data and a few petabytes of data of unknown provenance is what we might call it.
If you just take a picture of the sky with 1 pixel per square arcsecond, you get about 4 terabytes. And that's the kind of resolution that these telescopes have. So your basic data set is 4 terabytes. But you can take pictures in multiple parts of the spectrum. And you can take pictures at multiple times. And so an interesting thing about astronomy data, which is a little bit different from, say, nuclear physics data, is physics doesn't change much from day to day. The Higgs particle is the same today as it was yesterday to a first approximation. Stars and galaxies do change. They have a strong temporal dimension. And they also have a strong spectral dimension.
And I'll show some examples of that in a while. So what the astronomers do with this data is they mine it. And there's sort of two kinds of things. There's what I'll call the easy problems, which is looking for strange objects, look for high redshift things that look like there might be quasars. And then you go off and look at those things in detail. Or look for very cold things. And those are brown dwarfs, things that are much bigger than the planets but a lot smaller than the sun. And so they aren't thermonuclear. They're just giving off heat because of the gravitational force. So these are kinds of objects that 10 or 15 years ago were not very well understood. And now we have lots of examples of them. And we're beginning to be able to characterize them much better. As I said, the data doubles every two years. The astronomy community, unlike some other communities, they share their data. And if you go to Walmart and ask Walmart to share their data, they will say, no.
If you go to Yahoo or Microsoft and say, share your data, they'll say, no. So you can get terabytes from lots of places in theory. But in practice, you can't. If you go to medical imaging and want to get a bunch of X-rays, you might be able to get that information. But there's also some privacy concerns. An interesting thing about the astronomy data is it's completely worthless. There's no commercial value associated with astronomy-- [LAUGHTER] --OK? So in fact, we've done stuff of Earth observation and pictures of your backyard. Turns out that has commercial value. And there's all sorts of stuff of stepping on people's toes because you're publishing something for free that they could sell. So one interesting thing about the astronomy data is there's lots of it. It has interesting dimensions, temporal, spectral, and others. And it's free. And the astronomers have a history of sharing and publishing their data.
And these things, I've actually looked hard for data like this. And it's not trivial to find it. This is actually one of the best examples I've found. So if you do the math, interesting thing about doubling times is that what happens in the next doubling time equals what happened in the history of mankind. So the area under the curve in the next two years equals the area under the curve all integrated back to 0, t equals 0. So the amount of data that they're going to get next year or next two years is equal to the amount of data that they got in the history of mankind, the next petabyte. But the old petabyte is public.
So there are people who have, access to the old petabyte and maybe 10% of the new petabyte. And then everybody has access to the old petabyte. So some people have 55% access and some people have 50% access. So this is a huge democratizing influence in astronomy. People in Africa can get to this data. People in Asia can get to this data. And, of course, people at Caltech can get to the data. People at Caltech and Johns Hopkins have 55%, and the people everywhere else have 50%.
But just exactly how do I get to that 50%? The astronomers do have a culture of publishing. They have this format called FITS files. So fundamentally, you can go to one of these archives, and you can say, I'd like to download the archive. And of course, get started. If you're in Africa and you have a phone line, voice grade, don't try and download a petabyte to it. And once you've got it, where are you're going to put it? But probably more troubling than that is that the details of publishing are really hard.
There's a book by Douglas Adams called the Hitchhiker's Guide to the Galaxy. And the theme of that book-- it has several themes, but boiled down to a simple one liner, answer's 42. So all of astronomy can be summarized. And in fact, all of existence can be summarized that way. So the problem is you have to ask Adams, so what are the units on that? And what is the precision on that? What is the error bar? It is 42 plus or minus 1 or 42 plus or minus 10?
And exactly how did you come to that conclusion? It turns out that when somebody gives you some data, you would like to know all the processing steps that went through. Because, I mean, it's really-- the really interesting thing about that is that he was able to reduce all of human existence in some algorithmic way to this number, 42. And I'd like to him to show his work is what the-- [LAUGHTER] --typical high school teacher would tell you. Give the answer and show your work. And I actually read that book, and it doesn't actually explain how-- her doesn't explain. And I claim that it would be fairly-- he's dead now. But if he'd stuck around, it would have been rather difficult for him to show his work. And if you want to explain very briefly to somebody who is not practically experienced in the art, just talk to them about 42 is the answer. Now what was the question? And what are the units? And what's the precision? And, in fact, what was the process?
And then there are a few other details, like the astronomers typically don't have a petabyte. So you really need to leave the data where it came from. The data actually is best understood by the people who gathered it and who are publishing it. And, in fact, you typically publish the data and algorithms to mess around with the data. So my premise is that what we really want to do is to have a set of archives. And each archive manages the data that it collected. So if you have a radio telescope, you also have a radio telescope archive. If you have the space telescope, the Hubble Space Telescope, then you have the Hubble Space Telescope archive. If you did these Sloan Sky Survey, then you have the Sloan Sky Survey archive. And now consumers of this data want to go and treat all of these archives as a homogeneous set of data and ask questions of it. So there are plumbing problems, let me call them database problems, about, well, how do you manage a petabyte?
And how do you load a petabyte, and how you index it, and so on. But I think the really challenging problem is, how do we make it easy for people to publish information? Because, frankly, the astronomers want to do astronomy. They don't want to become publishers of astronomy data. They want to be publishers of astronomy results. And how do-- once it's published-- how do we make it easy for the consumers to go and ask questions of the data and get answers back? So just the characteristics, there's lots of it. It's high dimensional. And cross-correlation is challenging because it's multiresolution. It's time varying, and the data is very dirty. An airplane flies in front of your favorite object, and sometimes they notice that it's an airplane, and the object is bad in their thing. And sometimes they have a hard time disambiguating the airplane from the object or cosmic rays or--
I'm just going to try and get across the time dimension. So if you were an astronomer 1,000 years ago and you looked up in the sky and had really good eyes, you would've seen a little white dot. And it was called the Crab star. And now this is the way it looks. This is the same object being observed in the radio, the optical, the infrared, and the X-ray bands. And they look completely different, at least they look completely different to me. And each of those pictures gives you
a different structural description of the object. So this is both showing you the fact that it's very important to be able to look in multiple spectra, multiple spectral bands. And incidentally, all this false color here, say, in the upper right, is really due to the fact that they're observing it in four or five color bands in the optical. And then they're making a coffee table image of this thing. But there's actually five different pictures that are being melded together there. And each of the five pictures look different. In fact, this is trying to get across that idea.
Let's see if I can use this wonderful thing. So here's a very, very nice spiral galaxy which is just a speck in that spectrum band. But it's actually very clear here. And what's likely is this is shifted way down. So this is probably a very highly redshifted galaxy, that's my guess. But these objects all look different in the different bands. So what you've got is a bunch of different observations, and you're trying to understand whether it's the same object. And objects vary over time.
And I showed you the Crab Nebula slash Crab star varying over time. So here's the basic mathematical problem that we're up against. Somebody gives you a bunch of data. And that's this picture up at the top. And you would like to break that data into clusters. And the way we are approaching the data today and the way the astronomers have approached the data historically is in the old days, they did it by hand, and increasingly, they used computers. And more and more and more, they're using data mining algorithms and clustering algorithms and much better algorithms. But still, it's manual drive. So what would be really nice is to have automatic transmission, which is to say, you pour the data into the database and it wanders over it.
Because people are-- the way they do this analysis is they operate in two dimensions and they plot things. And if you go into an astronomers office, the wall is covered with 2D plots. And if you go and look on their desktop and their computer, it's covered with window after window after window of the same data plotted x versus y, y versus z, x versus z, and so on, and convolutions of x, y, and z. So what would be nice is if you could give a data set to the computer and it could go and to do all of that for you. And incidentally, the processing element in all of this is then the human eye looking for either a straight line or some trend line. It would be nice if you could get the computer to do that for you really fast. And it would even be nicer-- I'm sure it's going to have some false positives-- but it would be nice if some of the things it suggested were useful, things that people haven't observed. And one of the things you'll notice right away
about what I said is that the astronomers are now very good at finding 2D correlations. But they're not especially good at finding 3 and 4 and 5D correlations. It happens, but the methods I described don't really show that. So here's the premise of the Virtual Observatory. Most of the data will be online. So the world's best telescope is the internet. The nice thing about the internet is it has data on every part of the sky. It has data in all the measured spectra. The data is as good as the best instrument two years ago. Because I said the reason the data isn't public immediately is that the astronomers typically work a decade to build their instrument. So they would like to have first shot at the resulting data.
That's hard for me as a computer guy to imagine starting a project where I'm not going to get my first result for 10 years or 15 years and I going to have to sync 100 million dollars into it. But in fact, I just was visiting people at CERN. They're going to be about $10 billion in the hole before they get their first event out. And the official story is it's going to take them 10 years. But it's probably going to take them 15 years before they get started. So this is big science. But the internet is little science, which is to say, you can pull out the data that interests you and process it on a fairly modest computer.
The nice thing about the internet is it's up when you're up. Astronomers have this tradition of you go to the telescope some night. Maybe you get two or three nights of observation. And incidentally, if it's cloudy that night, you're out of luck. So people fly to Hawaii and sit there and deal with the Keck. And if there's a storm going by, then they get some vacation and talk to each other. And the other thing is that it's a smart telescope, which is to say, you can point to an object and get all the information about that object, not just from that observatory but from all the other observatories, and also get the literature on that object and get the literature on all the other objects that are like that object.
So I'm going to be talking about the Sloan. But the astronomers, as I said, are on Moore's Law. And they're doing lots and lots of these broad spectrum surveys. Typically, each survey is at a different part of the spectrum. And about 25% of their budget is software, which is I found an interesting fact. About 25% of their budget goes into building the data pipeline to do the data analysis. And date of publication is an integral part of the surveys. I said that they had about a petabyte of data, and they have many more petabytes of unknown provenance. Even that petabyte that is of known provenance, much of it is a little rough. Hasn't been gathered in a systematic way. It was a particular part of the sky, and they pointed a telescope here and then they pointed a telescope here and then they pointed the telescope here. So it's not necessarily a good statistical sample.
So federating these new surveys is a real challenge. And you have a pretty good chance of doing federation because these surveys, many of them are just getting started. And they're building the software right now. So we have some influence on what they're going to build and how they're going to publish their data. And the challenge is, of course, well, it's petabytes. And that's still a lot of bytes. There's the unsolved metadata problem. There is the fact that the current visualization and data analysis tools are inadequate. And there's the fact that it's hard to get a job in an astronomy department or in a computer science department if you work in this area because this is not a well-established field in either astronomy or computer science. So the approach, fortunately, I don't have to get tenure. So I get to more or less spend some of my time doing what I want to do. And so I have sort of have this three-step program of first trying to get two surveys online and up as a web
service and then federate the two of them together. And that federation is going to require some agreement between Caltech and Johns Hopkins about what kind of units they're going to externalize. I'll talk about that in a minute. So I can't give you a demo of the virtual sky stuff. But there is the URL for it. And what the virtual sky is, it's all of the Palomar data poured into something that's very much like the TerraServer, except looking the other way. And so you can pan across the sky. And you can point to an object and drill down and drill down and drill down. And at a certain point, you can say, go off and show me the pictures you have from the other Palomar data sets-- and they have three or four data sets--
or go off to NED, which is the database of literature about astronomy. And there's another database called VizieR and SIMBAD. It's in France, in Grenoble. So there's a cross-correlation between the objects you're looking at and the literature about objects. And for famous objects, you get lots of hits. And for an object that is very, very faint, you're likely to get nothing in the database. But we could, say, recognize that object and say, oh, that's a galaxy of this class, and here's all the literature, the most common literature about galaxies of that type. So I can give you a demo of this guy. And I hope-- yes, I can. I bet.
So I have a 1% subset of the Sloan data on my laptop here. And I have a little web server that goes along with it. And here's the front page of the SkyServer. And it has some interesting components to it. It was originally done as a so-called outreach project. It was originally done to make the NSF happy that the Sloan astronomers are helping K through 12, which turns out to be an important thing for the National Science Foundation, teach science to K through 12. So there is a whole bunch of things here about-- and this is a subset of this-- about teaching people about the Hubble diagram or teaching people about redshifts
or teaching people about spectra. And so they're a bunch of classes. And this is actually very participatory. These classes are typically 15 hours. And at the end of the 15 hours, you've discovered the Hubble diagram. Or you've discovered redshifts. And you've also learned to do data analysis, complete with an understanding of error bars and the fact that scientific data sometimes gives you false answers and things like that. So there are things for young kids, which are Easter egg hunts. And there are things for middle school kids, which are really basic science, teaching some mathematics. And then there are things which teach broader, more advanced topics.
For the astronomers-- well, actually, what's my favorite place is famous places. And this is all just things from the photo gallery. This is a coffee table. And you can point to one of these things. And those are two galaxies that are interacting. So this is stuff that's just from the database, things that were found that were interesting. But you can also go to this thing and get information about the objects in a certain part of the sky. So now we're actually going off to the database.
And that's the summary information about all the objects in a certain neighborhood. And you can type in a latitude or-- I'm sorry-- a right ascension, a declination, and a radius or bounding box and get information about these things. And you can get more information. Incidentally, the scary thing is that's the SQL. And we're trying to teach people SQL, which is probably a stupid thing to try and do. Like teaching a pig to sing, I think. I mean, we ought to teach people better tools than that. But you can actually type in raw SQL. Not proud of that, OK? [LAUGHTER] But you can do it. And it says, not for the faint of heart. But we are working on a GUI interface where you show people the database schema, and they point and click, and the joins are done for them. And simple kinds of queries can be done that way. And we're working on trying to make more complicated queries work. So this is the TerraServer kind of approach, where you can point to a spot in the sky.
And now that's the blow up of that spot in the sky. And you can point to that spot. And there is the detailed information about that spot or the summary information. And that's the point in the sky. It's a galaxy. It's 19th magnitude in the green and 16 in the red. And here is the detailed information from the database about that thing. I said it was high dimensional data. There's like 400 attributes associated with that thing. And I guess, I didn't show the spectra. And I should show that. And then I'll get on with the end of demo.
Get images, I think it's called spectra. And actually plates is a good thing to do. So these, the way they take spectra, they take them 600 at a time. There's about 50,000 spectra in this thing. When they're done, they'll have a million spectra. And you can point to-- this layout just says these are all the spectra that were taken at one instant. And we have a QSO with a redshift of 2. And there's it's spectra. And it doesn't look very good because the browser is messing it up. But there's the spectrogram associated with it. And incidentally, there's a whole bunch of data associated with this spectrogram. It's been processed, and they've extracted typically about 30 spectral lines in a database. And now you can ask questions about the spectral lines and the spectrogram. But this is the picture associated with it, much as you'd have a picture associated with the galaxy or a star.
So that guy exists. He's running along. He's being used by people. As I said, it was intended primarily as something for K through 12. What we're actually finding is that the astronomers have such crappy tools that they also find this pretty useful. And if K through 12 can actually get to use this, then the astronomers can actually figure out how this interface works as well. And so we're beginning to have people come to this and starting to do science on this interface.
And as a consequence, we're making it more elaborate. So I have talked a little bit about this. But there's this notion that the Virtual Observatory could actually have a substantial impact on education. And I think I mentioned that in the beginning and science was empirical. And then we began to have an analytic science. And now we're heading into this era of computational science, which has traditionally meant simulation. And I don't mean that simulation is going away. But there's a second branch of computational science, which is data analysis. And I think that is increasing data mining and so on. And this is a very good place to teach data mining. So here is a data set. It's public. You can actually get a tiny version of it on your laptop. You can put this in schools. And you can teach people how to do data analysis with this. And in fact, that is being done. So it's actually a nice way of teaching astronomy. You can talk to people about a certain kind
of astronomical phenomena. And then you can go off and have them either discover it or explore it. So what next? After we've got the data online and after the web servers are serving up those HTML pages-- and I guess I didn't show, but I could have clicked if I had done the SQL and gotten XML out. So it'll produce XML or HTML or comma separated lists. And we're working on having it produce FITS files, which are the lingua franca for the astronomers.
How do you actually publish the data? So one answer is, oh, we just publish XML. And perhaps you publish a schema and you're done. And the problem is that bytes are the wrong abstraction. Barbara's here. You folks have been leading the OO charge for many, many, many, many, many, many, many years. I forget who it was. But somebody said, algorithms are programs plus data. Was it Worth? Is that? So XML is just data. It's no programs. So you need to have--
when you publish, you need to publish programs plus data. Now you don't actually publish the source code of your programs. You publish the methods, how to call the program. So we are struggling with the following challenge. What are the objects in astronomy? I mean, you look up in the sky and you see specks of light. But the astronomers have a much fancier categorization than just the color of the thing. So what are the objects? What are the methods on those objects?
What attributes do the objects have? Now clearly, we don't know. Every day, people find new attributes for the objects. People find that new things are important. So whatever you decide, you're wrong. But there are a few things that we know. The objects have a position in space as of a certain time. And they have a velocity in space. And some of the objects, we can measure the velocity. So there's some stuff in 3-space. In a particular spectral band, there's something that you measure.
And of course, everything is measured in an instant in time or a period in time. So there are a whole bunch of parameters that are sort of standard that the astronomers can measure. So we're trying to come up with, essentially, what are the basic things that are known about objects that everybody can agree to and then an escape mechanism, which, in fact, is XML, to let people describe everything else. In fact, the TerraServer is an example of this. What we have done for the TerraServer is turned it from a web server, which serves up HTML pages, to a web service, which answers RPCs. So if you go to TerraService.com and you just type that, what you'll get back is a bunch of XML that describes the methods it supports. And that's the web service definition language coming back at you. So this is IDL for the internet, Interface Definition Language. And if you go to UDDI or DISCO or something,
you can discover the TerraService and discover that it's a geospatial server. But with that stuff that comes back to you is a list of all the methods you can do. And there's a schema that's referenced in those methods that say, OK, I return place names, and I return images of spatial rectangles, and so on. And all of the notions of what is a place name and what is a spatial rectangle and so on are defined in a schema, again, a piece of XML. So now you can go and say in your program,
new of TerraService. You now have a handle. You can now call a method that says, give me a picture of my house, which is-- bounding box is-- this is the upper left-hand corner. This is the lower right-hand corner in latitude and longitude. And the next thing you know, in your address space is a bitmap of an aerial photo of your house. And what's happened is an RPC has gone off to this thing. It's been marshaled into XML, gone across the internet,
unmarshalled at the other end, turned into a real RPC, rooted around in the database, come back, stitched together at the image that you asked for, take that image, marshal it into XML, send it back to your program, unmarshalled back into your address space. Just standard RPC. And if you want, you can say, no, I don't want it. I want to see the XML. I don't want to see it in Java classes, or I don't want to see it in C structs. I want to see it in its original form, which is the raw XML.
So the TerraService is worth looking at. And we're trying to do the same thing for astronomy archives. And so you basically say, give me a new handle on the SkyServer. And then the SkyServer has a method called GetObjects. And that method returns a whole bunch of attributes. And now you've got those attributes in your address space. And you can do whatever you want with them.
And the thing we're struggling with, in fact, is how much of this can we do as early binding? And how much of it is late binding, which is to say, to what extent do we return XML documents? And to what extent do we return Java classes or things that you know about at compile time? So now I'm going to segue to a little bit of discussion about the Sloan itself and what I've been doing with that data. Again, these guys have been building instrument for about 12 years. Last year, they gathered a bunch of data. They have about 3 terabytes of raw data and about 50 gigabytes of cooked data. And when I say "cooked data," these are 15 million objects and lots of attributes associated with the objects.
So that little disk drive there is 60 gigabytes. That's actually 80 gigabytes. It easily holds all the data. And this is not the image data and the raw data. This is the processed data. It has all the spectral images, but it doesn't have all of the cutouts of the various galaxies and stars. So I've been working on making it easy for astronomers to access this data. And the way they access it today is it's ASCII files. And they're C programmers. And they write C modules.
And they write Tcl scripts that invoke those C modules. And they go and paw over all the files and look for interesting things or look for trends. And the premise is you could take all the stuff that's in those C files, throw it into a database, index the heck out of it, and then write queries against the data. So I've been trying to do that. And the question is, well, what kind of questions do the astronomers ask? So Alex Szalay gave me a list of 20 questions.
And this is characteristic of the kind of question an astronomer would want to ask of the data. It would take about a week to write the C program and run it and get the answer out, do the data analysis. So I've been trying to design a database that makes it easy to do that. The goal is to give the answers back in less than a minute and have the program be that big. If we could do that, that would be great.
So the first thing is there's two kinds of stuff in this world, there are photos and that's a photo object. And this is all a crap around photo objects. Just, you know, there's a lot of encoded fields. And this is the encoding of the fields. These are the spectrographic objects and the spectral lines. This is the plate. All the spectrograms that were taken on a certain night are inside of one plate. This is a part of the sky. And that's a larger part of the sky, a so-called stripe.
Many, many, many of the astronomers' queries are spatial. So I had to implement-- and the particular database I work with doesn't have spatial access in it. So I had to implement a spatial access method. Embarrassingly, other products do have spatial access methods, but they don't do spherical very well. So I probably would have had to do the same thing in somebody else's product. Those are the 20 queries. So here's a typical one of the 20 queries. Find a list of moving objects consistent with an asteroid. So what does it mean for something to be an asteroid? Well, it means it's moving pretty fast. And so it turns out that in the pipeline, they take five different exposures because they have five different spectral bands that they're measuring. And the exposures are taken at five different times. Because the way the telescope works is it points up at the sky.
And the Earth drifts along, and the image of the object processes across the CCDs. And they actually shift the CCDs as the image moves. And they're gathering pixels from a certain object for about a minute. And then the object goes off of one CCD and goes onto the next CCD. And now they're gathering green pixels. And now they're gathering blue pixels. And now they're gathering red pixels. So they're getting a picture of the object at a different time. And if the object's moving when you reregister those frames, the object is going to be in a different place. And they detect moving objects in that way. And so here's the query that finds the moving objects. And it basically says, show me all of the things where the square root of the velocity in this dimension and this dimension are greater than a certain threshold. And so we did that. And the guy who is serious about these things says, no, no, no, no. I want fast-moving objects.
I don't want slow-moving objects. Slow-moving objects, I'll recognize that they've moved. But if they move a lot from frame to frame, I won't think it's the same object. I think it's a different object. So here is a picture where the object was there when we were taking the blue picture. And then we took another picture and another picture. And then it registered in the red. And then it registered in the green. And those show up as three different objects in the database. So now what we have to do is to paw through the database and find something that's very elliptical in the blue and has no other spectrum. And then all of a sudden, it's very elliptical in the red. It has no other spectrum and then some other object that's very elliptical in the green and has no other spectrum. And in fact, these things line up. So the story behind this one is that the previous query is a query that was one of the queries that Alex gave me. But this query is the fast moving guys.

Ask anything
We've read this whole study set, so questions about it get the best answers.