Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely...

17
1 Google Scale Data Management The slides are based on the slides made by Prof. K. Selcuk Candan, which is partially based on slides by Qing Li 2 Google (..a course on that??)

Transcript of Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely...

Page 1: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

1

Google Scale DataManagement

The slides are based on the slides made by Prof. K. Selcuk Candan,which is partially based on slides by Qing Li

22

Google (..a course on that??)

Page 2: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

2

33

Google (..a course on that??)

44

Google (what?..couldn’t theycome up with a better name?)

..doesn’t mean anything, right?

...or does it mean “search” in French, in German?...

Surprising, but “Google” actually means something.

• It comes from googol, which is the name of a “number”…

• A big one : 1 followed by 100 zeros

..this reflects the company's mission....and the realityof the world:

• Manage huge amount of data in the world

• Google's mission is to organize the world's dataand information and make it universallyaccessible and useful.

Page 3: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

3

55

..in fact there is more to Googlethan search... http://www.google.com/intl/en/options/

66

Question #1: How can it knowso much?...because it crawls…

Data

Web

Database

Crawling

Page 4: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

4

77

A whole lot of indexed data

One SearchEngine

A whole lot of users

Question #2: How can it be sofast?

88

Data

Index

Searching

SearchEngine

User

Result

Query

Web

d1d3K2

d1d2K1

Question #1: How can it be sofast?... It indexing and more…

Result

Indexing

Indexes: quick lookup tables(like the index pages in a book)

Crawling

Page 5: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

5

99

Question #2: How can it be sofast?

Database(copies of allweb pages!)

Front-endweb server

Content servers

1 2

34

use a lot of computers…but, intelligently! (Parallel architecture)

1010

Question #2: How can it be sofast?

Database(copies of allweb pages!)

Front-endweb server

Index servers Content servers

1 2 3

456

use a lot of computers…but, intelligently! (Parallel architecture)

organize data for fast access (Indexing)

Page 6: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

6

1111

Question #2: How can it be sofast?

Front-endweb server

Index servers

1

2

use a lot of computers…but, intelligently! (Parallel architecture)

organize data for fast access (Indexing)

most people want to know the same thing anyhow (Caching)

CACHE(copies of recent results)

Database(copies of allweb pages!)

Content servers

1212

Google Protocol Buffers and BigTable

XML is universal and standard for representingdata on Web;

For specific situations, XML may be slow;

Think about the amount of information stored inGoogle directories – Any efficiency improvementwill be significant;

A good design needs compromise / tradeoffbetween flexibility and efficiency

http://code.google.com/apis/protocolbuffers/docs/overview.html

What is the data description language used byGoogle?

Page 7: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

7

1313

Google Protocol Buffers

Compared to XML, Protocol buffers:

are simpler

are 3 to 10 times smaller in presenting thesame information

are 20 to 100 times faster in processing

are less ambiguous / flexible

generate data structures that are similar toobject-oriented classes and thus are easierto use programmatically

1414

Google Protocol Buffers

message Person {required string name = 1;required int32 id = 2;optional string email = 3;enum PhoneType {

WORK = 0;HOME = 1;MOBILE = 2;

}message PhoneNumber {

required string number = 1;optional PhoneType type = 2 [default = WORK];

}repeated PhoneNumber phone = 4;

}

Page 8: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

8

1515

<element name = Person>

<complexType>

<sequence>

<element name = “Id” minOccurs="1" maxOccurs="1"/>

<element name = “Name” minOccurs="1" maxOccurs="1"/>

<element name = “Email” minOccurs="0" maxOccurs="1"/>

<element name = “Phone” minOccurs="1" maxOccurs="1"/ >

</sequence>

</complexType>

</element>

<element name = “Phone” >

<simpleType>

<restriction base = “string” >

< enumeration value = “Work” minOccurs="1" maxOccurs="1"/>

< enumeration value = “Home” minOccurs="0" maxOccurs="1"/>

< enumeration value = “Mobile” minOccurs="0" maxOccurs="1"/>

</restriction>

</simpleType>

</element >

<element name = “Id” type = “integer”/ >

<element name = “Name” type = “string” />

<element name = “Email” type = “string” />

Asim

ilarD

escri

ption

inX

ML

Schem

a

1616

Google BigTable

BigTable is a fast and extremely large-scaledatabase management system;

It is a compressed, high performance, andproprietary database system built on Google FileSystem (GFS);

It departs from the convention of a fixed numberof columns, instead described by the authors as“a sparse, distributed multi-dimensional sortedmap”

Page 9: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

9

1717

Three-level hierarchy structure,analogous to that of a B+-tree

Two-Layer of Indexing

1818

Vector Space Model

<DOC 1>... cat ........ dog ......................dog................mouse .....dog........mouse ........................

