CA485 Ray Walshe NoSQL

Similar documents
CS November 2017

CS November 2018

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

BigTable. CSE-291 (Cloud Computing) Fall 2016

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

Distributed Systems [Fall 2012]

Extreme Computing. NoSQL.

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

BigTable: A Distributed Storage System for Structured Data

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

Distributed File Systems II

Bigtable: A Distributed Storage System for Structured Data. Andrew Hon, Phyllis Lau, Justin Ng

Bigtable. A Distributed Storage System for Structured Data. Presenter: Yunming Zhang Conglong Li. Saturday, September 21, 13

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

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

Bigtable. Presenter: Yijun Hou, Yixiao Peng

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

big picture parallel db (one data center) mix of OLTP and batch analysis lots of data, high r/w rates, 1000s of cheap boxes thus many failures

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

Big Table. Google s Storage Choice for Structured Data. Presented by Group E - Dawei Yang - Grace Ramamoorthy - Patrick O Sullivan - Rohan Singla

Distributed Database Case Study on Google s Big Tables

Exam 2 Review. October 29, Paul Krzyzanowski 1

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

Comparing SQL and NOSQL databases

CSE-E5430 Scalable Cloud Computing Lecture 9

NOSQL EGCO321 DATABASE SYSTEMS KANAT POOLSAWASD DEPARTMENT OF COMPUTER ENGINEERING MAHIDOL UNIVERSITY

7680: Distributed Systems

NoSQL Databases. Amir H. Payberah. Swedish Institute of Computer Science. April 10, 2014

CISC 7610 Lecture 2b The beginnings of NoSQL

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

Jargons, Concepts, Scope and Systems. Key Value Stores, Document Stores, Extensible Record Stores. Overview of different scalable relational systems

Modern Database Concepts

MapReduce & BigTable

Lessons Learned While Building Infrastructure Software at Google

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

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

CS5412: OTHER DATA CENTER SERVICES

Data Informatics. Seon Ho Kim, Ph.D.

Scaling Up HBase. Duen Horng (Polo) Chau Assistant Professor Associate Director, MS Analytics Georgia Tech. CSE6242 / CX4242: Data & Visual Analytics

CIB Session 12th NoSQL Databases Structures

CompSci 516 Database Systems

DIVING IN: INSIDE THE DATA CENTER

Database Evolution. DB NoSQL Linked Open Data. L. Vigliano

Distributed Systems 16. Distributed File Systems II

Introduction to NoSQL

Introduction to NoSQL Databases

COSC 6339 Big Data Analytics. NoSQL (II) HBase. Edgar Gabriel Fall HBase. Column-Oriented data store Distributed designed to serve large tables

Introduction to Computer Science. William Hsu Department of Computer Science and Engineering National Taiwan Ocean University

Bigtable: A Distributed Storage System for Structured Data

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 12 Google Bigtable

Big Data Analytics. Rasoul Karimi

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

Distributed Systems. Fall 2017 Exam 3 Review. Paul Krzyzanowski. Rutgers University. Fall 2017

Introduction Data Model API Building Blocks SSTable Implementation Tablet Location Tablet Assingment Tablet Serving Compactions Refinements

BigTable. Chubby. BigTable. Chubby. Why Chubby? How to do consensus as a service

CS /29/18. Paul Krzyzanowski 1. Question 1 (Bigtable) Distributed Systems 2018 Pre-exam 3 review Selected questions from past exams

BigTable A System for Distributed Structured Storage

Fattane Zarrinkalam کارگاه ساالنه آزمایشگاه فناوری وب

CS5412: DIVING IN: INSIDE THE DATA CENTER

Database Availability and Integrity in NoSQL. Fahri Firdausillah [M ]

Distributed Systems Pre-exam 3 review Selected questions from past exams. David Domingo Paul Krzyzanowski Rutgers University Fall 2018

Relational databases

Integrity in Distributed Databases

CS5412: DIVING IN: INSIDE THE DATA CENTER

Advanced Data Management Technologies Written Exam

CS 655 Advanced Topics in Distributed Systems

Database Architectures

Introduction Aggregate data model Distribution Models Consistency Map-Reduce Types of NoSQL Databases

NoSQL systems: sharding, replication and consistency. Riccardo Torlone Università Roma Tre

Distributed computing: index building and use

Chapter 24 NOSQL Databases and Big Data Storage Systems

A Study of NoSQL Database

Final Exam Review 2. Kathleen Durant CS 3200 Northeastern University Lecture 23

HBase: Overview. HBase is a distributed column-oriented data store built on top of HDFS

BigTable: A System for Distributed Structured Storage

CS435 Introduction to Big Data FALL 2018 Colorado State University. 11/7/2018 Week 12-B Sangmi Lee Pallickara. FAQs

