Data Management in the Cloud. Tim Kraska

Similar documents
The Potential of Cloud Computing: Challenges, Opportunities, Impact"!!!!

Sausalito: An Applica/on Server for RESTful Services in the Cloud. Ma;hias Brantner & Donald Kossmann 28msec Inc. h;p://sausalito.28msec.

The MapReduce Abstraction

CS November 2017

Bigtable: A Distributed Storage System for Structured Data By Fay Chang, et al. OSDI Presented by Xiang Gao

CS November 2018

Where We Are. Review: Parallel DBMS. Parallel DBMS. Introduction to Data Management CSE 344

Parallel Programming Principle and Practice. Lecture 10 Big Data Processing with MapReduce

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2013/14

Challenges for Data Driven Systems

MapReduce: Simplified Data Processing on Large Clusters

MapReduce Spark. Some slides are adapted from those of Jeff Dean and Matei Zaharia

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2015 Lecture 14 NoSQL

BigTable: A Distributed Storage System for Structured Data (2006) Slides adapted by Tyler Davis

Introduction to Map Reduce

Introduction to Data Management CSE 344

Distributed Systems [Fall 2012]

Principles of Data Management. Lecture #16 (MapReduce & DFS for Big Data)

DATABASE DESIGN II - 1DL400

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

CS 655 Advanced Topics in Distributed Systems

Distributed Computations MapReduce. adapted from Jeff Dean s slides

MapReduce & BigTable

Dynamo. Smruti R. Sarangi. Department of Computer Science Indian Institute of Technology New Delhi, India. Motivation System Architecture Evaluation

Dynamo: Amazon s Highly Available Key-Value Store

CSE 444: Database Internals. Lectures 26 NoSQL: Extensible Record Stores

CA485 Ray Walshe NoSQL

ΕΠΛ 602:Foundations of Internet Technologies. Cloud Computing

References. What is Bigtable? Bigtable Data Model. Outline. Key Features. CSE 444: Database Internals

Lessons Learned While Building Infrastructure Software at Google

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2012/13

Advanced Database Technologies NoSQL: Not only SQL

Distributed Computation Models

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 10 Parallel Programming Models: Map Reduce and Spark

Agenda. AWS Database Services Traditional vs AWS Data services model Amazon RDS Redshift DynamoDB ElastiCache

Introduction to Data Management CSE 344

Data Management in the Cloud: Limitations and Opportunities. Daniel Abadi Yale University January 30 th, 2009

Goal of the presentation is to give an introduction of NoSQL databases, why they are there.

CISC 7610 Lecture 2b The beginnings of NoSQL

Announcements. Parallel Data Processing in the 20 th Century. Parallel Join Illustration. Introduction to Database Systems CSE 414

How to survive the Data Deluge: Petabyte scale Cloud Computing

6.830 Lecture Spark 11/15/2017

Map Reduce Group Meeting

CPSC 426/526. Cloud Computing. Ennan Zhai. Computer Science Department Yale University

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2017)

Cassandra Design Patterns

Advances in Data Management - NoSQL, NewSQL and Big Data A.Poulovassilis

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2016)

Dynamo: Amazon s Highly Available Key-value Store. ID2210-VT13 Slides by Tallat M. Shafaat

Parallel Computing: MapReduce Jin, Hai

Large-Scale GPU programming

MapReduce: A Programming Model for Large-Scale Distributed Computation

Scaling Out Key-Value Storage

The MapReduce Framework

10. Replication. Motivation

CISC 7610 Lecture 5 Distributed multimedia databases. Topics: Scaling up vs out Replication Partitioning CAP Theorem NoSQL NewSQL

Topics. Big Data Analytics What is and Why Hadoop? Comparison to other technologies Hadoop architecture Hadoop ecosystem Hadoop usage examples

A BigData Tour HDFS, Ceph and MapReduce

FAQs Snapshots and locks Vector Clock

