SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
Omid
Efficient Transaction Management and
  Incremental Processing for HBase




                                                             Daniel Gómez Ferro
                                                                         21/03/2013



       Copyright © 2013 Yahoo! All rights reserved. No reproduction or distribution allowed without express written permission.
About me

 § Research engineer at Yahoo!

 § Main Omid developer

 § Apache S4 committer

 § Contributor to:
   • ZooKeeper
   • HBase


Omid - Yahoo! Research    2
Outline

 § Motivation

 § Goal: transactions on HBase

 § Architecture

 § Examples

 § Future work

Omid - Yahoo! Research   3
Motivation

 § Traditional DBMS:                § NoSQL stores:
   • SQL                              • SQL
   • Transactions                     • Transactions
   • Scalable                         • Scalable



                  § Some use cases require
                    • Scalability
                    • Consistent updates




Omid - Yahoo! Research           4
Motivation

 § Requested feature
   • Support for transactions in HBase is a common request


 § Percolator
   • Google implemented transactions on BigTable


 § Incremental Processing
   • MapReduce latencies measured in hours
   • Reduce latency to seconds
   • Requires transactions

Omid - Yahoo! Research      5
Incremental Processing
          Offline                            Online
        MapReduce                     Incremental Processing
        Fault tolerance                    Fault tolerance
          Scalability                        Scalability
                                            Shared state




  State0                 State1                 Shared
                                                 State



              Using Percolator, Google dramatically
                  reduced crawl-to-index time
Omid - Yahoo! Research            6
Transactions on HBase
Omid

 § ‘Hope’ in Persian

 § Optimistic Concurrency Control system
   • Lock free
   • Aborts transactions at commit time

 § Implements Snapshot Isolation

 § Low overhead

 § http://yahoo.github.com/omid
Omid - Yahoo! Research       8
Snapshot Isolation

 § Transactions read from their own snapshot

 § Snapshot:
   • Immutable
   • Identified by creation time
   • Values committed before creation time


 § Transactions conflict if two conditions apply:
  A)  Overlap in time
  B)  Write to the same row

Omid - Yahoo! Research        9
Transaction conflicts
Id:     Time overlap:                 Write set:

A                                     r1        r3

B                                          r2        r4

C                                               r3 r4

D                                     r1 r2 r3 r4
                         Time

 § Transaction B overlaps with A and C
      • B ∩ A = ∅
      • B ∩ C = { r4 }
      • B and C conflict
 § Transaction D doesn’t conflict
Omid - Yahoo! Research          10
Omid Architecture
Architecture

 1.  Centralized server
 2.  Transactional metadata replicated to clients
 3.  Store transaction ids in HBase timestamps

               Status Oracle
                   (SO)
                         (1)          (2)
                                            S
                                            O      Omid
                                                  Omid
                                                 Omid
                                                 Clients
                  HBase                         Clients
                                                Clients
                     HBase
                    HBase
                      HBase
                  Region
                    Region
                      Region
                     Region
                  Servers
                   Servers
                     Servers
                     Servers   (3)

Omid - Yahoo! Research           12
Status Oracle

 § Limited memory
   • Evict old metadata
   • … maintaining consistency guarantees!


 § Keep LowWatermark
   • Updated on metadata eviction
   • Abort transactions older than LowWatermark
   • Necessary for Garbage Collection




Omid - Yahoo! Research     13
Transactional Metadata

                         Status Oracle

     StartTS CommitTS               Row LastCommitTS
     T10     T20                    r1  T20
     …       …                      …   …


     LowWatermark                   Aborted
     T4                             T2     T18   …




Omid - Yahoo! Research         14
Metadata Replication

 § Transactional metadata is replicated to clients

 § Status Oracle not in critical path
   • Minimize overhead

 § Clients guarantee Snapshot Isolation
   • Ignore data not in their snapshot
   • Talk directly to HBase
   • Conflicts resolved by the Status Oracle

 § Expensive, but scalable up to 1000 clients
