SlideShare a Scribd company logo
Omid: Scalable and highly available transaction
processing for Apache Phoenix
Ohad Shacham
Yahoo Research
Edward Bortnikov
Yahoo Research
James Taylor
Salesforce
RESEARCH
Agenda
2
Apache Phoenix
Features, Scalability, and Performance
Omid
Phoenix-on-Omid
Low-Latency Omid
What is Apache Phoenix?
3
A relational database layer for Apache HBase
Transforms SQL queries into native HBase API calls
Standard SQL interface with JDBC API’s to increase developer productivity
Leveraging HBase Horizontal Scalability
Pushes as much work as possible into the cluster
What is Apache Phoenix?
4
Project started by Salesforce in 2014.
Currently a top level project at the Apache Software Foundation
Developer productivity
5
SELECT * FROM foo WHERE bar>30
HTable t = new HTable(“foo”);
RegionScanner s = t.getScanner(new Scan(…,
new ValueFilter(CompareOp.GT,
new CustomTypedComparator(30)), …));
while ((Result r = s.next()) != null) {
// Java Java Java
}
s.close();
t.close();
Phoenix architecture
6
Designed to scale to 10K nodes
Query processing in Phoenix
7
Data access can be much faster than via direct HBase API
Pushes processing to the server via HBase coprocesors
Maintains and utilizes secondary indexes
Parallelizes queries
Many other “tricks in the book”
Transaction requirements in Phoenix
8
ACID
Multiple data accesses in a single logical operation
Atomic
“All or nothing” – no partial effect observable
Consistent
The DB transitions from one valid state to another
Isolated
Appear to execute in isolation
Durable
Committed data cannot disappear
Transaction requirements in Phoenix
9
SQL transactions
Secondary index
Atomic update
On-the-fly index creation
Transaction requirements in Phoenix
10
Secondary index
Atomic update
(k1, [v1,v2,v3])
Table Index
(v1, k1)
Write (k1, ]v1,v2,v3])
Transaction requirements in Phoenix
11
Secondary index
On-the-fly index creation
(k1, v1)
Table Index
(k2, v2)
(k3, v3)
(kn, vn)
. . .
(v1, k1)
(v2, k2)
(v3, k3)
(vn, kn)
. . .
Omid
12
2011
Incepted
@Yahoo
Research
“Omid1”
2014
Large-Scale
Deployment
@Yahoo
2014/5
Major Re-
Design
for Scalability
& HA
“Omid2”
2016
Apache
Incubator
2017
Prototype
Integration
with Phoenix
Transaction Processing Service for Apache HBase
Contributors
13
Ohad Shacham
Yahoo Research
Francisco
Perez Sorrosal
YahooEdward Bortnikov
Yahoo Research
Eshcar Hillel
Yahoo Research
Idit Keidar
Yahoo, Technion
Ivan Kelly
MidokuraSameer Paranjpye
Databricks
Matthieu Morel
Skyscanner
Igor Katkov
Atlassian
Yonatan Gottesman
Yahoo Research
Omid
14
Client Library + Runtime Service
Database Agnostic (can work with other backends)
Snapshot Isolation consistency
Very Scalable (>400K peak tps) and Highly Available
Omid programming example
15
TransactionManager tm = HBaseTransactionManager.newInstance();
TTable txTable = new TTable("MY_TX_TABLE”);
Transaction tx = tm.begin(); // Control path
Put row1 = new Put(Bytes.toBytes("EXAMPLE_ROW1"));
row1.add(family, qualifier, Bytes.toBytes("val1"));
txTable.put(tx, row1); // Data path
Put row2 = new Put(Bytes.toBytes("EXAMPLE_ROW2"));
row2.add(family, qualifier, Bytes.toBytes("val2"));
txTable.put(tx, row2); // Data path
tm.commit(tx); // Control path
Transactions and snapshot isolation
Aborts only on write-write conflicts
Read point Write point
begin commitread(x) write(y) write(x) read(y)
Omid architecture
Client
Begin/Commit
Data Data Data
Commit
Table
Persist
Commit
Verify commitRead/Write
Conflict
Detection
17
Transaction
Manager
(TSO)Results/Timestamp
Client
Begin
Data Data Data
Commit
Table
t1
Write (k1, v1, t1) Write (k2, v2, t1)
Read (k’, last committed t’ < t1)
(k1, v1, t1) (k2, v2, t1)
Execution example
tr = t1
TSO
18
Client
Commit: t1, {k1, k2}
Data Data Data
Commit
Table
t2
(k1, v1, t1) (k2, v2, t1)
Write (t1, t2)
(t1, t2)
Execution example
tr = t1
tc = t2
19
TSO
Client
Data Data Data
Commit
Table
Read (k1, t3)
(k1, v1, t1) (k2, v2, t1) (t1, t2)
Read (t1)
Execution example
tr = t3
20
Bottleneck!
TSO
Client
Data Data Data
Commit
Table
t2
(t1, t2)(k1,v1,t1,t2) (k2,v2,t1,t2)
Delete(t1)
Post-Commit
tr = t1
tc = t2
Update
commit
cells
21
TSO
Data Data Data
Commit
Table
Read (k1, t3)
Using Commit Cells
Client
tr = t3
22
TSO
(k1,v1,t1,t2) (k2,v2,t1,t2)
Omid architecture
Client
Begin/Commit
Data Data Data
Commit
Table
Persist
Commit
Verify commitRead/Write
Single
point of
failure
23
Transaction
Manager
(TSO)Results/Timestamp
Omid architecture
Client
Begin/Commit
Data Data Data
Commit
Table
Verify commitRead/Write
24
Results/Timestamp
Transaction
Manager
(TSO)
Transaction
Manager
(TSO)
Recovery
state
Phoenix-Omid Integration
25
Omid support:
https://issues.apache.org/jira/browse/OMID-82
Phoenix plan:
https://issues.apache.org/jira/browse/PHOENIX-3623
Transaction processing layer
26
Transaction
Abstraction Layer
Tephra
Client
Omid
Client
PhoenixPhoenix
Tephra
Client
Refactor
New scenarios for Omid
27
Secondary Indexes
On-the-Fly Index Creation
Atomic Updates
Extended Snapshot Isolation
Read-Your-Own-Writes Queries
On-the-fly secondary index creation
28
CREATE INDEX (CI) in parallel with writes to the base table
Need to distinguish between the pre-CI and post-CI data
Augment Omid with a fence command, called in every CI
1. All data committed before fence: scanned, bulk-inserted into index
2. All data generated after fence: triggers random update of index
3. All transactions in flight at fence: aborted
Secondary index: creation and maintenance
29
T1
T2
T3
CREATE
INDEX
started
T4
CREATE
INDEX
complete
T5
T6
Bulk-Insert
into index
Abort
(enforced
upon
commit)
Added by
a
coproces
sor
Added by
a
coproces
sor
Index
update
(stored
procedure)
Extended snapshot isolation
30
BEGIN;
INSERT INTO T
SELECT ID+10 FROM T;
INSERT INTO T
SELECT ID+100 FROM T;
COMMIT;
CREATE TABLE T (ID INT);
...
Moving snapshot implementation
31
Checkpoint for
Statement 1
Checkpoint for
Statement 2
Writes by
Statement 1
Timestamps allocated by TM in blocks.
Client promotes the checkpoint.
Omid required features
32
Scan
Phoenix uses a coprocessor to filter/aggregate close to data
Part of the Omid client logic moves downstream
Secondary index
Phoenix uses a coprocessor to populate an index in a bulk
Omid auto commit, GC should be disabled
Phoenix uses another coprocessor for incremental updates
Omid must take care of shadow cell manipulation
Omid required features
33
Row level conflict analysis
Conflict analysis free writes
Time based timestamp
Low latency Omid
34
Omid design is throughput oriented
writes to Commit Table batched at the TSO
Distribute the Writes to the commit table
The client, rather than the TSO, persists the Commit Timestamp
Benchmark: Single-Write Transaction Workload
Easily scales beyond 500K tps
Latency problem solved
TSO latency
bottleneck!
Summary
36
Apache Phoenix need a scalable and HA Tps
Omid is Battle-Tested, Highly Scalable, Low-Latency
Phoenix-Omid integration provides an efficient OLTP for
Hadoop

More Related Content

What's hot (20)

PPTX
Omid: scalable and highly available transaction processing for Apache Phoenix
DataWorks Summit
 
PPTX
Apache Hive 2.0: SQL, Speed, Scale
DataWorks Summit/Hadoop Summit
 
PDF
What's new in Apache Spark 2.4
boxu42
 
PPTX
Lessons learned running a container cloud on YARN
DataWorks Summit
 
PPTX
Transactional operations in Apache Hive: present and future
DataWorks Summit
 
PPTX
Enabling Apache Zeppelin and Spark for Data Science in the Enterprise
DataWorks Summit/Hadoop Summit
 
PPTX
Why Kubernetes as a container orchestrator is a right choice for running spar...
DataWorks Summit
 
PPTX
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
DataWorks Summit
 
PDF
Apache Spark 2.3 boosts advanced analytics and deep learning with Python
DataWorks Summit
 
PPTX
Sharing metadata across the data lake and streams
DataWorks Summit
 
PPTX
Apache deep learning 101
DataWorks Summit
 
PPTX
Big Data Storage - Comparing Speed and Features for Avro, JSON, ORC, and Parquet
DataWorks Summit
 
PPTX
SAM—streaming analytics made easy
DataWorks Summit
 
PPTX
Running Enterprise Workloads in the Cloud
DataWorks Summit
 
PPTX
Mool - Automated Log Analysis using Data Science and ML
DataWorks Summit/Hadoop Summit
 
PPTX
LLAP: Building Cloud First BI
DataWorks Summit
 
PPTX
Network for the Large-scale Hadoop cluster at Yahoo! JAPAN
DataWorks Summit/Hadoop Summit
 
PPTX
Unifying Stream, SWL and CEP for Declarative Stream Processing with Apache Flink
DataWorks Summit/Hadoop Summit
 
PPTX
Hortonworks Data in Motion Webinar Series Part 7 Apache Kafka Nifi Better Tog...
Hortonworks
 
PDF
Present and future of unified, portable, and efficient data processing with A...
DataWorks Summit
 
Omid: scalable and highly available transaction processing for Apache Phoenix
DataWorks Summit
 
Apache Hive 2.0: SQL, Speed, Scale
DataWorks Summit/Hadoop Summit
 
What's new in Apache Spark 2.4
boxu42
 
Lessons learned running a container cloud on YARN
DataWorks Summit
 
Transactional operations in Apache Hive: present and future
DataWorks Summit
 
Enabling Apache Zeppelin and Spark for Data Science in the Enterprise
DataWorks Summit/Hadoop Summit
 
Why Kubernetes as a container orchestrator is a right choice for running spar...
DataWorks Summit
 
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
DataWorks Summit
 
Apache Spark 2.3 boosts advanced analytics and deep learning with Python
DataWorks Summit
 
Sharing metadata across the data lake and streams
DataWorks Summit
 
Apache deep learning 101
DataWorks Summit
 
Big Data Storage - Comparing Speed and Features for Avro, JSON, ORC, and Parquet
DataWorks Summit
 
SAM—streaming analytics made easy
DataWorks Summit
 
Running Enterprise Workloads in the Cloud
DataWorks Summit
 
Mool - Automated Log Analysis using Data Science and ML
DataWorks Summit/Hadoop Summit
 
LLAP: Building Cloud First BI
DataWorks Summit
 
Network for the Large-scale Hadoop cluster at Yahoo! JAPAN
DataWorks Summit/Hadoop Summit
 
Unifying Stream, SWL and CEP for Declarative Stream Processing with Apache Flink
DataWorks Summit/Hadoop Summit
 
Hortonworks Data in Motion Webinar Series Part 7 Apache Kafka Nifi Better Tog...
Hortonworks
 
Present and future of unified, portable, and efficient data processing with A...
DataWorks Summit
 

Similar to Omid: scalable and highly available transaction processing for Apache Phoenix (20)

PDF
Omid: Scalable and Highly Available Transaction Processing for Phoenix
Edward Bortnikov
 
PDF
Apache Big Data EU 2015 - Phoenix
Nick Dimiduk
 
PDF
Activeeon - Scale Beyond Limits
Activeeon
 
PDF
Metadata and Provenance for ML Pipelines with Hopsworks
Jim Dowling
 
PDF
High-level Programming Languages: Apache Pig and Pig Latin
Pietro Michiardi
 
PDF
Social Media Monitoring with NiFi, Druid and Superset
Thiago Santiago
 
PDF
Building Scalable Data Pipelines - 2016 DataPalooza Seattle
Evan Chan
 
PPTX
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
DataWorks Summit
 
PDF
DevOps in Droplr
Antoni Orfin
 
PPTX
Running High-Speed Serverless with nuclio
iguazio
 
PPTX
TiConf EU 2014
Ingo Muschenetz
 
PDF
Building Hopsworks, a cloud-native managed feature store for machine learning
Jim Dowling
 
PPTX
Why apache Flink is the 4G of Big Data Analytics Frameworks
Slim Baltagi
 
PDF
Stream Processing using Apache Flink in Zalando's World of Microservices - Re...
Zalando Technology
 
PDF
"Wie passen Serverless & Autonomous zusammen?"
Volker Linz
 
PDF
Flink in Zalando's world of Microservices
ZalandoHayley
 
PDF
Flink in Zalando's World of Microservices
Zalando Technology
 
PDF
Rackspace Unlocked.io Q3'13
Chad Arimura
 
PPTX
HBaseCon2015-final
Maryann Xue
 
PPTX
HBaseCon 2015: Apache Phoenix - The Evolution of a Relational Database Layer ...
HBaseCon
 
Omid: Scalable and Highly Available Transaction Processing for Phoenix
Edward Bortnikov
 
Apache Big Data EU 2015 - Phoenix
Nick Dimiduk
 
Activeeon - Scale Beyond Limits
Activeeon
 
Metadata and Provenance for ML Pipelines with Hopsworks
Jim Dowling
 
High-level Programming Languages: Apache Pig and Pig Latin
Pietro Michiardi
 
Social Media Monitoring with NiFi, Druid and Superset
Thiago Santiago
 
Building Scalable Data Pipelines - 2016 DataPalooza Seattle
Evan Chan
 
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
DataWorks Summit
 
DevOps in Droplr
Antoni Orfin
 
Running High-Speed Serverless with nuclio
iguazio
 
TiConf EU 2014
Ingo Muschenetz
 
Building Hopsworks, a cloud-native managed feature store for machine learning
Jim Dowling
 
Why apache Flink is the 4G of Big Data Analytics Frameworks
Slim Baltagi
 
Stream Processing using Apache Flink in Zalando's World of Microservices - Re...
Zalando Technology
 
"Wie passen Serverless & Autonomous zusammen?"
Volker Linz
 
Flink in Zalando's world of Microservices
ZalandoHayley
 
Flink in Zalando's World of Microservices
Zalando Technology
 
Rackspace Unlocked.io Q3'13
Chad Arimura
 
HBaseCon2015-final
Maryann Xue
 
HBaseCon 2015: Apache Phoenix - The Evolution of a Relational Database Layer ...
HBaseCon
 
Ad

More from DataWorks Summit (20)

PPTX
Data Science Crash Course
DataWorks Summit
 
PPTX
Floating on a RAFT: HBase Durability with Apache Ratis
DataWorks Summit
 
PPTX
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
DataWorks Summit
 
PDF
HBase Tales From the Trenches - Short stories about most common HBase operati...
DataWorks Summit
 
PPTX
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
DataWorks Summit
 
PPTX
Managing the Dewey Decimal System
DataWorks Summit
 
PPTX
Practical NoSQL: Accumulo's dirlist Example
DataWorks Summit
 
PPTX
HBase Global Indexing to support large-scale data ingestion at Uber
DataWorks Summit
 
PPTX
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
DataWorks Summit
 
PPTX
Supporting Apache HBase : Troubleshooting and Supportability Improvements
DataWorks Summit
 
PPTX
Security Framework for Multitenant Architecture
DataWorks Summit
 
PDF
Presto: Optimizing Performance of SQL-on-Anything Engine
DataWorks Summit
 
PPTX
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
DataWorks Summit
 
PPTX
Extending Twitter's Data Platform to Google Cloud
DataWorks Summit
 
PPTX
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
DataWorks Summit
 
PPTX
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
DataWorks Summit
 
PPTX
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
DataWorks Summit
 
PDF
Computer Vision: Coming to a Store Near You
DataWorks Summit
 
PPTX
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
DataWorks Summit
 
PPTX
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
DataWorks Summit
 
Data Science Crash Course
DataWorks Summit
 
Floating on a RAFT: HBase Durability with Apache Ratis
DataWorks Summit
 
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
DataWorks Summit
 
HBase Tales From the Trenches - Short stories about most common HBase operati...
DataWorks Summit
 
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
DataWorks Summit
 
Managing the Dewey Decimal System
DataWorks Summit
 
Practical NoSQL: Accumulo's dirlist Example
DataWorks Summit
 
HBase Global Indexing to support large-scale data ingestion at Uber
DataWorks Summit
 
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
DataWorks Summit
 
Supporting Apache HBase : Troubleshooting and Supportability Improvements
DataWorks Summit
 
Security Framework for Multitenant Architecture
DataWorks Summit
 
Presto: Optimizing Performance of SQL-on-Anything Engine
DataWorks Summit
 
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
DataWorks Summit
 
Extending Twitter's Data Platform to Google Cloud
DataWorks Summit
 
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
DataWorks Summit
 
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
DataWorks Summit
 
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
DataWorks Summit
 
Computer Vision: Coming to a Store Near You
DataWorks Summit
 
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
DataWorks Summit
 
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
DataWorks Summit
 
Ad

Recently uploaded (20)

PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 

Omid: scalable and highly available transaction processing for Apache Phoenix