Scalability of web applications

Megastore: Providing Scalable, Highly Available Storage for Interactive Services & Spanner: Google s Globally- Distributed Database.

10. Replication. Motivation

Bigtable: A Distributed Storage System for Structured Data

GridGain and Apache Ignite In-Memory Performance with Durability of Disk

Google File System and BigTable. and tiny bits of HDFS (Hadoop File System) and Chubby. Not in textbook; additional information

NoSQL systems. Lecture 21 (optional) Instructor: Sudeepa Roy. CompSci 516 Data Intensive Computing Systems

Distributed Data Store

CS-580K/480K Advanced Topics in Cloud Computing. NoSQL Database

CMU SCS CMU SCS Who: What: When: Where: Why: CMU SCS

CSE 530A. Non-Relational Databases. Washington University Fall 2013

Google big data techniques (2)

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

Outline. Spanner Mo/va/on. Tom Anderson

Distributed Data Management. Christoph Lofi Institut für Informationssysteme Technische Universität Braunschweig

L22: NoSQL. CS3200 Database design (sp18 s2) 4/5/2018 Several slides courtesy of Benny Kimelfeld

11 Storage at Google Google Google Google Google 7/2/2010. Distributed Data Management

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

Advanced Data Management Technologies

Achieving the Potential of a Fully Distributed Storage System

Distributed Systems. 15. Distributed File Systems. Paul Krzyzanowski. Rutgers University. Fall 2017

CLOUD-SCALE FILE SYSTEMS

Azure-persistence MARTIN MUDRA

CS /30/17. Paul Krzyzanowski 1. Google Chubby ( Apache Zookeeper) Distributed Systems. Chubby. Chubby Deployment.

Transcription:

NoSQL

BASE vs ACID Summary Traditional relational database management systems (RDBMS) do not scale because they adhere to ACID. A strong movement within cloud computing is to utilize non-traditional data stores (sometimes poorly dubbed NoSQL or NewSQL) for managing large amounts of data. This article contrasts the traditional ACID with the new-style BASE approach 2

Scaling "If your application relies upon persistence, then data storage will probably become your bottleneck." Many websites are I/O-bound. That is they are limited by how quickly they can access data from their data storage system (normally a SQL database). To scale or improve performance, you have two options: Vertical Scaling: Get a stronger, faster, better machine. Easiest, but also expensive Limited to the largest single system available Horizontal Scaling: Spread data across multiple machines. More flexible, but also more complex Functional Scaling: group data by function and spread functional groups across databases. Sharding: splitting data with functional areas across multiple databases

CAP A theorem which conjectures that web services cannot ensure all three of the following properties at once: Consistency: All operations appear to occur at once. Availability: Every operation must terminate in an intended response. Partition Tolerance: Operations will complete, even if individual components are unavailable.

ACID Traditional databases utilize transactions that adhere to the following guarantees: Atomicity: All operations in the transaction will complete or none will. Consistency: Database will be in a consistent state before and after a transaction. Isolation: Transaction will behave as if it is the only operation being performed. Durability: Upon completion of the transaction, the operation will not be reversed.