Omid - Yahoo! Research       15
Architecture recap
                           Status Oracle
 StartTS CommitTS                     Row LastCommitTS
 T10     T20                          r1  T20
 …       …                            …   …

 LowWatermark                         Aborted
 T4                                   T2     T18        …


                                                   S
                                                   O      Omid
                                                         Omid
                         HBase                          Omid
                                                        Clients
                           HBase
                           HBase
                             HBase                     Clients
                         Region
                           Region
                             Region                    Clients
                           Region
                         Servers
                          Servers
                            Servers
                           Servers
Omid - Yahoo! Research                 16
Architecture + Metadata
                                Conflict detection
        Status Oracle
                                 (not replicated)
   ST CT          R LC         HBase values tagged
   10 20          r1 20        with Start TimeStamp

   LowW           Abort
   …              …               Client

                                  ST CT
           HBase                  10 20
   row TS           val           LowW       Abort
   r1     10        hi            …          …
Omid - Yahoo! Research    17
Comparison with Percolator

Status            Omid                 Percolator
Oracle
                                  TS Server


HBase              Clients        BigTable    Clients




Omid - Yahoo! Research       18
Simple API

 § TransactionManager:
        Transaction begin();
        void commit(Transaction t) throws RollbackException;
        void rollback(Transaction t);


 § TTable:
        Result get(Transaction t, Get g);
        void put(Transaction t, Put p);
        ResultScanner getScanner(Transaction t, Scan s);



Omid - Yahoo! Research       19
Example Transaction
Transaction Example
                               >> |
       Status Oracle

   ST CT          R LC
   10 20          r1 20

   LowW           Abort
   …              …                   Client

           HBase                      ST CT
                                      10 20
   row TS           val
   r1  10           hi                LowW     Abort
                                      …        …
Omid - Yahoo! Research    21
Transaction Example
                               >> t = TM.begin()
                               Transaction { ST: 25 }
       Status Oracle
                               >> |
   ST CT          R LC
   10 20          r1 20

   LowW           Abort
   …              …                 Client          t
                                                 ST: 25
           HBase                    ST CT
                                    10 20
   row TS           val
   r1  10           hi              LowW       Abort
                                    …          …
Omid - Yahoo! Research    22
Transaction Example
                               >> t = TM.begin()
                               Transaction { ST: 25 }
       Status Oracle
                               >> TTable.get(t, ‘r1’)
                               ‘hi’
   ST CT          R LC
                               >> |
   10 20          r1 20

   LowW           Abort
   …              …                 Client          t
                                                 ST: 25
           HBase                    ST CT
                                    10 20
   row TS           val
   r1  10           hi              LowW       Abort
                                    …          …
Omid - Yahoo! Research    23
Transaction Example
                               >> t = TM.begin()
                               Transaction { ST: 25 }
        Status Oracle
                               >> TTable.get(t, ‘r1’)
                               ‘hi’
   ST CT          R LC
                               >> TTable.put(t, ‘r1’, ‘bye’)
   10 20          r1 20        >> |

   LowW           Abort
   …              …                  Client            t
                                                   ST: 25
           HBase                    ST CT          R: {r1}
                                    10 20
   row TS           val
   r1  10           hi              LowW         Abort
   r1      25       bye             …            …
Omid - Yahoo! Research    24
Transaction Example
                               >> TTable.get(t, ‘r1’)
                               ‘hi’
        Status Oracle
                               >> TTable.put(t, ‘r1’, ‘bye’)
                               >> TM.commit(t)
   ST CT          R LC
                               Committed{ CT: 30 }
   25 30          r1 30        >> |

   LowW           Abort
   20             …                  Client            t
                                                   ST: 25
           HBase                    ST CT          R: {r1}
                                    10 20
   row TS           val
   r1  10           hi              LowW         Abort
   r1      25       bye             …            …
