Parallel and distributed databases II. Some interesting recent systems MapReduce Dynamo Peer-to-peer.

Slides:



Advertisements
Similar presentations
P2P data retrieval DHT (Distributed Hash Tables) Partially based on Hellerstein’s presentation at VLDB2004.
Advertisements

Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
Peer to Peer and Distributed Hash Tables
Digital Library Service – An overview Introduction System Architecture Components and their functionalities Experimental Results.
P2P Systems and Distributed Hash Tables Section COS 461: Computer Networks Spring 2011 Mike Freedman
Chord: A scalable peer-to- peer lookup service for Internet applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashock, Hari Balakrishnan.
1 1 Chord: A scalable Peer-to-peer Lookup Service for Internet Applications Dariotaki Roula
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT.
An Overview of Peer-to-Peer Networking CPSC 441 (with thanks to Sami Rollins, UCSB)
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
1 Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan.
Topics in Reliable Distributed Systems Lecture 2, Fall Dr. Idit Keidar.
Introduction to Peer-to-Peer (P2P) Systems Gabi Kliot - Computer Science Department, Technion Concurrent and Distributed Computing Course 28/06/2006 The.
Efficient Content Location Using Interest-based Locality in Peer-to-Peer Systems Presented by: Lin Wing Kai.
Distributed Lookup Systems
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Peer-to-Peer.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek and Hari alakrishnan.
G Robert Grimm New York University Bayou: A Weakly Connected Replicated Storage System.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
1 CS 194: Distributed Systems Distributed Hash Tables Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
1 Seminar: Information Management in the Web Gnutella, Freenet and more: an overview of file sharing architectures Thomas Zahn.
Peer To Peer Distributed Systems Pete Keleher. Why Distributed Systems? l Aggregate resources! –memory –disk –CPU cycles l Proximity to physical stuff.
Wide-area cooperative storage with CFS
Peer-to-Peer Networks Slides largely adopted from Ion Stoica’s lecture at UCB.
Introduction to Peer-to-Peer Networks. What is a P2P network Uses the vast resource of the machines at the edge of the Internet to build a network that.
INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington.
Distributed Hash Table Systems Hui Zhang University of Southern California.
1 Napster & Gnutella An Overview. 2 About Napster Distributed application allowing users to search and exchange MP3 files. Written by Shawn Fanning in.
Introduction to Peer-to-Peer Networks. What is a P2P network A P2P network is a large distributed system. It uses the vast resource of PCs distributed.
Content Overlays (Nick Feamster). 2 Content Overlays Distributed content storage and retrieval Two primary approaches: –Structured overlay –Unstructured.
Introduction of P2P systems
Using the Small-World Model to Improve Freenet Performance Hui Zhang Ashish Goel Ramesh Govindan USC.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
1 Distributed Hash Tables (DHTs) Lars Jørgen Lillehovde Jo Grimstad Bang Distributed Hash Tables (DHTs)
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
MapReduce Kristof Bamps Wouter Deroey. Outline Problem overview MapReduce o overview o implementation o refinements o conclusion.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
SIGCOMM 2001 Lecture slides by Dr. Yingwu Zhu Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Peer to Peer Networks Distributed Hash Tables Chord, Kelips, Dynamo Galen Marchetti, Cornell University.
Paper Survey of DHT Distributed Hash Table. Usages Directory service  Very little amount of information, such as URI, metadata, … Storage  Data, such.
Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
Chord Advanced issues. Analysis Theorem. Search takes O (log N) time (Note that in general, 2 m may be much larger than N) Proof. After log N forwarding.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Distributed Hash.
Chord Advanced issues. Analysis Search takes O(log(N)) time –Proof 1 (intuition): At each step, distance between query and peer hosting the object reduces.
1. Efficient Peer-to-Peer Lookup Based on a Distributed Trie 2. Complex Queries in DHT-based Peer-to-Peer Networks Lintao Liu 5/21/2002.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Distributed Hash Tables Steve Ko Computer Sciences and Engineering University at Buffalo.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 37 – Introduction to P2P (Part 1) Klara Nahrstedt.
Two Peer-to-Peer Networking Approaches Ken Calvert Net Seminar, 23 October 2001 Note: Many slides “borrowed” from S. Ratnasamy’s Qualifying Exam talk.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
CS 347Notes081 CS 347: Parallel and Distributed Data Management Notes 08: P2P Systems.
P2P Search COP6731 Advanced Database Systems. P2P Computing  Powerful personal computer Share computing resources P2P Computing  Advantages: Shared.
CS694 - DHT1 Distributed Hash Table Systems Hui Zhang University of Southern California.
Kitsuregawa Laboratory Confidential. © 2007 Kitsuregawa Laboratory, IIS, University of Tokyo. [ hoshino] paper summary: dynamo 1 Dynamo: Amazon.
CSE 486/586 Distributed Systems Distributed Hash Tables
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Peer-to-peer Systems All slides © IG.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 24 – Introduction to Peer-to-Peer (P2P) Systems Klara Nahrstedt (presented by Long Vu)
Peer-to-Peer Information Systems Week 12: Naming
CS 268: Lecture 22 (Peer-to-Peer Networks)
CSE 486/586 Distributed Systems Distributed Hash Tables
Distributed Hash Tables
MapReduce Computing Paradigm Basics Fall 2013 Elke A. Rundensteiner
EE 122: Peer-to-Peer (P2P) Networks
Chord Advanced issues.
P2P Systems and Distributed Hash Tables
Chord Advanced issues.
MIT LCS Proceedings of the 2001 ACM SIGCOMM Conference
CSE 486/586 Distributed Systems Distributed Hash Tables
Peer-to-Peer Information Systems Week 12: Naming
Presentation transcript:

