Top Banner
Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88
25
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Alireza Angabini

Advanced DB classDr. M.Rahgozar

Fall 88

Page 2: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Introduction

PNUTS Overview

Functionality

Architecture

Applications

Experimental Results

Conclusion

2A.Angabini - PNUTS

Page 3: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Main requirements of Web Apps

Scalability

Response Time and Geographic Scope

High Availability & Fault Tolerance

Relaxed Consistency Guarantees

3A.Angabini - PNUTS

Page 4: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

PNUTS is

Massively parallel

Geographically distributed database system

Designed Yahoo!

Used by their web application

Shared between several applications

4A.Angabini - PNUTS

Page 5: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Data Model & Features

Fault Tolerance

Pub-Sub Message System

Hosting

5A.Angabini - PNUTS

Page 6: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Data & Query Model

Consistency Model

6A.Angabini - PNUTS

Page 7: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Simplified relational data model

Organizes data into tables of records with attributes

Allows arbitrary structure inside a record – “blob”

Schema are flexible

New attribute is added without halting query or update

activity

Allow to have empty attribute in the record

Query language

Supports selection and projection in single table

Updates & deletes with primary key only

7A.Angabini - PNUTS

Page 8: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Hide the complexity of replication

Considered between general serializability & eventual consistency

Per-record timeline consistency “All replica of given record apply all updates to the record

in the same order”

8A.Angabini - PNUTS

Page 9: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Support range of API calls with different

levels of consistency

Read-any

Read-critical(required_version)

Read-latest

Write

Test-and-set-write(required_version)

9A.Angabini - PNUTS

Page 10: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Data tables are horizontally partitioned into groups of records called tablets

10A.Angabini - PNUTS

Page 11: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Ordered table

Primary-key space of a table is divided into

intervals

Each interval corresponds to one tablet

The router stores interval mapping

For a given PMK, binary search is used to find

the tablet

11A.Angabini - PNUTS

Page 12: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Hash-organized tablen-bit hash function H(), 0 ≤ H() < 2n [0... 2n) is divided into intervals Each interval corresponds to single tabletTo map a key to a tablet,

1. Hash the key2. Search set of interval using binary search

12A.Angabini - PNUTS

Page 13: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

The system uses asynchronous

replication

To ensure low-latency updates

Yahoo! Message Broker (YMB)

Used for replication & logging because:

1. Multiple steps are applied before committed

to DB

2. YMB is designed for wide-area replication

13A.Angabini - PNUTS

Page 14: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Recovery from failure (3 Steps)

1. the tablet controller requests a copy from the source tablet3. the source tablet is copied to the destination region2. “checkpoint message” is published to YMB

14A.Angabini - PNUTS

Page 15: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

User Database

Social Applications

Content Meta-Data

Listings Management

Session Data

15A.Angabini - PNUTS

Page 16: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Three PNUTS regions 2 west coast, 1 east coast 5 storage units, 2 message brokers, 1 router West: Dual 2.8 GHz Xeon, 4GB RAM, 6 disk RAID 5 array East: Quad 2.13 GHz Xeon, 4GB RAM, 1 SATA disk

Workload 1200-3600 requests/second 0-50% writes 80% locality

Storage engine for hash table “Yahoo! propriety disk-based hashtable”

Storage engine for ordered tables MySQL using InnoDB

16A.Angabini - PNUTS

Page 17: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

The coming experiments showThe impact of several factors on the

average latency for request

17A.Angabini - PNUTS

Page 18: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

18A.Angabini - PNUTS

Page 19: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

19A.Angabini - PNUTS

Page 20: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

20A.Angabini - PNUTS

Page 21: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

21A.Angabini - PNUTS

Page 22: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

22A.Angabini - PNUTS

Page 23: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Rich database functionality and low

latency at massive scale.

Tradeoffs between functionality,

performance and scalability.

Choose asynchronous replication to

ensure low write latency.

Delivers the data management as

hosted service

23A.Angabini - PNUTS

Page 24: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

B. Cooper, R. Ramakrishnan, U. Srivastava, A. Silberstein, P.

Bohannon, H. Jacobsen, N. Puz, D. Weaver, and R. Yerneni,

"PNUTS: Yahoo!'s hosted data serving platform," Proceedings of

the VLDB Endowment archive, vol. 1, 2008, p. 1277–1288.

Technical report, Raghu Ramakrishnan, Yahoo! Research and Platform Engineering Team

24A.Angabini - PNUTS

Page 25: Alireza Angabini Advanced DB class Dr. M.Rahgozar Fall 88.

Thanks For Your AttentionThanks For Your Attention

??

25A.Angabini - PNUTS