To ensure these properities when using partitioned databases, traditional RDBMS utilizet two-phase commit: 1. First the transaction coordinator asks each database involved to precommit and indicate if the commit is possible. 2. If all agree, then coordinator instructs each database to commit. This method ensures consistency over availability (if any databases are down, then we can't commit). Likewise, this locking and coordination serves as a bottleneck and prevents from scaling to large numbers of nodes.

BASE The current trend in cloud computing data storage is to loosen or relax the requirements of consistency in favor of more availablity. This is embodied in the BASE approach: Basically available: system guarantees the availability of your data; but the response can be "failure" if the data is in the middle of changing. Soft State: the state of the system is constantly changing. Eventually Consistent: the system will eventually become consistent once it stops receiving input.

BASE is optimistic and accepts that the database consistency will be in a state of flux. It achieves availibility by supporting partial failures without total system failure (i.e. partition tolerance). To implement BASE, many systems rely on some sort of message queue to persistently store and route data to various storage services the perform the actual database operations.

BigTable BigTable is a distributed storage system created by Google for managing structured data. It is structured as a large table that may be petabytes in size and distributed across tens of thousands of machines. HBase is an open source version of BigTable that works on top of Hadoop.

BigTable is a large, persistant, distributed, sparse, sorted, and multidimensional map. Map A map is an associative array or data structure that allows one to look up a value to a corresponding key quickly (e.g. hash table, binary search tree, etc.); in other words, it's a collection of key, value pairs. In BigTable, the key consists of the following: row key: string, column key: string, timestamp: int64 while the value is simply an array of bytes that is interpreted by the application (up to 64KB).

Sorted Normally, associative arrays are not sorted (keys are hashed to a position in the map). In BigTable, however, data is sorted by row to keep related data close together. This means that we must be careful in choosing row names such that related data is sorted near each other. For example, to store data about websites, Google's WebTable reverses the domain names of web pages: ie.dcu.computing ie.dcu.eeng ie.dcu.meng This keeps DCU website rows close together

Data Locality Sorting the rows is mechanism for improving data locality. With pure hashing it is possible for related data to be spread across multiple machines. Sorting and then partitioning the data allows all the data for one key subset to reside on one machine. A similar technique is used to shuffle data to reducers in MapReduce.

Multidimensional Each table is indexed by rows. Each row contains one or more named column families which are defined when the table is first created. Within a column family, there can be one or more named columns which can be created on the fly. With rows, column families, and columns, we have three-level naming hierarchy to identify data. For example: ie.dcu.computing: # Row - users: # Column Family - ray: Ray Walshe # Column - cdaly: Charlie # Column - system: # Column Family - : Linux 3.2 # Column (Null name)

To get data, we first access the row via the row name and then specify column key which is in the form column-family:column. In the example above, we first get the row ie.dcu.computing and then get a particular user with users:ray. To get multiple users, we can use a regular expression (or glob) to fetch multiple values: users:*. In addition to row and column, the data is also versioned by timestamps (either real time or application defined time) and sorted such that the most recent cell is first. To help manage these multiple versions, BigTable provides a mechanism to remove entries either by date (keep versions since some time t) or by amount (keep only the latest n versions). These garbage collection settings can be specified per column-family.

In addition to row and column, the data is also versioned by timestamps (either real time or application defined time) and sorted such that the most recent cell is first. To help manage these multiple versions, BigTable provides a mechanism to remove entries either by date (keep versions since some time t) or by amount (keep only the latest n versions). These garbage collection settings can be specified per column-family.

Sparse While the number of column-families is fixed at creation, the number of columns can grow arbitrarily. This means that within a particular row, it is possible for many columns to be empty. ie.dcu.computing: - language: - : EN - contents: - : <html>... - anchor: - dcu.ie: Dublin City University - microsoft.com: Microsoft Ie.dcu.computing.ftp: - language: - : EN - contents: - : <html>... - anchor: - dcu.ie: Dublin City University - kernel.org: Linux - computing.dcu.ie: Vinson - reddit.com: Reddit - freenode.net: Freenode

Distributed BigTable's data is spread across many independent machines. Tables are broken up into collections of rows called tablets such that each tablet has a set of consecutive rows. This allows for distribution of a Table onto multiple machines and for load balancing (split large Tablets into smaller ones). Persistant BigTable uses GFS to store data and log files persistantly. Large Can handle upwards of a Petabyte of data. Hooks into MapReduce (can be used as either input or output) and is utilized by a variety of applications.

Implementation Architecturally, BigTable resembles GFS: a master that coordinates activity and a large number of tablet servers that store and manage the data. These tablet servers can be added or removed dynamically. Master Master assigns tablets to tablet servers and balances tablet server load. It also manages garbage collection of files in GFS and handles scheme changes. Tablet Server A tablet server manages a set of tablets (10-1,000 per server) and handles read/write requests to the tablets. Internally, this data is stored in Google' SSTable format, which is a persistent, ordered, immutable key, value map file.

Chubby To coordinate the various servers, Chubby, a highly available and persistent distributed lock service is used to manage leases for resources and configuration storage by providing a namespace of files and directories that the user can lock atomically. It is used to: Ensure there is only one active master. Discover tablet servers. Store BigTable schema information. Store access control lists. Example of how it is used: When a tablet server starts, it creates and acquires an exclusive lock on a uniquely-named file in the servers directory. The master can monitor this directory for new servers.

Replication A BigTable can be configured for replication to multiple BigTable clusters in different data centers to ensure availability. Data is propagated asynchronously, which results in an eventually consistent model.

Applications BigTable, like GFS and MapReduce, is utilized internally by Google for many of their operations. Google Analytics This is a service that helps webmasters analyze traffic patterns at their website. BigTable is used to maintain raw click information (200 TB). Google Earth BigTable is used to store the raw image data. Personalized Search User data for personalized search is stored in BigTable.

How is it NoSQL? A BigTable cluster may contain several large tables, but it does not support operations across multiple tables (non-relational, no joining). No SQL! Perform key lookups to access data. Columns have no type (just a bunch of bytes) and may be quite large. Columns can be added dynamically. Columns within a row may be quite sparse; that is we may have a large number of columns, but each row may only have a tiny fraction of them populated. Availability is increased by asynchronously propogating data to multiple clusters in different data centers.