Parallel and distributed databases II

Some interesting recent systems MapReduce Dynamo Peer-to-peer

Then and now

A modern search engine

MapReduce How do I write a massively parallel data intensive program? Develop the algorithm Write the code to distribute work to machines Write the code to distribute data among machines Write the code to retry failed work units Write the code to redistribute data for a second stage of processing Write the code to start the second stage after the first finishes Write the code to store intermediate result data Write the code to reliably store final result data

MapReduce Two phases Map: take input data and map it to zero or more key/value pairs Reduce: take key/value pairs with the same key and reduce them to a result MapReduce framework takes care of the rest Partitioning data, repartitioning data, handling failures, tracking completion…

MapReduce X Map Reduce X

Example Map Reduce Count the number of times each word appears on the web apple banana apple grape apple grape apple banana apple grape apple grape apple apple,1 banana,1 apple,1 grape,1 apple,1 grape,1 apple,1 banana,1 apple,1 grape,1 apple,1 grape,1 apple,1 apple,5 grape,5 banana,5

Other MapReduce uses Grep Sort Analyze web graph Build inverted indexes Analyze access logs Document clustering Machine learning

Dynamo Always writable data store Do I need ACID for this?

Eventual consistency Weak consistency guarantee for replicated data Updates initiated at any replica Updates eventually reach every replica If updates cease, eventually all replicas will have same state Tentative versus stable writes Tentative writes applied in per-server partial order Stable writes applied in global commit order Bayou system at PARC

Commit order Storage unit Inconsistent copies visible Storage unit Local write order preserved Eventual consistency Master storage unit (Joe, 22, Arizona) (Joe, 32, Arizona) (Joe, 22, Montana) Arizona  Montana (Joe, 32, Montana) (Bob, 22, Montana) Joe  Bob (Bob, 32, Montana) All replicas end up in same state 22  32 Arizona  Montana Joe  Bob Arizona  Montana Joe  Bob 22  32