Big Data Processing Technologies. Chentao Wu Associate Professor Dept. of Computer Science and Engineering

Architekturen für die Cloud

Hadoop/MapReduce Computing Paradigm

BigTable: A Distributed Storage System for Structured Data

Horizontal or vertical scalability? Horizontal scaling is challenging. Today. Scaling Out Key-Value Storage

Next-Generation Cloud Platform

Introduction to Data Management CSE 344

Structured Big Data 1: Google Bigtable & HBase Shiow-yang Wu ( 吳秀陽 ) CSIE, NDHU, Taiwan, ROC

Programming model and implementation for processing and. Programs can be automatically parallelized and executed on a large cluster of machines

Distributed computing: index building and use

Sources. P. J. Sadalage, M Fowler, NoSQL Distilled, Addison Wesley

CAP Theorem, BASE & DynamoDB

Database System Architectures Parallel DBs, MapReduce, ColumnStores

Intuitive distributed algorithms. with F#

Introduction to NoSQL Databases

Recap. CSE 486/586 Distributed Systems Case Study: Amazon Dynamo. Amazon Dynamo. Amazon Dynamo. Necessary Pieces? Overview of Key Design Techniques

Microsoft Big Data and Hadoop

DIVING IN: INSIDE THE DATA CENTER

Bigtable. Presenter: Yijun Hou, Yixiao Peng

Introduction to MapReduce

PROFESSIONAL. NoSQL. Shashank Tiwari WILEY. John Wiley & Sons, Inc.

Distributed Systems 16. Distributed File Systems II

Bigtable: A Distributed Storage System for Structured Data by Google SUNNIE CHUNG CIS 612

CompSci 516 Database Systems

DrRobert N. M. Watson

Parallel Nested Loops

Parallel Partition-Based. Parallel Nested Loops. Median. More Join Thoughts. Parallel Office Tools 9/15/2011

Dynamo: Key-Value Cloud Storage

Building High Performance Apps using NoSQL. Swami Sivasubramanian General Manager, AWS NoSQL

Cloud Programming. Programming Environment Oct 29, 2015 Osamu Tatebe

Recap. CSE 486/586 Distributed Systems Case Study: Amazon Dynamo. Amazon Dynamo. Amazon Dynamo. Necessary Pieces? Overview of Key Design Techniques

Distributed File Systems II

Data Clustering on the Parallel Hadoop MapReduce Model. Dimitrios Verraros

Spotify. Scaling storage to million of users world wide. Jimmy Mårdell October 14, 2014

Achieving Horizontal Scalability. Alain Houf Sales Engineer

Cassandra, MongoDB, and HBase. Cassandra, MongoDB, and HBase. I have chosen these three due to their recent

/ Cloud Computing. Recitation 8 October 18, 2016

CSE-E5430 Scalable Cloud Computing Lecture 9

Apache Spark is a fast and general-purpose engine for large-scale data processing Spark aims at achieving the following goals in the Big data context

Clustering Lecture 8: MapReduce

COSC 416 NoSQL Databases. NoSQL Databases Overview. Dr. Ramon Lawrence University of British Columbia Okanagan

Transcription:

Data Management in the Cloud Tim Kraska Montag, 22. Februar 2010 Systems Group/ETH Zurich

MILK? [Anology from IM 2/09 / Daniel Abadi] 22.02.2010 Systems Group/ETH Zurich 2

Do you want milk? Buy a cow High upfront investment High maintenance cost Produces a fixed amount of milk Stepwise scaling 22.02.2010 Buy bottled milk Pay-per-use Lower maintenance cost Linear scaling Fault-tolerant Systems Group/ETH Zurich 3

Traditional Computing vs. Cloud Computing Your computer is a cow High upfront investment High maintenance cost Fixed amount of resources Stepwise scaling Cloud computing is bottled milk Pay-per-use Lower maintenance cost Linear scaling Fault-tolerant 4