Omid - Yahoo! Research    25
Transaction Example
                               >> t_old
                               Transaction{ ST: 15 }
        Status Oracle
                               >> TT.put(t_old, ‘r1’, ‘yo’)
                               >> TM.commit(t_old)
   ST CT          R LC
                               Aborted
   25 30          r1 30        >> |

   LowW           Abort
   …              15                 Client         t_old
                                                   ST: 15
           HBase                    ST CT          R: {r1}
                                    10 20
   row TS           val
   r1  15           yo              LowW         Abort
   r1      25       bye             …            …
Omid - Yahoo! Research    26
Centralized Approach




Omid - Yahoo! Research
 27
Omid Performance
                 § Centralized server = bottleneck?
                   • Focus on good performance
                   • In our experiments, it never became the bottleneck
                  30
                         2 rows

                  25
                         4 rows
                         8 rows
                                                                       512 rows/t
                  20
                        16 rows
                        32 rows
                       128 rows
                                                                        1K TPS
Latency in ms




                       512 rows
                                                                         10 ms
                  15

                  10                                                    2 rows/t
                   5                                                   100K TPS
                   0
                                                                         5 ms
                                  1K                10K         100K
                                       Throughput in TPS
                Omid - Yahoo! Research                     28
Fault Tolerance

 § Omid uses BookKeeper for fault tolerance
   • BookKeeper is a distributed Write Ahead Log

 § Recovery: reads log’s tail (bounded time)
                                            Downtime < 25 s
                          18000
      Throughput in TPS




                          15000
                          12000
                           9000
                           6000
                           3000
                              0
                              5900   5950      6000     6050   6100
                                            Time in s
Omid - Yahoo! Research                        29
Example Use Case
News Recommendation System
News Recommendation System

 § Model-based recommendations
   • Similar users belong to a cluster
   • Each cluster has a trained model

 § New article
   • Evaluate against clusters
   • Recommend to users

 § User actions
   • Train model
   • Split cluster

Omid - Yahoo! Research       31
Transactions Advantages

 § All operations are consistent
   • Updates and queries

 § Needed for a recommendation system?
   • We avoid corner cases
   • Implementing existing algorithms is straightforward

 § Problems we solve
   • Two operations concurrently splitting a cluster
   • Query while cluster splits
   • …

Omid - Yahoo! Research        32
Example overview


Articles &
                         Updates             Queries
User actions




                                   Index
                                     Data
                                    Index
                  Wor                Store
                  kers


Omid - Yahoo! Research        33
Other use cases


 § Update indexes incrementally
   • Original Percolator use case


 § Generic graph processing

 § Adapt existing transactional solutions to HBase




Omid - Yahoo! Research       34
Future Work
Current Challenges


 § Load isn’t distributed automatically

 § Complex logic requires big transactions
   • More likely to conflict
   • More expensive to retry


 § API is low level for data processing



Omid - Yahoo! Research         36
Future work
 § Framework for Incremental Processing
   • Simpler API

   • Trigger-based, easy to decompose operations

   • Auto scalable


 § Improve user friendliness
   • Debug tools, metrics, etc


 § Hot failover

Omid - Yahoo! Research           37
Questions?

   All time contributors
           Ben Reed
        Flavio Junqueira
    Francisco Pérez-Sorrosal
                                               Try it!
           Ivan Kelly                  yahoo.github.com/omid
         Matthieu Morel
       Maysam Yabandeh


 Partially supported by
CumuloNimbo project (ICT-257993)
funded by the European Commission
Backup




Omid - Yahoo! Research
 39
Commit Algorithm

 § Receive commit request for txn_i

 § Set CommitTimestamp(txn_i) <= new timestamp

 § For each modified row:
   • if LastCommit(row) > StartTimestamp(txn_i) => abort


 § For each modified row:
   • Set LastCommit(row) <= CommitTimestamp(txn_i)