Mechanisms Epidemics/rumor mongering Updates are “gossiped” to random sites Gossip slows when (almost) every site has heard it Anti-entropy Pairwise sync of whole replicas Via log-shipping and occasional DB snapshot Ensure everyone has heard all updates Primary copy One replica determines the final commit order of updates

Epidemic replication Susceptible (no update)Infective (spreading update)Removed (updated, not spreading) Update Node is already infected

Anti-entropy Infective (spreading update)Removed (updated, not spreading) Will not receive update Pairwise sync Susceptible (no update)

What if I get a conflict? How to detect? Version vector: (A’s count, B’s count) A Brian=‘GoodProfessor’ B Brian=‘BadProfessor’

What if I get a conflict? How to detect? Version vector: (A’s count, B’s count) Initially, (0,0) at both A writes, sets version vector to (1,0) (1,0) dominates B’s version (0,0) No conflict A Brian=‘GoodProfessor’ B

What if I get a conflict? How to detect? Version vector: (A’s count, B’s count) Initially, (0,0) at both A writes, sets version vector to (1,0) B writes, sets version vector to (0,1) Neither vector dominates the other Conflict!! A Brian=‘GoodProfessor’ B Brian=‘BadProfessor’

How to resolve conflicts? Commutative operations: allow both Add “Fight Club” to shopping cart Add “Legends of the Fall” shopping cart Doesn’t matter what order they occur in Thomas write rule: take the last update That’s the one we “meant” to have stick Let the application cope with it Expose possible alternatives to application Application must write back one answer

Peer-to-peer Great technology Shady business model Focus on the technology for now

Peer-to-peer origins Where can I find songs for download? Web interface Q?

Napster Q?

Gnutella Q?

Characteristics Peers both generate and process messages Server + client = “servent” Massively parallel Distributed Data-centric Route queries and data, not packets

Gnutella

Joining the network ping pong ping pong ping pong

Joining the network

Search Q? TTL = 4

Download

Failures X

Scalability! Messages flood the network Example: Gnutella meltdown, 2000

How to make more scalable? Search more intelligently Replicate information Reorganize the topology

Iterative deepening Q? Yang and Garcia-Molina 2002, Lv et al 2002

Directed breadth-first search Q? Yang and Garcia-Molina 2002

Random walk Q? Adamic et al 2001

Random walk with replication Q? Cohen and Shenker 2002, Lv et al 2002

Supernodes Q? Kazaa, Yang and Garcia-Molina 2003

Some interesting observations Most peers are short-lived Average up-time: 60 minutes For a 100K network, this implies churn rate of 1,600 nodes per minute Saroiu et al 2002 Most peers are “freeloaders” 70 percent of peers share no files Most results come from 1 percent of peers Adar and Huberman 2000 Network tends toward a power-law topology Power-law: n th most connected peer has k/n  connections A few peers have many connections, most peers have few Ripeanu and Foster 2002

“Structured” networks Idea: form a structured topology that gives certain performance guarantees Number of hops needed for searches Amount of state required by nodes Maintenance cost Tolerance to churn Part of a larger application Peer-to-peer substrate for data management

Distributed Hash Tables Basic operation Given key K, return associated value V Examples of DHTs Chord CAN Tapestry Pastry Koorde Kelips Kademlia Viceroy Freenet …

Chord 0 2 m -1 Node ID = Hash(IP) Object ID = Hash(Key) Stoica et al 2001

Searching K? O(N)

Better searching K? O(log N) Finger table: i th entry is node that succeeds me by at least 2 i-1, m entries total

Joining X

O(log 2 N)

Joining

Inserting X

What is actually stored? Objects Requires moving object Load balancing for downloads Unless some objects are “hot” Pointers to original objects Object can stay in original location Nodes with many objects can cause load imbalance Chord allows either option

Good properties Limited state Finger table size: m = O(log n) Bounded hops O(log n) for search, insert (w.h.p.) Bounded maintenance O(log 2 n) Robust

What if finger table is incomplete? K?

Issues Partitions Malicious nodes Network awareness