Requirements for DM in the Cloud Scalability response time independent of number of clients 100 percent read + write availability no client is ever blocked under any circumstances Cost ($$$) pay as you go along, no investment upfront get cheaper every year, leverage new technology No administration outsource patches, backups, fault tolerance Consistency: Optimization goal, not constraint 5

Outline Motivation Camp 1: Relational DB s in the Cloud Amazon RDS MS Azure Camp 2: New Cloud DB/Storage System Amazon Dynamo Google s MegaStore, BigTable, GFS Building a DB applications without a DBMS Analytics in the Cloud: Hadoop What s next? 6

Why not use a standard relational DB? Advantages Traditional databases are available Proven to work well; many tools People trained and confident with them 7

Camp 1: Install standard DBMS in the Cloud Advantages Traditional databases are available Proven to work well; many tools People trained and confident with them Virtual Machine Database (e.g., Oracle, DB2, MS SQL Server, MySQL,.) 8

Camp 1: Install standard DBMS in the Cloud Advantages Traditional databases are available Proven to work well; many tools People trained and confident with them Disadvantages Build for scale-up, not scale-out Traditional DBMS solve the wrong problem anyway Focus on throughput and consistency SAP and Oracle misuse the DBMS already today Traditional DBMS make the wrong assumptions e.g., DBMS optimizers fail on virtualized hardware vs 9

CAP-Theorem Consistency vs Availability Tolerance against Network Partitioning 10

Amazon Relational Database Service (RDS) Client Virtual Machine AppServer Cloud Watch Elastic Load Balancing Auto Scaling Virtual Machine Virtual Machine Virtual Machine Cloud Front RDS DB1 DB2 DB3 LOGS/SNAPSHOTS EBS/S3 [aws.amazon.com/rds] 11

MS Azure - Architecture Client Tier SDS Service Tier REST SDS Runtime SOAP [ADO.Net client] Storage Tier Distributed SQL Data Cluster Data Node Data Node Data Node Data Node Data Node Data Node Mgmt. Services SQL Server Fabric Mgmt. Services SQL Server Fabric Mgmt. Services SQL Server Fabric Mgmt. Services SQL Server Fabric Mgmt. Services SQL Server Fabric Mgmt. Services Fabric Replication [www.microsoft.com/windowsazure/sqlazure] 12

Camp 2: Rethink the whole system architecture Rethink the whole system architecture Do NOT use a traditional DBMS Build a new systems tailored for cost efficiency, availability, and scalability and see consistency as an optimization goal Advantages and Disadvantages Requires new breed of (immature) systems + tools Solves the right problem and gets it right Optimized for cost, availability, scalability,... Leverages organization s investments in SOA 13

Key/Value-Store: Example Dynamo A C D G H M Data model: Key->Value Operations Put(Key, Value) Get(Key) NO-SQL!!!! V Z N P Q U Put( Tim, ETH Zurich ) [SOSP 07] 14

Key/Value-Store: Example Dynamo A C V Z D G Put( Tim, ETH Zurich ) Q U H M N P Data model: Key->Value Operations Put(Key, Value) Get(Key) Routing Consistent Hashing Partitioned Hash Table High Availability Replication Sloppy Quorum and hinted handover Gossiping (Membership) Consistency Vector Clocks Merkle Trees (Anti-Entropy) [SOSP 07] 15

Key/Value-Store: Example Dynamo A C V Z D G Put( Tim, ETH Zurich ) Q U H M N P Data model: Key->Value Operations Put(Key, Value) Get(Key) Routing Consistent Hashing Partitioned Hash Table High Availability Replication Sloppy Quorum and hinted handover Gossiping (Membership) Consistency Vector Clocks Merkle Trees (Anti-Entropy) [SOSP 07] 16