Omid - Yahoo! Research      40

Más contenido relacionado

Similar a Omid: Efficient Transaction Management and Incremental Processing for HBase (Hadoop Summit Europe 2013)

NewSQL vs NoSQL for New OLTP
NewSQL vs NoSQL for New OLTPNewSQL vs NoSQL for New OLTP
NewSQL vs NoSQL for New OLTPDATAVERSITY
 
Zh Tw Introduction To H Base
Zh Tw Introduction To H BaseZh Tw Introduction To H Base
Zh Tw Introduction To H Basekevin liao
 
hbaseconasia2019 Recent work on HBase at Pinterest
hbaseconasia2019 Recent work on HBase at Pinteresthbaseconasia2019 Recent work on HBase at Pinterest
hbaseconasia2019 Recent work on HBase at PinterestMichael Stack
 
Beware of your Hype Value Stores
Beware of your Hype Value StoresBeware of your Hype Value Stores
Beware of your Hype Value StoresJérémie BORDIER
 
Cacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccCacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccsrisatish ambati
 
A critique of snapshot isolation: eurosys 2012
A critique of snapshot isolation: eurosys 2012A critique of snapshot isolation: eurosys 2012
A critique of snapshot isolation: eurosys 2012Maysam Yabandeh
 
As fast as a grid, as safe as a database
As fast as a grid, as safe as a databaseAs fast as a grid, as safe as a database
As fast as a grid, as safe as a databasegojkoadzic
 
Gunjae_ISCA15_slides.pdf
Gunjae_ISCA15_slides.pdfGunjae_ISCA15_slides.pdf
Gunjae_ISCA15_slides.pdfssuser30e7d2
 
Scaling db infra_pay_pal
Scaling db infra_pay_palScaling db infra_pay_pal
Scaling db infra_pay_palpramod garre
 
Building Distributed Systems With Riak and Riak Core
Building Distributed Systems With Riak and Riak CoreBuilding Distributed Systems With Riak and Riak Core
Building Distributed Systems With Riak and Riak CoreAndy Gross
 
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Ontico
 
Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012Logica_hummingbird
 
Neustar Cassandra Experience
Neustar Cassandra ExperienceNeustar Cassandra Experience
Neustar Cassandra ExperienceNeustar, Inc.
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank:  Rocking the Database World with RocksDBThe Hive Think Tank:  Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDBThe Hive
 
Webinar: How Banks Manage Reference Data with MongoDB
 Webinar: How Banks Manage Reference Data with MongoDB Webinar: How Banks Manage Reference Data with MongoDB
Webinar: How Banks Manage Reference Data with MongoDBMongoDB
 
Rails performance: Ruby GC tweaking
Rails performance: Ruby GC tweaking Rails performance: Ruby GC tweaking
Rails performance: Ruby GC tweaking Dimelo R&D Team
 

Similar a Omid: Efficient Transaction Management and Incremental Processing for HBase (Hadoop Summit Europe 2013) (20)

NewSQL vs NoSQL for New OLTP
NewSQL vs NoSQL for New OLTPNewSQL vs NoSQL for New OLTP
NewSQL vs NoSQL for New OLTP
 
Zh Tw Introduction To H Base
Zh Tw Introduction To H BaseZh Tw Introduction To H Base
Zh Tw Introduction To H Base
 
hbaseconasia2019 Recent work on HBase at Pinterest
hbaseconasia2019 Recent work on HBase at Pinteresthbaseconasia2019 Recent work on HBase at Pinterest
hbaseconasia2019 Recent work on HBase at Pinterest
 
Beware of your Hype Value Stores
Beware of your Hype Value StoresBeware of your Hype Value Stores
Beware of your Hype Value Stores
 
Apache con 2011 gd
Apache con 2011 gdApache con 2011 gd
Apache con 2011 gd
 
Cacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccCacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svcc
 
