SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Don’t Call It a Comeback
Attribute Grammars for Big Data Viz
Leo Meyerovich
Parallelism Lab @ UC
Berkeley
Superconductor: sc-lang.com
1
Why Attribute Grammars?
Beautiful Data
Declarative Design
Multicore/GPU Patterns
compilers
2
10X Less Power vs. Laptop
Faster mobile browsers? Data
visualization? 3
4
“Well-designed graphics
are usually the simplest”
Big Data is Different:
going from Data Reporting
to Knowledge Discovery
… small & static charts enough?
Ex: How to Report Voter
Turnout
5
Swedes Like
Voting
0% 100
%
50%
Voter Turnout
# Votes
Mexic
o
Democracy?
 Bell Curve
Mystery Country
Abnormal curve;
can be voter fraud!
6
Precrafted message,
not knowledge discovery!
demo: fraud analysis
7
8
9
10
Superconductor
is
a collection of domain specific languages
for data visualization
… that compile into parallel JavaScript
(WebCL/WebGL/workers/…).
11
Superconductor: Domain Specific
Languages
12
data
paintlayout
stylize
Parallel & High-Level Language for
Each?
Attribute
Grammars
JSON
CSS
Selectors
DSL 1: Data via JSON
13
JavaScript, Ruby, Python, Jav
a, …
Easy… until 1-10s data
loading
Parsing Demo
14
Parsing Demo
15
Manually Building a Layout System
Stinks
browsera.com
Performance
footprint, parallelis
m, incrementalism,
…
Tools
debugger, IDE, …
Automation Cuts Implementation Costs!
16
Correctness
500pg standard, 100K+ lines of
C++
DSL 2: Automate with Attribute
Grammars
Compilertreemap.ftl
Parallel code
workers, CL, GL
tree: SC_DOM.js
LayoutEngine
.js
offline
17
browser
class HBox : Node
children:
left : Node
right: Node
constraints:
w := left.w + right.w
…
xy xy
y
y
y
w h
w h
x x
x
hw
Writing a Custom Layout: Super
CSS!
10px
5px
Root
HBox
LeafLeaf
LeafLeaf
HBox
w
xy
hw
hwh
input: x, y
var: w, h
[Kastens 1980, Saraiva 2003] [WWW 2010, PPOPP 2013]
2. Single-assignment
1. Local
18
Declarative Calculator!
19
Declarative Calculator!
20
Declarative Calculator!
21
Layout DSL is Flexible!
22
multicoremulticor
e
multicor
e
GPU
GPU
GPU
GPU
expressivenes
s
lazy, iterative, …
1990+
optimize
incremental, parallel
1980+
build
parsers
yacc/bison
Compiler
Research
1970
+
History of Attribute Grammar Formalism
semantics
time FP Research
196
7
build IDEs
spoofax
2000+
Haskell, Coq
synthesis2009+
23
Why Attribute Grammars?
Beautiful Data
Declarative Design
Multicore/GPU Patterns
compilers
24
Leaf
Compute: Layout as Tree Traversals
w,h w,h
w,h
w,h
w,h
w,h
x,y …
1. Works for all data sets
2. Compiler automatically parallelizes!
[WWW 2010]
logical joins
logical spawns
Parallelism in each traversal!
25
Two Examples
26
multicore
GPU
CSS
B = [img, normal, flow, root]
P = [
, , , , , , ,
(buSubInorder, (B,_, _)), ]
Interactive Treemap
P = [ , , , ,  ]
Pattern Programming
27
Need “Structured Programming”
for Automatically Parallel
Languages
Synthesizerfunctional spec
attr grammar
schedule
{w,h}; {x, …
partial behavioral spec
schedule sketch
CSS 1.0, 2.0, 2.1, 3.0, 4.0,
…
28
Input: Partial Behavior (“Schedule
Sketch”)
 _ ;_ ;_ ;_;_ ;_;nest({Text,Font,Inline}, _);_;_
OK: rescheduling
attribs
w, h
bug: less
parallelism!
sequential_inorder{y,r}
Structures parallel programming:
share code, test ideas, and debug
Hole filled by synthesizer with: , {x,y}, “||”, …
Synthesizer rejects programs that cannot obey sketch
29
GPU Patterns
30
parallel for loop
(level synchronous)
GPU Traversals: Flattened & Level-
Synchronous
level 1
Tree
level n
whxy
Nodes in arrays
Array per attribute
Compiler automates code + data
transformations.
[Blelloch 93]
31
circ(…)
Problem: Dynamic Memory Allocation on
GPU?
square(…) rect(…); …
line(…); …
rect(…); …
oval(…)
32
1.0 0.8 0.5 0.2 0 0.2
function circ(x,y,r) {
buffer = new
Array(r*10)
for (i = 0; i < r * 10;
i++)
buffer[i] =
Math.cos(i)
}
dynamic allocation
Fast Dynamic Memory Allocation
allocCirc(…); …
allocRect(…); …
allocLine(…); …
allocRect(…); …
fillCirc(…); …
fillRect(…);
…
fillLine(…); …
fillRect(…);
…
1. Prefix sum for needed
space
2. Allocate buffers
3. Fill vertex buffers in
parallel
4. Give OpenGL buffers
pointer
33
1.0 0.8 0.5 0.2 0
0.2
1.0 0.8 0.5
0.2
1.0 0.8 0.5 0.2 0
0.2
Automatic!
@Line3D(x, y, z, x + 1, y + 1, z + 1)
@Line3D(x, y, z, x + 1, y + 1, z + 1)
=== compiler ===>
size1 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1)
size2 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1)
child.bufferIndex := bufferIndex + size1 + size2
render1 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1,
bufferIndex )
render2 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1,
bufferIndex + size1)
34
1
10
100
1,000
10,000
LAYOUT (4 passes) rendering pass TOTAL
Time(ms)
Naïve JS (Chrome 26) Arrays (Chrome 26) GPU (Safari + WebCL 11/3/12)
CPU vs. GPU for Election Treemap:
5 traversals over 100K nodes
Total: 53XTyped arrays:
14X
35
WebCL:
5X
WebCL+WebGL:
32X
Platform: JavaScript is the New
Assembly
36
parallel
multicore:
SIMD:
HTML5 Hardware
Access
GPU:
Too low-level
w/out DSLs
Architecture: Browser-in-a-
Browser
HTML data
CSS styling
JS script
Pixels
Parser
Selectors
Layout
RendererJavaScriptVMRenderer.GL
Parser.js
webpage
37
Layout.CL
Selectors.CL
GPU
superconductor.js
data
styling
widgets
data viz
Compiler
Date stays
on GPU!
Debugger
Multiple
backends
Server
…
GE Demo
38
GE Demo
39
sc-lang.com : please take our survey 
Beautiful Data
Declarative Design
Multicore/GPU Patterns
synthesis + compilation
40