Key/Value-Store: Example Dynamo A C V Z D G Put( Tim, ETH Zurich ) Q U H M N P Data model: Key->Value Operations Put(Key, Value) Get(Key) Routing Consistent Hashing Partitioned Hash Table High Availability Replication Sloppy Quorum and hinted handover Gossiping (Membership) Consistency Vector Clocks Merkle Trees (Anti-Entropy) [SOSP 07] 17

Google s Approach MegaStore Transactions, Indexes, GQL Chubby (Locking Service) Scheduling BigTable Distributed Multi-Dimensional Map Google File System (GFS) Distributed Storage (made for append-only) 18

BigTable Distributed multi-level map (again no SQL) Fault-tolerant, persistent Scalable Thousands of servers Terabytes of in-memory data Petabyte of disk-based data Millions of reads/writes per second, efficient scans Self-managing Servers can be added/removed dynamically Servers adjust to load imbalance [SOSP 03] 19

BigTable Architecture Bigtable cell Bigtable master performs metadata ops, load balancing Bigtable client Bigtable client library Bigtable tablet server serves data Bigtable tablet server serves data Bigtable tablet server serves data Cluster Scheduling Master handles failover, monitoring GFS holds tablet data, logs Chubby (Locking Service) holds metadata, handles master-election [SOSP 03] 20

BigTable DataModel Distributed multi-dimensional sparse map (key, column, timestamp) cell contents contents COLUMNS Key www.cnn.com <html> t2 t3 t1 TIMESTAMPS [SOSP 03] 21

Google s Approach MegaStore Transactions, Indexes, GQL Chubby (Locking Service) Scheduling BigTable Distributed Multi-Dimensional Map Google File System (GFS) Distributed Storage (made for append-only) 22

Bulding DB applications without a DBMS [SIGMOD 08] Concept commercialized in Sausalito (28msec, Inc.) 23

Step 1: Clients commit update records to pending update queues Client 1 Client 1 Client 1 S3 Pending Update Queues (SQS) [SIGMOD 08] 24

Step 2: Checkpointing propagates updates from SQS to S3 Client 1 Client 1 Client 1 S3 Pending Update Queues (SQS) [SIGMOD 08] ok Locks (SQS) ok 25

Cloud Storage/DB Systems Commercial Azure SQL, Store Google MegaStore, BigTable Amazon S3, SimpleDB, RDS, CloudFront 28msec Sausalito OpenSource: HBase ( BigTable) CouchDB/Scalaris ( Dynamo) Cassandra ( Dynamo + BigTable Data-Model) Redis Cloudy (ETHZ) SCADS (Berkeley) 26

Outline Motivation Camp 1: Relational DB s in the Cloud Amazon RDS MS Azure Camp 2: New Cloud DB/Storage System Amazon Dynamo Google s MegaStore, BigTable, GFS Building a DB applications without a DBMS Analytics in the Cloud: Hadoop What s next? 27

Why MapReduce? Big Data 28

Potential Applications Web data analysis applications Example: Google 29

Google: The Data Challenge Jeffrey Dean, Google Fellow, PACT 06 keynote speech: 20+ billion web pages x 20KB = 400 TB One computer can read 30-35 MB/sec from disk ~ 4 months to read the web ~ 1,000 hard drives just to store the web Even more to do something with the data But: Same problem with 1,000 machines < 3 hours MapReduce CACM 08 article: 100,000 MapReduce jobs executed in Google every day Total data processed > 20 PB of data per day 30

Map/Reduce in a Nutshell Given: a very large dataset a well-defined computation task to be performed on elements of this dataset (preferably, in a parallel fashion on a large cluster) MapReduce programming model/abstraction/ framework: Just express what you want to compute (map() & reduce()) Don t worry about parallelization, fault tolerance, data distribution, load balancing (MapReduce takes care of these) What changes from one application to another is the actual computation; the programming structure stays similar [OSDI 04] 31