A critique of snapshot isolation: eurosys 2012
A critique of snapshot isolation: eurosys 2012A critique of snapshot isolation: eurosys 2012
A critique of snapshot isolation: eurosys 2012
 
As fast as a grid, as safe as a database
As fast as a grid, as safe as a databaseAs fast as a grid, as safe as a database
As fast as a grid, as safe as a database
 
Gunjae_ISCA15_slides.pdf
Gunjae_ISCA15_slides.pdfGunjae_ISCA15_slides.pdf
Gunjae_ISCA15_slides.pdf
 
Scaling db infra_pay_pal
Scaling db infra_pay_palScaling db infra_pay_pal
Scaling db infra_pay_pal
 
Building Distributed Systems With Riak and Riak Core
Building Distributed Systems With Riak and Riak CoreBuilding Distributed Systems With Riak and Riak Core
Building Distributed Systems With Riak and Riak Core
 
Usenix lisa 2011
Usenix lisa 2011Usenix lisa 2011
Usenix lisa 2011
 
Timesten Architecture
Timesten ArchitectureTimesten Architecture
Timesten Architecture
 
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
 
Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012Hummingbird - Open Source for Small Satellites - GSAW 2012
Hummingbird - Open Source for Small Satellites - GSAW 2012
 
Introduction to Apache Drill
Introduction to Apache DrillIntroduction to Apache Drill
Introduction to Apache Drill
 
Neustar Cassandra Experience
Neustar Cassandra ExperienceNeustar Cassandra Experience
Neustar Cassandra Experience
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank:  Rocking the Database World with RocksDBThe Hive Think Tank:  Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDB
 
Webinar: How Banks Manage Reference Data with MongoDB
 Webinar: How Banks Manage Reference Data with MongoDB Webinar: How Banks Manage Reference Data with MongoDB
Webinar: How Banks Manage Reference Data with MongoDB
 