Weitere ähnliche Inhalte

Andere mochten auch

Temperature Cycling Tests
Temperature Cycling TestsTemperature Cycling Tests
Temperature Cycling TestsAnjar Bumi
 
FM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanaiFM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanaiFinanšu ministrija
 
Social media workshop BBC Fides
Social media workshop BBC FidesSocial media workshop BBC Fides
Social media workshop BBC FidesRefreshed
 
R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX Hirwanto Iwan
 
Мапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИМапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИVolyn Media
 
Laporan Metode Statistikia II
Laporan Metode Statistikia IILaporan Metode Statistikia II
Laporan Metode Statistikia IIHirwanto Iwan
 
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadamMinistriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadamFinanšu ministrija
 

Andere mochten auch (13)

Temperature Cycling Tests
Temperature Cycling TestsTemperature Cycling Tests
Temperature Cycling Tests
 
Kerkis
KerkisKerkis
Kerkis
 
J company
J companyJ company
J company
 
FM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanaiFM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanai
 
Gfs neohellenic
Gfs neohellenicGfs neohellenic
Gfs neohellenic
 
Tiringa
TiringaTiringa
Tiringa
 
Social media workshop BBC Fides
Social media workshop BBC FidesSocial media workshop BBC Fides
Social media workshop BBC Fides
 
Tribute to Yogi Berra
Tribute to Yogi BerraTribute to Yogi Berra
Tribute to Yogi Berra
 
R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX
 
Мапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИМапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИ
 
Laporan Metode Statistikia II
Laporan Metode Statistikia IILaporan Metode Statistikia II
Laporan Metode Statistikia II
 
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadamMinistriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
 
Computer modern
Computer modernComputer modern
Computer modern
 

Ähnlich wie Don't Call It a Comeback: Attribute Grammars for Big Data Visualization

WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...AMD Developer Central
 
Data-Centric Parallel Programming
Data-Centric Parallel ProgrammingData-Centric Parallel Programming
Data-Centric Parallel Programminginside-BigData.com
 
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...InfinIT - Innovationsnetværket for it
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksDavid Evans
 
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Spark Summit
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big DataAlbert Bifet
 
Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013MLconf
 