Map/Reduce in a Nutshell Here is the framework in simple terms: Read lots of data Map: extract something that you care about from each record (similar to map in functional programming) Shuffle and sort Reduce: aggregate, summarize, filter, or transform (similar to fold in functional programming) Write the results One can use as many Maps and Reduces as required to model a given problem [OSDI 04] 32

Map/Reduce Example: Count Word Occurrences in a Document map(k1, v1) list(k2, v2) map (String key, String value): // key: document name // value: document contents for each word w in value: EmitIntermediate(w, "1"); reduce(k2, list(v2)) list(v2) reduce (String key, Iterator values): // key: a word // values: a list of counts int result = 0; for each v in values: result += ParseInt(v); Emit(AsString(result)); 33

Google s MapReduce Model [OSDI 04] 34

Parallel Dataflow Systems and Languages Sawzall Pig LaBn, HiveQL DryadLINQ MapReduce Apache Hadoop Dryad High-level Dataflow Languages Parallel Dataflow Systems... A high-level language provides: more transparent program structure easier program development and maintenance automatic optimization opportunities 35

Outline Motivation Camp 1: Relational DB s in the Cloud Amazon RDS MS Azure Camp 2: New Cloud DB/Storage System Amazon Dynamo Google s MegaStore, BigTable, GFS Building a DB applications without a DBMS Analytics in the Cloud: Hadoop What s next? 36

What s next??? Consistency (CAP Theorem) How to balance consistency vs. cost vs. availability? Does consistency limit the scalability? How to scale transaction processing? Data model & languages Is Key/Value really what we need? Why do I need to implement a join by myself??? E.g. BOOM Other workload patterns Streaming Scientific Data Mining Cost optimizations New optimization goal: Cost (not performance) SLA imply implicit cost Benchmarks Security (don t get me started). 37

What s next??? Consistency (CAP Theorem) How to balance consistency vs. cost vs. availability? Does consistency limit the scalability? How to scale transaction processing? Data model & languages Is Key/Value really what we need? Why do I need to implement a join by myself??? E.g. BOOM Other workload patterns Streaming Scientific Data Mining Cost optimizations New optimization goal: Cost (not performance) SLA imply implicit cost Benchmarks Security (don t get me started). 38

Consistency Rationing ACID prevents scaling & availability (CAP theorem)! Strong consistency is expensive But not everything is worth gold! Idea: Handle data according to the cost of inconsistency Violating consistency is OK as long as it helps to reduce the overall cost [VLDB 09] 39

Consistency Rationing - Guarantees Amount of data Apply weak consistency protocols (e.g. session consistency) C B Switches between A and C guarantees Depends on some strategy Decision is local per server A Apply strong consistency protocols (e.g., serializability) Consistency requirements per category instead of transaction level Different categories can mix in a single transaction Cost of violating consistency [VLDB 09] 40

Streaming in the Cloud - Smoky E:S1 E:S7 S14 S20 S11 S13 S1 S3 E:S11 Q2 Q1 E:S12 Q3 E:S7(S11) E:S2 S4 S5 E:S8 Q4 S6 S10 Provide streaming as a service: No installation, maintenance etc. Use Cases Server/workflow monitoring message transformations combining RSS streams... Leverage established cloud techniques Idea: Storage ring: Key-> Data Stream ring: Event-type ->Query 41

Other (selected) ETH projects CloudBench A benchmark for the cloud Barrelfish new written-from-scratch OS kernel targeted for multi- and many-core processor systems Rhizoma constraint-based runtime system for distributed applications self-hosting Concierge blur the burden between mobile and cloud applications Xadoop XQuery on Hadoop 42

Summary Cloud has changed the view on data management Focus on scalability, availability and cost Instead of consistency and performance at any price E.g. No-SQL Movement As a result many Cloud Storage/DB Systems appeared on the marked place Although (or because) the cloud is economical driven, it provides many interesting research challenges tim.kraska@inf.ethz.ch 43