SlideShare a Scribd company logo
and the
Big Data Landscape
Chen Li
Information Systems Group
CS Department
UC Irvine
0
Big Data / Web Warehousing
1#AsterixDB
So what went
on – and why?
What’s going
on right now?
What’s going on
Notes:
• Storage manager
per node
• Upper layers
orchestrate them
• One way in/out:
via the SQL door
Big Data in the Database World
• Enterprises needed to store and query historical
business data (data warehouses)
– 1980’s: Parallel database systems based on “shared-
nothing” architectures (Gamma/GRACE, Teradata)
– 2000’s: Netezza, Aster Data, DATAllegro, Greenplum,
Vertica, ParAccel (“Big $”acquisitions!)
• OLTP is another category (a source of Big Data)
– 1980’s: Tandem’s NonStop SQL system
2
Big Data in the Systems World
• Late 1990’s brought a need to index and query
the rapidly exploding content of the Web
– DB technology tried but failed (e.g., Inktomi)
– Google, Yahoo! et al needed to do something
• Google responded by laying a new foundation
– Google File System (GFS)
• OS-level byte stream files spanning 1000’s of machines
• Three-way replication for fault-tolerance (availability)
– MapReduce (MR) programming model
• User functions: Map and Reduce (and optionally Combine)
• “Parallel programming for dummies” – MR runtime does the
heavy lifting via partitioned parallelism
3
Input Splits
(distributed)
Mapper
Outputs
Reducer
Inputs
Reducer
Outputs
(distributed)
SHUFFLE PHASE
(based on keys)
(MapReduce: Word Count Example)
4
Partitioned
Parallelism!
. . .
. . .
Soon a Star Was Born…
• Yahoo!, Facebook, and friends read the papers
– HDFS and Hadoop MapReduce now in wide use for indexing,
clickstream analysis, log analysis, …
• Higher-level languages subsequently developed
– Pig (Yahoo!), Hive (Facebook), Jaql (IBM)
• Key-value (“NoSQL”) stores are another category
– Used to power scalable social sites, online games, …
– BigTableHBase, DynamoCassandra, MongoDB, …
5
Notes:
•Giant byte sequence
files at the bottom
•Map, sort, shuffle,
reduce layer in middle
•Possible storage layer
in middle as well
•Now at the top: HLL’s
Apache Pig (PigLatin)
• Scripting language inspired by the relational algebra
– Compiles down to a series of Hadoop MR jobs
– Relational operators include LOAD, FOREACH, FILTER,
GROUP, COGROUP, JOIN, ORDER BY, LIMIT, ...
6
Apache Hive (HiveQL)
7
• Query language inspired by an old favorite: SQL
– Compiles down to a series of Hadoop MR jobs
– Supports various HDFS file formats (text, columnar, ...)
– Numerous contenders appearing that take a non-MR-
based runtime approach (duh!) – these include Impala,
Stinger, Spark SQL, ...
Other Up-and-Coming Platforms (I)
8
Distributed
memory
Input
query 1
query 2
query 3
. . .
one-time processing
• Spark for in-memory cluster computing – for doing repetitive
data analyses, iterative machine learning tasks, ...
iter. 1 iter. 2 . . .
Input
iterative processing
(Especially gaining traction
for scaling Machine Learning)
Other Up-and-Coming Platforms (II)
• Bulk Synchronous Programming (BSP) platforms, e.g., Pregel,
Giraph, GraphLab, ..., for Big Graph analytics
9
(“Big” is the platform’s concern)
“Think Like a Vertex”
– Receive messages
– Update state
– Send messages
• Quite a few BSP-based platforms available
– Pregel (Google)
– Giraph (Facebook, LinkedIn, Twitter, Yahoo!, ...)
– Hama (Sogou, Korea Telecomm, ...)
– Distributed GraphLab (CMU, Washington)
– GraphX (Berkeley)
– Pregelix (UCI)
– ...
No Shortage of “NoSQL”
Big Data Analysis Platforms...
10
Query/Scripting
Language
High-Level API
Compiler/Optimizer
Low-Level API
Execution Engine
Resource
Management
Data Store
SQL
SQL
Dataflow
Processor
Relational
Row/
Column
Storage
SCOPE
SCOPE
Dryad
DryadLINQ
TidyFS
Quincy
AQL
Algebricks
Hyracks
Hyracks
LSM
Storage
PigLatin Jaql
Cascading
Pig Jaql
Tez
MapReduce
HBase
HDFS
Hadoop
MapReduce
Google
MapReduce
Spark
RDDs
Spark
Mesos
Meteor
Sopremo
Java/Scala
Nephele
YARN
Sawzall Dremel
FlumeJava
Dremel
Dremel
Bigtable
GFS
Omega
Cosmos
PACT
Cascading FlumeJava
11
(Pig)
Also: Today’s Big Data Tangle
AsterixDB: “One Size Fits a Bunch”
12
Semistructured
Data Management
Parallel
Database Systems
World of
Hadoop & Friends
BDMS Desiderata:
• Flexible data model
• Efficient runtime
• Full query capability
• Cost proportional to
task at hand (!)
• Designed for
continuous data
ingestion
• Support today’s “Big
Data data types”
•
•
•
create dataverse TinySocial;
use dataverse TinySocial;
create type MugshotUserType as {
id: int32,
alias: string,
name: string,
user-since: datetime,
address: {
street: string,
city: string,
state: string,
zip: string,
country: string
},
friend-ids: {{ int32 }},
employment: [EmploymentType]
}
ASTERIX Data Model (ADM)
13
create dataset MugshotUsers(MugshotUserType)
primary key id;
Highlights include:
• JSON++ based data model
• Rich type support (spatial, temporal, …)
• Records, lists, bags
• Open vs. closed types
create type EmploymentType as open {
organization-name: string,
start-date: date,
end-date: date?
}
create dataverse TinySocial;
use dataverse TinySocial;
create type MugshotUserType as {
id: int32,
alias: string,
name: string,
user-since: datetime,
address: {
street: string,
city: string,
state: string,
zip: string,
country: string
},
friend-ids: {{ int32 }},
employment: [EmploymentType]
}
create dataverse TinySocial;
use dataverse TinySocial;
create type MugshotUserType as {
id: int32
}
ASTERIX Data Model (ADM)
14
create dataset MugshotUsers(MugshotUserType)
primary key id;
Highlights include:
• JSON++ based data model
• Rich type support (spatial, temporal, …)
• Records, lists, bags
• Open vs. closed types
create type EmploymentType as open {
organization-name: string,
start-date: date,
end-date: date?
}
create dataverse TinySocial;
use dataverse TinySocial;
create type MugshotUserType as {
id: int32,
alias: string,
name: string,
user-since: datetime,
address: {
street: string,
city: string,
state: string,
zip: string,
country: string
},
friend-ids: {{ int32 }},
employment: [EmploymentType]
}
create dataverse TinySocial;
use dataverse TinySocial;
create type MugshotUserType as {
id: int32
}
create type MugshotMessageType
as closed {
message-id: int32,
author-id: int32,
timestamp: datetime,
in-response-to: int32?,
sender-location: point?,
tags: {{ string }},
message: string
}
ASTERIX Data Model (ADM)
15
create dataset MugshotUsers(MugshotUserType)
primary key id;
create dataset
MugshotMessages(MugshotMessageType)
primary key message-id;
Highlights include:
• JSON++ based data model
• Rich type support (spatial, temporal, …)
• Records, lists, bags
• Open vs. closed types
create type EmploymentType as open {
organization-name: string,
start-date: date,
end-date: date?
}
16
{ "id":1, "alias":"Margarita", "name":"MargaritaStoddard", "address”:{
"street":"234 Thomas Ave", "city":"San Hugo", "zip":"98765",
"state":"CA", "country":"USA" }
"user-since":datetime("2012-08-20T10:10:00"),
"friend-ids":{{ 2, 3, 6, 10 }}, "employment":[{
"organization-name":"Codetechno”, "start-date":date("2006-08-06") }] }
{ "id":2, "alias":"Isbel", "name":"IsbelDull", "address":{
"street":"345 James Ave", "city":"San Hugo", "zip":"98765”,
"state":"CA", "country":"USA" },
"user-since":datetime("2011-01-22T10:10:00"),
"friend-ids":{{ 1, 4 }}, "employment":[{
"organization-name":"Hexviafind”, "start-date":date("2010-04-27") }] }
{ "id":3, "alias":"Emory", "name":"EmoryUnk", "address":{
"street":"456 Jose Ave", "city":"San Hugo", "zip":"98765",
"state":"CA", "country":"USA" },
"user-since”: datetime("2012-07-10T10:10:00"),
"friend-ids":{{ 1, 5, 8, 9 }}, "employment”:[{
"organization-name":"geomedia”,
"start-date":date("2010-06-17"), "end-date":date("2010-01-26") }] }
...
Ex: MugshotUsers Data
create index msUserSinceIdx on MugshotUsers(user-since);
create index msTimestampIdx on MugshotMessages(timestamp);
create index msAuthorIdx on MugshotMessages(author-id) type btree;
create index msSenderLocIndex on MugshotMessages(sender-location) type rtree;
create index msMessageIdx on MugshotMessages(message) type keyword;
create type AccessLogType as closed
{ ip: string, time: string, user: string, verb: string, path: string, stat: int32, size: int32 };
create external dataset AccessLog(AccessLogType) using localfs
(("path"="{hostname}://{path}"), ("format"="delimited-text"), ("delimiter"="|"));
create feed socket_feed using socket_adaptor
(("sockets"="{address}:{port}"), ("addressType"="IP"),
("type-name"="MugshotMessageType"), ("format"="adm"));
connect feed socket_feed to dataset MugshotMessages;
Other DDL Features
17
External data highlights:
• Common HDFS file
formats + indexing
• Feed adaptors for
sources like Twitter
18
• Ex: List the user name and messages sent by those users who
joined the Mugshot social network in a certain time window:
from $user in dataset MugshotUsers
where $user.user-since >= datetime('2010-07-22T00:00:00')
and $user.user-since <= datetime('2012-07-29T23:59:59')
select {
"uname" : $user.name,
"messages" :
from $message in dataset MugshotMessages
where $message.author-id = $user.id
select $message.message
};
18
ASTERIX Query Language (AQL)
AQL (cont.)
19
• Ex: Identify active users and group/count them by country:
with $end := current-datetime( )
with $start := $end - duration("P30D")
from $user in dataset MugshotUsers
where some $logrecord in dataset AccessLog
satisfies $user.alias = $logrecord.user
and datetime($logrecord.time) >= $start
and datetime($logrecord.time) <= $end
group by $country := $user.address.country with $user
select {
"country" : $country,
"active users" : count($user)
}
AQL highlights:
• Lots of other features (see website!)
• Spatial predicates and aggregation
• Set-similarity (fuzzy) matching
• And plans for more…
Fuzzy Queries in AQL
20
• Ex: Find Tweets with similar content:
for $tweet1 in dataset('TweetMessages')
for $tweet2 in dataset('TweetMessages')
where $tweet1.tweetid != $tweet2.tweetid
and $tweet1.message-text ~= $tweet2.message-text
return {
"tweet1-text": $tweet1.message-text,
"tweet2-text": $tweet2.message-text
}
• Or: Find Tweets about similar topics:
for $tweet1 in dataset('TweetMessages')
for $tweet2 in dataset('TweetMessages')
where $tweet1.tweetid != $tweet2.tweetid
and $tweet1.referred-topics ~= $tweet2.referred-topics
return {
"tweet1-text": $tweet1.message-text,
"tweet2-text": $tweet2.message-text
}
Updates (and Transactions)
21
• Key-value store-
like transaction
semantics
• Insert/delete ops
with indexing
• Concurrency
control (locking)
• Crash recovery
• Backup/restore
• Ex: Add a new user to Mugshot.com:
insert into dataset MugshotUsers
( {
"id":11, "alias":"John", "name":"JohnDoe",
"address":{
"street":"789 Jane St", "city":"San Harry",
"zip":"98767", "state":"CA", "country":"USA"
},
"user-since":datetime("2010-08-15T08:10:00"),
"friend-ids":{ { 5, 9, 11 } },
"employment":[{
"organization-name":"Kongreen",
"start-date":date("20012-06-05")
}] } );
AsterixDB System Overview
2222
ASTERIX Software Stack
23
Hivesterix
Apache
VXQuery
Algebricks Algebra Layer
M/R
Layer
Pregelix
Hyracks Data-Parallel Platform
Hyracks
Job
Hadoop
M/R JobPregel Job
AQL HiveQL XQuery
AsterixDB
Native Storage Management
Transaction
Manager
Transaction Sub-System
Recovery
Manager
Lock
Manager
Log
Manager
IO
Scheduler
Disk 1 Disk n
Memory
Buffer
Cache
In-Memory
Components
Working
Memory
Datasets
Manager
( )
+
24
LSM-Based Storage + Indexing
Memory
Disk
Sequential writes to disk
Periodically merge disk trees
25
LSM-Based Filters
Memory
Disk
T1, T2, T3,
T4, T5, T6
T7, T8, T9,
T10, T11
T12, T13,
T14, T15
T16, T17
Oldest Component
[ T12, T15 ] [ T7, T11 ] [ T1, T6 ]
Intuition: Do NOT touch unneeded records
Idea: Utilize LSM partitioning to prune disk components
Q: Get all tweets > T14
26
• Recent/projected use case areas include
– Behavioral science (at UCI)
– Social data analytics
– Cell phone event analytics
– Education (MOOC analytics)
– Power usage monitoring
– Public health (joint effort with UCLA)
– Cluster management log analytics
27
Some Example Use Cases
Behavioral Science (HCI)
• First study to use logging and biosensors to measure
stress and ICT use of college students in their real
world environment (Gloria Mark, UCI Informatics)
– Focus: Multitasking and stress among “Millennials”
• Multiple data channels
– Computer logging
– Heart rate monitors
– Daily surveys
– General survey
– Exit interview
28
Learnings for AsterixDB:
• Nature of their analyses
• Extended binning support
• Data format(s) in and out
• Bugs and pain points
Social Data Analysis
(Based on 2 pilots)
#AsterixDB 29
Learnings for AsterixDB:
• Nature of their analyses
• Real vs. synthetic data
• Parallelism (grouping)
• Avoiding materialization
• Bugs and pain points
The underlying AQL query is:
use dataverse twitter;
for $t in dataset TweetMessagesShifted
let $region := create-rectangle(create-point(…, …),
create-point(…, …))
let $keyword := "mind-blowing"
where spatial-intersect($t.sender-location, $region)
and $t.send-time > datetime("2012-01-02T00:00:00Z”)
and $t.send-time < datetime("2012-12-31T23:59:59Z”)
and contains($t.message-text, $keyword)
group by $c := spatial-cell($t.sender-location,
create-point(…), 3.0, 3.0) with $t
return { "cell” : $c, "count”: count($t) }
Current Status
• 4 year initial NSF project (250+ KLOC @ UCI/UCR)
• AsterixDB BDMS is here! (Shared on June 6th, 2013)
– Semistructured “NoSQL” style data model
– Declarative (parallel) queries, inserts, deletes, …
– LSM-based storage/indexes (primary & secondary)
– Internal and external datasets both supported
– Rich set of data types (including text, time, location)
– Fuzzy and spatial query processing
– NoSQL-like transactions (for inserts/deletes)
– Data feeds and external indexes in next release
• Performance competitive (at least!) with a popular
parallel RDBMS, MongoDB, and Hive (see papers)
• Now in Apache incubation mode!
30
For More Info
AsterixDB project page: http://asterixdb.ics.uci.edu
Open source code base:
• ASTERIX: http://code.google.com/p/asterixdb/
• Hyracks: http://code.google.com/p/hyracks
• (Pregelix: http://hyracks.org/projects/pregelix/)
31

More Related Content

KEY
MongoDB at GUL
PDF
HBase Lightning Talk
PPT
2011 Mongo FR - MongoDB introduction
PDF
Getting Started with MongoDB (TCF ITPC 2014)
PDF
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
PDF
NoSQL - An introduction to CouchDB
PPTX
Agg framework selectgroup feb2015 v2
PPTX
Querying mongo db
MongoDB at GUL
HBase Lightning Talk
2011 Mongo FR - MongoDB introduction
Getting Started with MongoDB (TCF ITPC 2014)
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
NoSQL - An introduction to CouchDB
Agg framework selectgroup feb2015 v2
Querying mongo db

What's hot (18)

PPTX
Webinar: Exploring the Aggregation Framework
PPTX
ETL for Pros: Getting Data Into MongoDB
PPTX
Graph Databases & OrientDB
PPT
Tutorial
PDF
Introduction to mongoDB
PDF
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
PDF
CouchDB Open Source Bridge
PPTX
The Aggregation Framework
PDF
Schema Design
PDF
Mongo db
PPTX
การจัดการฐานข้อมูล
PPTX
Graph databases
PDF
OrientDB & Node.js Overview - JS.Everywhere() KW
PDF
OrientDB: Unlock the Value of Document Data Relationships
PDF
Drupalcamp Sth 2009 Nrcboeken
PPTX
Introduction to MongoDB at IGDTUW
ODP
Graph databases
Webinar: Exploring the Aggregation Framework
ETL for Pros: Getting Data Into MongoDB
Graph Databases & OrientDB
Tutorial
Introduction to mongoDB
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
CouchDB Open Source Bridge
The Aggregation Framework
Schema Design
Mongo db
การจัดการฐานข้อมูล
Graph databases
OrientDB & Node.js Overview - JS.Everywhere() KW
OrientDB: Unlock the Value of Document Data Relationships
Drupalcamp Sth 2009 Nrcboeken
Introduction to MongoDB at IGDTUW
Graph databases
Ad

Viewers also liked (20)

PDF
Movies&amp;demographics
PPTX
Cb15 presentation-yingyi
PDF
Wang ke classification by cut clearance under threshold
PPTX
Wang ke mining revenue-maximizing bundling configuration
PDF
Comparing pregel related systems
PPTX
Ke yi small summaries for big data
PPTX
Graph processing
PPTX
2015 07-tuto2-clus type
PDF
Gao cong geospatial social media data management and context-aware recommenda...
PPTX
Weiyi meng web data truthfulness analysis
PPTX
2015 07-tuto1-phrase mining
ODP
Processing Large Graphs in Hadoop
PDF
Calton pu experimental methods on performance in cloud and accuracy in big da...
PDF
Ling liu part 02:big graph processing
PDF
Trade-offs in Processing Large Graphs: Representations, Storage, Systems and ...
PDF
Batch Graph Processing Frameworks
PDF
Christian jensen advanced routing in spatial networks using big data
PPTX
2015 07-tuto0-courseoutline
PPTX
Jeffrey xu yu large graph processing
PDF
Machine Status Prediction for Dynamic and Heterogenous Cloud Environment
Movies&amp;demographics
Cb15 presentation-yingyi
Wang ke classification by cut clearance under threshold
Wang ke mining revenue-maximizing bundling configuration
Comparing pregel related systems
Ke yi small summaries for big data
Graph processing
2015 07-tuto2-clus type
Gao cong geospatial social media data management and context-aware recommenda...
Weiyi meng web data truthfulness analysis
2015 07-tuto1-phrase mining
Processing Large Graphs in Hadoop
Calton pu experimental methods on performance in cloud and accuracy in big da...
Ling liu part 02:big graph processing
Trade-offs in Processing Large Graphs: Representations, Storage, Systems and ...
Batch Graph Processing Frameworks
Christian jensen advanced routing in spatial networks using big data
2015 07-tuto0-courseoutline
Jeffrey xu yu large graph processing
Machine Status Prediction for Dynamic and Heterogenous Cloud Environment
Ad

Similar to Chen li asterix db: 大数据处理开源平台 (20)

PDF
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
PPTX
Coding serbia
PPT
Introduction to MongoDB
PPTX
Introducing Azure DocumentDB - NoSQL, No Problem
PDF
Apache Drill: An Active, Ad-hoc Query System for large-scale Data Sets
PDF
Leveraging Big Data and Real-Time Analytics at Cxense
PDF
Halko_santafe_2015
PDF
Retaining globally distributed high availability
KEY
MongoDB In Production At Sailthru
PDF
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
PPTX
Big data week presentation
KEY
Mongo at Sailthru (MongoNYC 2011)
PPTX
IOOF IT System Modernisation
PDF
Scalding big ADta
PPTX
Session 03 acquiring data
PPTX
Session 03 acquiring data
PDF
NoSQL (Not Only SQL)
PDF
How Apache Spark fits in the Big Data landscape
PPTX
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Coding serbia
Introduction to MongoDB
Introducing Azure DocumentDB - NoSQL, No Problem
Apache Drill: An Active, Ad-hoc Query System for large-scale Data Sets
Leveraging Big Data and Real-Time Analytics at Cxense
Halko_santafe_2015
Retaining globally distributed high availability
MongoDB In Production At Sailthru
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
Big data week presentation
Mongo at Sailthru (MongoNYC 2011)
IOOF IT System Modernisation
Scalding big ADta
Session 03 acquiring data
Session 03 acquiring data
NoSQL (Not Only SQL)
How Apache Spark fits in the Big Data landscape
Berlin Buzz Words - Apache Drill by Ted Dunning & Michael Hausenblas

More from jins0618 (12)

PDF
Latent Interest and Topic Mining on User-item Bipartite Networks
PDF
Web Service QoS Prediction Approach in Mobile Internet Environments
PDF
吕潇 星环科技大数据技术探索与应用实践
PPT
李战怀 大数据环境下数据存储与管理的研究
PDF
Ling liu part 01:big graph processing
PPTX
2015 07-tuto3-mining hin
PPTX
2015 07-tuto0-courseoutline
PPTX
Chengqi zhang graph processing and mining in the era of big data
PDF
LITM
PDF
Some links of recommender system
PDF
Clustering:k-means, expect-maximization and gaussian mixture model
PDF
Transfer Learning: An overview
Latent Interest and Topic Mining on User-item Bipartite Networks
Web Service QoS Prediction Approach in Mobile Internet Environments
吕潇 星环科技大数据技术探索与应用实践
李战怀 大数据环境下数据存储与管理的研究
Ling liu part 01:big graph processing
2015 07-tuto3-mining hin
2015 07-tuto0-courseoutline
Chengqi zhang graph processing and mining in the era of big data
LITM
Some links of recommender system
Clustering:k-means, expect-maximization and gaussian mixture model
Transfer Learning: An overview

Recently uploaded (20)

PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
Introduction to Knowledge Engineering Part 1
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Lecture1 pattern recognition............
PPTX
IB Computer Science - Internal Assessment.pptx
PDF
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
PDF
Mega Projects Data Mega Projects Data
PDF
Foundation of Data Science unit number two notes
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPT
Reliability_Chapter_ presentation 1221.5784
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PPTX
Moving the Public Sector (Government) to a Digital Adoption
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Introduction to Knowledge Engineering Part 1
Miokarditis (Inflamasi pada Otot Jantung)
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
Introduction-to-Cloud-ComputingFinal.pptx
Lecture1 pattern recognition............
IB Computer Science - Internal Assessment.pptx
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
Mega Projects Data Mega Projects Data
Foundation of Data Science unit number two notes
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Reliability_Chapter_ presentation 1221.5784
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Fluorescence-microscope_Botany_detailed content
Business Ppt On Nestle.pptx huunnnhhgfvu
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
Moving the Public Sector (Government) to a Digital Adoption
STUDY DESIGN details- Lt Col Maksud (21).pptx
Data_Analytics_and_PowerBI_Presentation.pptx

Chen li asterix db: 大数据处理开源平台

  • 1. and the Big Data Landscape Chen Li Information Systems Group CS Department UC Irvine 0
  • 2. Big Data / Web Warehousing 1#AsterixDB So what went on – and why? What’s going on right now? What’s going on
  • 3. Notes: • Storage manager per node • Upper layers orchestrate them • One way in/out: via the SQL door Big Data in the Database World • Enterprises needed to store and query historical business data (data warehouses) – 1980’s: Parallel database systems based on “shared- nothing” architectures (Gamma/GRACE, Teradata) – 2000’s: Netezza, Aster Data, DATAllegro, Greenplum, Vertica, ParAccel (“Big $”acquisitions!) • OLTP is another category (a source of Big Data) – 1980’s: Tandem’s NonStop SQL system 2
  • 4. Big Data in the Systems World • Late 1990’s brought a need to index and query the rapidly exploding content of the Web – DB technology tried but failed (e.g., Inktomi) – Google, Yahoo! et al needed to do something • Google responded by laying a new foundation – Google File System (GFS) • OS-level byte stream files spanning 1000’s of machines • Three-way replication for fault-tolerance (availability) – MapReduce (MR) programming model • User functions: Map and Reduce (and optionally Combine) • “Parallel programming for dummies” – MR runtime does the heavy lifting via partitioned parallelism 3
  • 5. Input Splits (distributed) Mapper Outputs Reducer Inputs Reducer Outputs (distributed) SHUFFLE PHASE (based on keys) (MapReduce: Word Count Example) 4 Partitioned Parallelism! . . . . . .
  • 6. Soon a Star Was Born… • Yahoo!, Facebook, and friends read the papers – HDFS and Hadoop MapReduce now in wide use for indexing, clickstream analysis, log analysis, … • Higher-level languages subsequently developed – Pig (Yahoo!), Hive (Facebook), Jaql (IBM) • Key-value (“NoSQL”) stores are another category – Used to power scalable social sites, online games, … – BigTableHBase, DynamoCassandra, MongoDB, … 5 Notes: •Giant byte sequence files at the bottom •Map, sort, shuffle, reduce layer in middle •Possible storage layer in middle as well •Now at the top: HLL’s
  • 7. Apache Pig (PigLatin) • Scripting language inspired by the relational algebra – Compiles down to a series of Hadoop MR jobs – Relational operators include LOAD, FOREACH, FILTER, GROUP, COGROUP, JOIN, ORDER BY, LIMIT, ... 6
  • 8. Apache Hive (HiveQL) 7 • Query language inspired by an old favorite: SQL – Compiles down to a series of Hadoop MR jobs – Supports various HDFS file formats (text, columnar, ...) – Numerous contenders appearing that take a non-MR- based runtime approach (duh!) – these include Impala, Stinger, Spark SQL, ...
  • 9. Other Up-and-Coming Platforms (I) 8 Distributed memory Input query 1 query 2 query 3 . . . one-time processing • Spark for in-memory cluster computing – for doing repetitive data analyses, iterative machine learning tasks, ... iter. 1 iter. 2 . . . Input iterative processing (Especially gaining traction for scaling Machine Learning)
  • 10. Other Up-and-Coming Platforms (II) • Bulk Synchronous Programming (BSP) platforms, e.g., Pregel, Giraph, GraphLab, ..., for Big Graph analytics 9 (“Big” is the platform’s concern) “Think Like a Vertex” – Receive messages – Update state – Send messages • Quite a few BSP-based platforms available – Pregel (Google) – Giraph (Facebook, LinkedIn, Twitter, Yahoo!, ...) – Hama (Sogou, Korea Telecomm, ...) – Distributed GraphLab (CMU, Washington) – GraphX (Berkeley) – Pregelix (UCI) – ...
  • 11. No Shortage of “NoSQL” Big Data Analysis Platforms... 10 Query/Scripting Language High-Level API Compiler/Optimizer Low-Level API Execution Engine Resource Management Data Store SQL SQL Dataflow Processor Relational Row/ Column Storage SCOPE SCOPE Dryad DryadLINQ TidyFS Quincy AQL Algebricks Hyracks Hyracks LSM Storage PigLatin Jaql Cascading Pig Jaql Tez MapReduce HBase HDFS Hadoop MapReduce Google MapReduce Spark RDDs Spark Mesos Meteor Sopremo Java/Scala Nephele YARN Sawzall Dremel FlumeJava Dremel Dremel Bigtable GFS Omega Cosmos PACT Cascading FlumeJava
  • 13. AsterixDB: “One Size Fits a Bunch” 12 Semistructured Data Management Parallel Database Systems World of Hadoop & Friends BDMS Desiderata: • Flexible data model • Efficient runtime • Full query capability • Cost proportional to task at hand (!) • Designed for continuous data ingestion • Support today’s “Big Data data types” • • •
  • 14. create dataverse TinySocial; use dataverse TinySocial; create type MugshotUserType as { id: int32, alias: string, name: string, user-since: datetime, address: { street: string, city: string, state: string, zip: string, country: string }, friend-ids: {{ int32 }}, employment: [EmploymentType] } ASTERIX Data Model (ADM) 13 create dataset MugshotUsers(MugshotUserType) primary key id; Highlights include: • JSON++ based data model • Rich type support (spatial, temporal, …) • Records, lists, bags • Open vs. closed types create type EmploymentType as open { organization-name: string, start-date: date, end-date: date? }
  • 15. create dataverse TinySocial; use dataverse TinySocial; create type MugshotUserType as { id: int32, alias: string, name: string, user-since: datetime, address: { street: string, city: string, state: string, zip: string, country: string }, friend-ids: {{ int32 }}, employment: [EmploymentType] } create dataverse TinySocial; use dataverse TinySocial; create type MugshotUserType as { id: int32 } ASTERIX Data Model (ADM) 14 create dataset MugshotUsers(MugshotUserType) primary key id; Highlights include: • JSON++ based data model • Rich type support (spatial, temporal, …) • Records, lists, bags • Open vs. closed types create type EmploymentType as open { organization-name: string, start-date: date, end-date: date? }
  • 16. create dataverse TinySocial; use dataverse TinySocial; create type MugshotUserType as { id: int32, alias: string, name: string, user-since: datetime, address: { street: string, city: string, state: string, zip: string, country: string }, friend-ids: {{ int32 }}, employment: [EmploymentType] } create dataverse TinySocial; use dataverse TinySocial; create type MugshotUserType as { id: int32 } create type MugshotMessageType as closed { message-id: int32, author-id: int32, timestamp: datetime, in-response-to: int32?, sender-location: point?, tags: {{ string }}, message: string } ASTERIX Data Model (ADM) 15 create dataset MugshotUsers(MugshotUserType) primary key id; create dataset MugshotMessages(MugshotMessageType) primary key message-id; Highlights include: • JSON++ based data model • Rich type support (spatial, temporal, …) • Records, lists, bags • Open vs. closed types create type EmploymentType as open { organization-name: string, start-date: date, end-date: date? }
  • 17. 16 { "id":1, "alias":"Margarita", "name":"MargaritaStoddard", "address”:{ "street":"234 Thomas Ave", "city":"San Hugo", "zip":"98765", "state":"CA", "country":"USA" } "user-since":datetime("2012-08-20T10:10:00"), "friend-ids":{{ 2, 3, 6, 10 }}, "employment":[{ "organization-name":"Codetechno”, "start-date":date("2006-08-06") }] } { "id":2, "alias":"Isbel", "name":"IsbelDull", "address":{ "street":"345 James Ave", "city":"San Hugo", "zip":"98765”, "state":"CA", "country":"USA" }, "user-since":datetime("2011-01-22T10:10:00"), "friend-ids":{{ 1, 4 }}, "employment":[{ "organization-name":"Hexviafind”, "start-date":date("2010-04-27") }] } { "id":3, "alias":"Emory", "name":"EmoryUnk", "address":{ "street":"456 Jose Ave", "city":"San Hugo", "zip":"98765", "state":"CA", "country":"USA" }, "user-since”: datetime("2012-07-10T10:10:00"), "friend-ids":{{ 1, 5, 8, 9 }}, "employment”:[{ "organization-name":"geomedia”, "start-date":date("2010-06-17"), "end-date":date("2010-01-26") }] } ... Ex: MugshotUsers Data
  • 18. create index msUserSinceIdx on MugshotUsers(user-since); create index msTimestampIdx on MugshotMessages(timestamp); create index msAuthorIdx on MugshotMessages(author-id) type btree; create index msSenderLocIndex on MugshotMessages(sender-location) type rtree; create index msMessageIdx on MugshotMessages(message) type keyword; create type AccessLogType as closed { ip: string, time: string, user: string, verb: string, path: string, stat: int32, size: int32 }; create external dataset AccessLog(AccessLogType) using localfs (("path"="{hostname}://{path}"), ("format"="delimited-text"), ("delimiter"="|")); create feed socket_feed using socket_adaptor (("sockets"="{address}:{port}"), ("addressType"="IP"), ("type-name"="MugshotMessageType"), ("format"="adm")); connect feed socket_feed to dataset MugshotMessages; Other DDL Features 17 External data highlights: • Common HDFS file formats + indexing • Feed adaptors for sources like Twitter
  • 19. 18 • Ex: List the user name and messages sent by those users who joined the Mugshot social network in a certain time window: from $user in dataset MugshotUsers where $user.user-since >= datetime('2010-07-22T00:00:00') and $user.user-since <= datetime('2012-07-29T23:59:59') select { "uname" : $user.name, "messages" : from $message in dataset MugshotMessages where $message.author-id = $user.id select $message.message }; 18 ASTERIX Query Language (AQL)
  • 20. AQL (cont.) 19 • Ex: Identify active users and group/count them by country: with $end := current-datetime( ) with $start := $end - duration("P30D") from $user in dataset MugshotUsers where some $logrecord in dataset AccessLog satisfies $user.alias = $logrecord.user and datetime($logrecord.time) >= $start and datetime($logrecord.time) <= $end group by $country := $user.address.country with $user select { "country" : $country, "active users" : count($user) } AQL highlights: • Lots of other features (see website!) • Spatial predicates and aggregation • Set-similarity (fuzzy) matching • And plans for more…
  • 21. Fuzzy Queries in AQL 20 • Ex: Find Tweets with similar content: for $tweet1 in dataset('TweetMessages') for $tweet2 in dataset('TweetMessages') where $tweet1.tweetid != $tweet2.tweetid and $tweet1.message-text ~= $tweet2.message-text return { "tweet1-text": $tweet1.message-text, "tweet2-text": $tweet2.message-text } • Or: Find Tweets about similar topics: for $tweet1 in dataset('TweetMessages') for $tweet2 in dataset('TweetMessages') where $tweet1.tweetid != $tweet2.tweetid and $tweet1.referred-topics ~= $tweet2.referred-topics return { "tweet1-text": $tweet1.message-text, "tweet2-text": $tweet2.message-text }
  • 22. Updates (and Transactions) 21 • Key-value store- like transaction semantics • Insert/delete ops with indexing • Concurrency control (locking) • Crash recovery • Backup/restore • Ex: Add a new user to Mugshot.com: insert into dataset MugshotUsers ( { "id":11, "alias":"John", "name":"JohnDoe", "address":{ "street":"789 Jane St", "city":"San Harry", "zip":"98767", "state":"CA", "country":"USA" }, "user-since":datetime("2010-08-15T08:10:00"), "friend-ids":{ { 5, 9, 11 } }, "employment":[{ "organization-name":"Kongreen", "start-date":date("20012-06-05") }] } );
  • 24. ASTERIX Software Stack 23 Hivesterix Apache VXQuery Algebricks Algebra Layer M/R Layer Pregelix Hyracks Data-Parallel Platform Hyracks Job Hadoop M/R JobPregel Job AQL HiveQL XQuery AsterixDB
  • 25. Native Storage Management Transaction Manager Transaction Sub-System Recovery Manager Lock Manager Log Manager IO Scheduler Disk 1 Disk n Memory Buffer Cache In-Memory Components Working Memory Datasets Manager ( ) + 24
  • 26. LSM-Based Storage + Indexing Memory Disk Sequential writes to disk Periodically merge disk trees 25
  • 27. LSM-Based Filters Memory Disk T1, T2, T3, T4, T5, T6 T7, T8, T9, T10, T11 T12, T13, T14, T15 T16, T17 Oldest Component [ T12, T15 ] [ T7, T11 ] [ T1, T6 ] Intuition: Do NOT touch unneeded records Idea: Utilize LSM partitioning to prune disk components Q: Get all tweets > T14 26
  • 28. • Recent/projected use case areas include – Behavioral science (at UCI) – Social data analytics – Cell phone event analytics – Education (MOOC analytics) – Power usage monitoring – Public health (joint effort with UCLA) – Cluster management log analytics 27 Some Example Use Cases
  • 29. Behavioral Science (HCI) • First study to use logging and biosensors to measure stress and ICT use of college students in their real world environment (Gloria Mark, UCI Informatics) – Focus: Multitasking and stress among “Millennials” • Multiple data channels – Computer logging – Heart rate monitors – Daily surveys – General survey – Exit interview 28 Learnings for AsterixDB: • Nature of their analyses • Extended binning support • Data format(s) in and out • Bugs and pain points
  • 30. Social Data Analysis (Based on 2 pilots) #AsterixDB 29 Learnings for AsterixDB: • Nature of their analyses • Real vs. synthetic data • Parallelism (grouping) • Avoiding materialization • Bugs and pain points The underlying AQL query is: use dataverse twitter; for $t in dataset TweetMessagesShifted let $region := create-rectangle(create-point(…, …), create-point(…, …)) let $keyword := "mind-blowing" where spatial-intersect($t.sender-location, $region) and $t.send-time > datetime("2012-01-02T00:00:00Z”) and $t.send-time < datetime("2012-12-31T23:59:59Z”) and contains($t.message-text, $keyword) group by $c := spatial-cell($t.sender-location, create-point(…), 3.0, 3.0) with $t return { "cell” : $c, "count”: count($t) }
  • 31. Current Status • 4 year initial NSF project (250+ KLOC @ UCI/UCR) • AsterixDB BDMS is here! (Shared on June 6th, 2013) – Semistructured “NoSQL” style data model – Declarative (parallel) queries, inserts, deletes, … – LSM-based storage/indexes (primary & secondary) – Internal and external datasets both supported – Rich set of data types (including text, time, location) – Fuzzy and spatial query processing – NoSQL-like transactions (for inserts/deletes) – Data feeds and external indexes in next release • Performance competitive (at least!) with a popular parallel RDBMS, MongoDB, and Hive (see papers) • Now in Apache incubation mode! 30
  • 32. For More Info AsterixDB project page: http://asterixdb.ics.uci.edu Open source code base: • ASTERIX: http://code.google.com/p/asterixdb/ • Hyracks: http://code.google.com/p/hyracks • (Pregelix: http://hyracks.org/projects/pregelix/) 31