Rails performance: Ruby GC tweaking
Rails performance: Ruby GC tweaking Rails performance: Ruby GC tweaking
Rails performance: Ruby GC tweaking
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Omid: Efficient Transaction Management and Incremental Processing for HBase (Hadoop Summit Europe 2013)

  • 1. Omid Efficient Transaction Management and Incremental Processing for HBase Daniel Gómez Ferro 21/03/2013 Copyright © 2013 Yahoo! All rights reserved. No reproduction or distribution allowed without express written permission.
  • 2. About me § Research engineer at Yahoo! § Main Omid developer § Apache S4 committer § Contributor to: • ZooKeeper • HBase Omid - Yahoo! Research 2
  • 3. Outline § Motivation § Goal: transactions on HBase § Architecture § Examples § Future work Omid - Yahoo! Research 3
  • 4. Motivation § Traditional DBMS: § NoSQL stores: • SQL • SQL • Transactions • Transactions • Scalable • Scalable § Some use cases require • Scalability • Consistent updates Omid - Yahoo! Research 4
  • 5. Motivation § Requested feature • Support for transactions in HBase is a common request § Percolator • Google implemented transactions on BigTable § Incremental Processing • MapReduce latencies measured in hours • Reduce latency to seconds • Requires transactions Omid - Yahoo! Research 5
  • 6. Incremental Processing Offline Online MapReduce Incremental Processing Fault tolerance Fault tolerance Scalability Scalability Shared state State0 State1 Shared State Using Percolator, Google dramatically reduced crawl-to-index time Omid - Yahoo! Research 6
  • 8. Omid § ‘Hope’ in Persian § Optimistic Concurrency Control system • Lock free • Aborts transactions at commit time § Implements Snapshot Isolation § Low overhead § http://yahoo.github.com/omid Omid - Yahoo! Research 8
  • 9. Snapshot Isolation § Transactions read from their own snapshot § Snapshot: • Immutable • Identified by creation time • Values committed before creation time § Transactions conflict if two conditions apply: A)  Overlap in time B)  Write to the same row Omid - Yahoo! Research 9
  • 10. Transaction conflicts Id: Time overlap: Write set: A r1 r3 B r2 r4 C r3 r4 D r1 r2 r3 r4 Time § Transaction B overlaps with A and C • B ∩ A = ∅ • B ∩ C = { r4 } • B and C conflict § Transaction D doesn’t conflict Omid - Yahoo! Research 10
  • 12. Architecture 1.  Centralized server 2.  Transactional metadata replicated to clients 3.  Store transaction ids in HBase timestamps Status Oracle (SO) (1) (2) S O Omid Omid Omid Clients HBase Clients Clients HBase HBase HBase Region Region Region Region Servers Servers Servers Servers (3) Omid - Yahoo! Research 12
  • 13. Status Oracle § Limited memory • Evict old metadata • … maintaining consistency guarantees! § Keep LowWatermark • Updated on metadata eviction • Abort transactions older than LowWatermark • Necessary for Garbage Collection Omid - Yahoo! Research 13
  • 14. Transactional Metadata Status Oracle StartTS CommitTS Row LastCommitTS T10 T20 r1 T20 … … … … LowWatermark Aborted T4 T2 T18 … Omid - Yahoo! Research 14
  • 15. Metadata Replication § Transactional metadata is replicated to clients § Status Oracle not in critical path • Minimize overhead § Clients guarantee Snapshot Isolation • Ignore data not in their snapshot • Talk directly to HBase • Conflicts resolved by the Status Oracle § Expensive, but scalable up to 1000 clients Omid - Yahoo! Research 15
  • 16. Architecture recap Status Oracle StartTS CommitTS Row LastCommitTS T10 T20 r1 T20 … … … … LowWatermark Aborted T4 T2 T18 … S O Omid Omid HBase Omid Clients HBase HBase HBase Clients Region Region Region Clients Region Servers Servers Servers Servers Omid - Yahoo! Research 16
  • 17. Architecture + Metadata Conflict detection Status Oracle (not replicated) ST CT R LC HBase values tagged 10 20 r1 20 with Start TimeStamp LowW Abort … … Client ST CT HBase 10 20 row TS val LowW Abort r1 10 hi … … Omid - Yahoo! Research 17
  • 18. Comparison with Percolator Status Omid Percolator Oracle TS Server HBase Clients BigTable Clients Omid - Yahoo! Research 18
  • 19. Simple API § TransactionManager: Transaction begin(); void commit(Transaction t) throws RollbackException; void rollback(Transaction t); § TTable: Result get(Transaction t, Get g); void put(Transaction t, Put p); ResultScanner getScanner(Transaction t, Scan s); Omid - Yahoo! Research 19
  • 21. Transaction Example >> | Status Oracle ST CT R LC 10 20 r1 20 LowW Abort … … Client HBase ST CT 10 20 row TS val r1 10 hi LowW Abort … … Omid - Yahoo! Research 21
  • 22. Transaction Example >> t = TM.begin() Transaction { ST: 25 } Status Oracle >> | ST CT R LC 10 20 r1 20 LowW Abort … … Client t ST: 25 HBase ST CT 10 20 row TS val r1 10 hi LowW Abort … … Omid - Yahoo! Research 22
  • 23. Transaction Example >> t = TM.begin() Transaction { ST: 25 } Status Oracle >> TTable.get(t, ‘r1’) ‘hi’ ST CT R LC >> | 10 20 r1 20 LowW Abort … … Client t ST: 25 HBase ST CT 10 20 row TS val r1 10 hi LowW Abort … … Omid - Yahoo! Research 23
  • 24. Transaction Example >> t = TM.begin() Transaction { ST: 25 } Status Oracle >> TTable.get(t, ‘r1’) ‘hi’ ST CT R LC >> TTable.put(t, ‘r1’, ‘bye’) 10 20 r1 20 >> | LowW Abort … … Client t ST: 25 HBase ST CT R: {r1} 10 20 row TS val r1 10 hi LowW Abort r1 25 bye … … Omid - Yahoo! Research 24
  • 25. Transaction Example >> TTable.get(t, ‘r1’) ‘hi’ Status Oracle >> TTable.put(t, ‘r1’, ‘bye’) >> TM.commit(t) ST CT R LC Committed{ CT: 30 } 25 30 r1 30 >> | LowW Abort 20 … Client t ST: 25 HBase ST CT R: {r1} 10 20 row TS val r1 10 hi LowW Abort r1 25 bye … … Omid - Yahoo! Research 25
  • 26. Transaction Example >> t_old Transaction{ ST: 15 } Status Oracle >> TT.put(t_old, ‘r1’, ‘yo’) >> TM.commit(t_old) ST CT R LC Aborted 25 30 r1 30 >> | LowW Abort … 15 Client t_old ST: 15 HBase ST CT R: {r1} 10 20 row TS val r1 15 yo LowW Abort r1 25 bye … … Omid - Yahoo! Research 26
  • 27. Centralized Approach Omid - Yahoo! Research 27
  • 28. Omid Performance § Centralized server = bottleneck? • Focus on good performance • In our experiments, it never became the bottleneck 30 2 rows 25 4 rows 8 rows 512 rows/t 20 16 rows 32 rows 128 rows 1K TPS Latency in ms 512 rows 10 ms 15 10 2 rows/t 5 100K TPS 0 5 ms 1K 10K 100K Throughput in TPS Omid - Yahoo! Research 28
  • 29. Fault Tolerance § Omid uses BookKeeper for fault tolerance • BookKeeper is a distributed Write Ahead Log § Recovery: reads log’s tail (bounded time) Downtime < 25 s 18000 Throughput in TPS 15000 12000 9000 6000 3000 0 5900 5950 6000 6050 6100 Time in s Omid - Yahoo! Research 29
  • 30. Example Use Case News Recommendation System
  • 31. News Recommendation System § Model-based recommendations • Similar users belong to a cluster • Each cluster has a trained model § New article • Evaluate against clusters • Recommend to users § User actions • Train model • Split cluster Omid - Yahoo! Research 31
  • 32. Transactions Advantages § All operations are consistent • Updates and queries § Needed for a recommendation system? • We avoid corner cases • Implementing existing algorithms is straightforward § Problems we solve • Two operations concurrently splitting a cluster • Query while cluster splits • … Omid - Yahoo! Research 32
  • 33. Example overview Articles & Updates Queries User actions Index Data Index Wor Store kers Omid - Yahoo! Research 33
  • 34. Other use cases § Update indexes incrementally • Original Percolator use case § Generic graph processing § Adapt existing transactional solutions to HBase Omid - Yahoo! Research 34
  • 36. Current Challenges § Load isn’t distributed automatically § Complex logic requires big transactions • More likely to conflict • More expensive to retry § API is low level for data processing Omid - Yahoo! Research 36
  • 37. Future work § Framework for Incremental Processing • Simpler API • Trigger-based, easy to decompose operations • Auto scalable § Improve user friendliness • Debug tools, metrics, etc § Hot failover Omid - Yahoo! Research 37
  • 38. Questions? All time contributors Ben Reed Flavio Junqueira Francisco Pérez-Sorrosal Try it! Ivan Kelly yahoo.github.com/omid Matthieu Morel Maysam Yabandeh Partially supported by CumuloNimbo project (ICT-257993) funded by the European Commission
  • 39. Backup Omid - Yahoo! Research 39
  • 40. Commit Algorithm § Receive commit request for txn_i § Set CommitTimestamp(txn_i) <= new timestamp § For each modified row: • if LastCommit(row) > StartTimestamp(txn_i) => abort § For each modified row: • Set LastCommit(row) <= CommitTimestamp(txn_i) Omid - Yahoo! Research 40