Q = < cat, mouse, 0 >

Di = (di1, di2, ... , din)Q = (q1, q2, ... , qn)Similarity = Di . Q / |Di|*|Q|

dog

mouse

cat

D1

Q

Di = (1, 2, 3)Q = (1, 1,0)Similarity = (1*1+2*1+3*0)/( length of line D1 + length of line Q)

Term weight is only decided by the term frequency

3

1

2

Page 10: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

10

1919

Vectors model of text

A page with “ASU” with weight <0.5>

0 0.5 ASU

2020

Vectors…what are they???

Page with “ASU” with weight <0.5> and“CSE” <0.7>

0 0.5

0.7

ASU

CSE

Page 11: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

11

2121

Vectors…what are they???

Page with “ASU” with weight <0.5> and“CSE” <0.7>, and “SCI” <0.9>

0 0.5

0.7

0.9

ASU

CSE

SCI

2222

Measuring relevance: “Find 2closest vectors”

ASU

CSE

SCI

Requires “multidimensional”index structures

Query “ASU SCI CSE”

Page 12: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

12

2323

Question 3: How can it serve themost relevant page?

Text indexing/keyword search• Analyze the content of a page to determine if

it is relevant to the query or not

Link analysis• Analyze the (incoming and outgoing) links a

pages has to determine if the page is “worthy”or not

2424

Text Indexing

Text Indexing

Textanalysis

Rawtext

Index

CrawlingWeb

Taxonomy

Page 13: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

13

2525

Text Analysis

Query: a set of keywords

Page/document: is also a set of keywords(where some keywords are more importantthan the others)

….so, to create an index, we need to• extract of index terms

• compute their weights

2626

Term Extraction

Extraction of index terms• Morphological Analysis (stemming in English)

• “information”, “informed”, “informs”, “informative”

• inform

• Removal of stop words• “a”, “an”, “the”, “is”, “are”, “am”, …

• they occur too often!!!!!

• Compound word identification

Page 14: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

14

2727

Stop words

Those terms that occur too frequently in alanguage are not good discriminators for search

Rank (of the term)

Frequency

stop words

2828

An Example

Identify all unique words in collection of 1,033Abstracts in biomedicine

Delete 170 common function words includedIn stop list

Delete all terms with collection frequencyequal to 1 (terms occurring in one doc

with frequency 1)

Remove terminal “s” endings & combineIdentical word forms

Delete 30 very high-frequency terms occurringIn over 24% of the documents

13,471 terms

13,301 terms left

7,236 terms left

6,056 terms left

6,026 terms left

Final indexing vocabulary

Page 15: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

15

2929

How about “important”pages…how to identify them??

We can learn how important a page isstudying its connectivity (“linkages”)

3030

Hubs and authorities

•Good hubs shouldpoint to goodauthorities

•Good authoritiesmust be pointed bygood hubs.

Websites

with

colle

ction

oflin

ks

Websites

with

conte

nts

/reali

nfo

rmation

Page 16: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

16

3131

Page Rank PR( )

Basic idea: more links to a pageimplies a better page• But, all links are not created equal

• Links from a more important pageshould count more than links from aweaker page

Basic PageRank PR(A) for page A:• outDegree(B) = number of edges

leaving page B = hyperlinks on page B

• Page B distributes its rank boost overall the pages it points to

( , )

( )( )

( )B A G

PR BPR A

outDegree B

PR(A) = PR(C)/1

PR(B) = PR(A) / 2

PR(C) = PR(A) / 2 + PR(B)/1

3232

How to compute ranks??

PageRank (PR) definition is recursive

• Rank of a page depends on and influences other pages

Solved iteratively• To compute PageRank:

• Choose arbitrary initial PR_old and use it to compute PR_new

• Repeat, setting PR_old to PR_new until PR converges (thedifference between old and new PR is sufficiently small)

• Rank values typically converge in 50-100 iterations

• Eventually, ranks will converge

Page 17: Google Scale Data Management - public.asu.edu · Google BigTable BigTable is a fast and extremely large-scale database management system; It is a compressed, high performance, and

17

3333

Open-Source Search EngineCode

Lucene Search Engine• http://lucene.apache.org/

SWISH• http://swish-e.org/

Glimpse• http://webglimpse.net/

and more

3434

Reference

L.Page & S. Brin,The PageRank citation ranking: Bringing orderto the web , Stanford Digital Library Technique, Working paper1999-0120, 1998.

Lawrence Page and Sergey Brin. The anatomy of a large-scalehypertextual web search engine. In Proceedings of the SeventhInternational Web Conference (WWW 98), 1998.

Inside the Google Machinehttp://www.youtube.com/watch?v=2FSE3TNFkJQ&NR=1