2 Years of Real World FP at REA
2 Years of Real World FP at REA2 Years of Real World FP at REA
2 Years of Real World FP at REAkenbot
 
Hadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreHadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreKelly Technologies
 
Hadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesHadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesKelly Technologies
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiDatabricks
 
Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesKelly Technologies
 
The Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s PerspectiveThe Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s Perspectiveguest4fd7a2
 
Tim Popl
Tim PoplTim Popl
Tim Poplmchaar
 
Class 26: Objectifying Objects
Class 26: Objectifying ObjectsClass 26: Objectifying Objects
Class 26: Objectifying ObjectsDavid Evans
 
High-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingHigh-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingNesreen K. Ahmed
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017Manish Pandey
 

Ähnlich wie Don't Call It a Comeback: Attribute Grammars for Big Data Visualization (20)

WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...
 
Data-Centric Parallel Programming
Data-Centric Parallel ProgrammingData-Centric Parallel Programming
Data-Centric Parallel Programming
 
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
 
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Matlab workshop
Matlab workshopMatlab workshop
Matlab workshop
 
Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013
 
2 Years of Real World FP at REA
2 Years of Real World FP at REA2 Years of Real World FP at REA
2 Years of Real World FP at REA
 
K10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh PlotsK10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh Plots
 
Hadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreHadoop institutes-in-bangalore
Hadoop institutes-in-bangalore
 
Hadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesHadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologies
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
 
Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologies
 
The Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s PerspectiveThe Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s Perspective
 
Tim Popl
Tim PoplTim Popl
Tim Popl
 
Class 26: Objectifying Objects
Class 26: Objectifying ObjectsClass 26: Objectifying Objects
Class 26: Objectifying Objects
 
High-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingHigh-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and Modeling
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017
 

Kürzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Don't Call It a Comeback: Attribute Grammars for Big Data Visualization

  • 1. Don’t Call It a Comeback Attribute Grammars for Big Data Viz Leo Meyerovich Parallelism Lab @ UC Berkeley Superconductor: sc-lang.com 1
  • 2. Why Attribute Grammars? Beautiful Data Declarative Design Multicore/GPU Patterns compilers 2
  • 3. 10X Less Power vs. Laptop Faster mobile browsers? Data visualization? 3
  • 4. 4 “Well-designed graphics are usually the simplest” Big Data is Different: going from Data Reporting to Knowledge Discovery … small & static charts enough?
  • 5. Ex: How to Report Voter Turnout 5 Swedes Like Voting 0% 100 % 50% Voter Turnout # Votes Mexic o Democracy?  Bell Curve Mystery Country Abnormal curve; can be voter fraud!
  • 6. 6 Precrafted message, not knowledge discovery! demo: fraud analysis
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. Superconductor is a collection of domain specific languages for data visualization … that compile into parallel JavaScript (WebCL/WebGL/workers/…). 11
  • 12. Superconductor: Domain Specific Languages 12 data paintlayout stylize Parallel & High-Level Language for Each? Attribute Grammars JSON CSS Selectors
  • 13. DSL 1: Data via JSON 13 JavaScript, Ruby, Python, Jav a, … Easy… until 1-10s data loading
  • 16. Manually Building a Layout System Stinks browsera.com Performance footprint, parallelis m, incrementalism, … Tools debugger, IDE, … Automation Cuts Implementation Costs! 16 Correctness 500pg standard, 100K+ lines of C++
  • 17. DSL 2: Automate with Attribute Grammars Compilertreemap.ftl Parallel code workers, CL, GL tree: SC_DOM.js LayoutEngine .js offline 17 browser
  • 18. class HBox : Node children: left : Node right: Node constraints: w := left.w + right.w … xy xy y y y w h w h x x x hw Writing a Custom Layout: Super CSS! 10px 5px Root HBox LeafLeaf LeafLeaf HBox w xy hw hwh input: x, y var: w, h [Kastens 1980, Saraiva 2003] [WWW 2010, PPOPP 2013] 2. Single-assignment 1. Local 18
  • 22. Layout DSL is Flexible! 22 multicoremulticor e multicor e GPU GPU GPU GPU
  • 23. expressivenes s lazy, iterative, … 1990+ optimize incremental, parallel 1980+ build parsers yacc/bison Compiler Research 1970 + History of Attribute Grammar Formalism semantics time FP Research 196 7 build IDEs spoofax 2000+ Haskell, Coq synthesis2009+ 23
  • 24. Why Attribute Grammars? Beautiful Data Declarative Design Multicore/GPU Patterns compilers 24
  • 25. Leaf Compute: Layout as Tree Traversals w,h w,h w,h w,h w,h w,h x,y … 1. Works for all data sets 2. Compiler automatically parallelizes! [WWW 2010] logical joins logical spawns Parallelism in each traversal! 25
  • 26. Two Examples 26 multicore GPU CSS B = [img, normal, flow, root] P = [ , , , , , , , (buSubInorder, (B,_, _)), ] Interactive Treemap P = [ , , , ,  ]
  • 28. Need “Structured Programming” for Automatically Parallel Languages Synthesizerfunctional spec attr grammar schedule {w,h}; {x, … partial behavioral spec schedule sketch CSS 1.0, 2.0, 2.1, 3.0, 4.0, … 28
  • 29. Input: Partial Behavior (“Schedule Sketch”)  _ ;_ ;_ ;_;_ ;_;nest({Text,Font,Inline}, _);_;_ OK: rescheduling attribs w, h bug: less parallelism! sequential_inorder{y,r} Structures parallel programming: share code, test ideas, and debug Hole filled by synthesizer with: , {x,y}, “||”, … Synthesizer rejects programs that cannot obey sketch 29
  • 31. parallel for loop (level synchronous) GPU Traversals: Flattened & Level- Synchronous level 1 Tree level n whxy Nodes in arrays Array per attribute Compiler automates code + data transformations. [Blelloch 93] 31
  • 32. circ(…) Problem: Dynamic Memory Allocation on GPU? square(…) rect(…); … line(…); … rect(…); … oval(…) 32 1.0 0.8 0.5 0.2 0 0.2 function circ(x,y,r) { buffer = new Array(r*10) for (i = 0; i < r * 10; i++) buffer[i] = Math.cos(i) } dynamic allocation
  • 33. Fast Dynamic Memory Allocation allocCirc(…); … allocRect(…); … allocLine(…); … allocRect(…); … fillCirc(…); … fillRect(…); … fillLine(…); … fillRect(…); … 1. Prefix sum for needed space 2. Allocate buffers 3. Fill vertex buffers in parallel 4. Give OpenGL buffers pointer 33 1.0 0.8 0.5 0.2 0 0.2 1.0 0.8 0.5 0.2 1.0 0.8 0.5 0.2 0 0.2
  • 34. Automatic! @Line3D(x, y, z, x + 1, y + 1, z + 1) @Line3D(x, y, z, x + 1, y + 1, z + 1) === compiler ===> size1 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1) size2 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1) child.bufferIndex := bufferIndex + size1 + size2 render1 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1, bufferIndex ) render2 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1, bufferIndex + size1) 34
  • 35. 1 10 100 1,000 10,000 LAYOUT (4 passes) rendering pass TOTAL Time(ms) Naïve JS (Chrome 26) Arrays (Chrome 26) GPU (Safari + WebCL 11/3/12) CPU vs. GPU for Election Treemap: 5 traversals over 100K nodes Total: 53XTyped arrays: 14X 35 WebCL: 5X WebCL+WebGL: 32X
  • 36. Platform: JavaScript is the New Assembly 36 parallel multicore: SIMD: HTML5 Hardware Access GPU: Too low-level w/out DSLs
  • 37. Architecture: Browser-in-a- Browser HTML data CSS styling JS script Pixels Parser Selectors Layout RendererJavaScriptVMRenderer.GL Parser.js webpage 37 Layout.CL Selectors.CL GPU superconductor.js data styling widgets data viz Compiler Date stays on GPU! Debugger Multiple backends Server …
  • 40. sc-lang.com : please take our survey  Beautiful Data Declarative Design Multicore/GPU Patterns synthesis + compilation 40

Hinweis der Redaktion

  1. First line: To demonstrate how to specify a layout in our system let’s look at an example, specifically an HboxHbox is one of many layout components that positions its contents horizontallyIn specification form, this means that the width attribute of Hbox is the sum of the children’s widthsRest of Hbox specified in a similar manner, for instance… - Given a set of such specifications for all layout components, we need to find a ordering of assignments that solves an input tree
  2. Gloss over details of what is going on. Take away should be: this stuff is complicated, but don’t worry, compiler does it all for you.[what is meant by ‘subtree’ here? And ‘including edges’? Get this slide clarified.]
  3. [MENTION THAT WE STAY ON GPU HERE. Rewrite to include this.]‘malloc’ is what we want, but can’t have. Need solution.