ready completeness is in the eye of the beholder
play

READY: Completeness is in the Eye of the Beholder B. Chandramouli, - PowerPoint PPT Presentation

READY: Completeness is in the Eye of the Beholder B. Chandramouli, J. Gehrke, J. Goldstein, M. Hofmann, D. Kossmann , J. Levandoski, R. Marroquin, W. Xin ETH Zurich, Facebook, Microsoft Observations Observation 1: We produce data in silos


  1. READY: Completeness is in the Eye of the Beholder B. Chandramouli, J. Gehrke, J. Goldstein, M. Hofmann, D. Kossmann , J. Levandoski, R. Marroquin, W. Xin ETH Zurich, Facebook, Microsoft

  2. Observations • Observation 1: We produce data in silos (OLTP databases) • rich update functionality (SQL) • transactions (concurrency & durability) • integrity constraints in silo • principle: maximum control and isolation for high data quality • Observation 2: We consume data across silos (analytics in data lake) • rich query functionality (SQL) • snapshots across silos • integrity constraints across silos • principle: the more data, the merrier

  3. ETL: Implement Producer / Consumer Pipeline Data Producers (OLTP) Data Consumers (OLAP) ERP PowerBI CRM ETL DB DB Data Lake Files

  4. ETL: Implement Producer / Consumer Pipeline Data Producers (OLTP) Data Consumers (OLAP) ERP PowerBI CRM SQL SQL, snapshots, concurrency, ETL integrity integrity DB DB Data Lake Files

  5. What if we produce data in the data lake…? • One (logical) copy of data ERP CRM PowerBI • lower cost to move data • higher freshness • One (logical) system • higher agility & productivity Files DB DB • lower cost (optimization) DB Files

  6. What if we produce data in the data lake…? ERP CRM PowerBI SQL, We need to add integrity concurrency, constraints to data lake! integrity Files DB DB DB Files

  7. Agenda • READY: Basic Concepts • READY 1.0: Implementation (see paper) • Experiments & Results

  8. READY Goals and „CAP Theorem“ • Custom Integrity ERP CRM PowerBI • every app defines its own set of integrity constraints • Sharing • one (logical) copy of data • Decoupling Files DB DB • No application blocked by constraints of another app DB Files • Can only have two of three!

  9. READY Goals • Custom Integrity • every producer and every consumer defines own set of constraints • Sharing • there is only one logical copy of the data • Decoupling • producers are not blocked by consumers • consumers are not blocked by other consumers • „CAP Theorem“: Easy to achieve two of these three goals • DW + ETL achieves „custom integrity“ and „decoupling“ goals. But, not „sharing“. • Data Lake achieves „sharing“ and „decoupling“. But, not „custom integrity“.

  10. Example: Why is it difficult? ● USA Analyst Timeline of Order Process. ○ queries on USA orders 1. Enter(1, car, USA) ○ report only when all USA 2. Enter(2, ball, Germany) orders have shipped 3. Ship(1) 4. Enter(3, ball, Germany) ● Toys Analyst 5. Enter(4, car, USA) ○ queries on Toys orders 6. Ship(2, 3) ○ report only when all Toys 7. Enter(5, ball, Germany) orders have shipped 8. Ship(4)

  11. Example: Why is it difficult? ● USA Analyst Timeline of Order Proc. ○ queries on USA orders 1. Enter(1, car, USA) ○ report only when all USA 2. Enter(2, ball, Germany) orders have shipped 3. Ship(1) 4. Enter(3, ball, Germany) ● Toys Analyst 5. Enter(4, car, USA) Database states ○ queries on Toys orders 6. Ship(2, 3) that meet ○ report only when all Toys 7. Enter(5, ball, Germany) USA Analyst‘s orders have shipped constraint: 3, 4, 8. 8. Ship(4)

  12. Example: Why is it difficult? • USA Analyst Timeline of Order Proc. Database States • queries on USA orders 1. Enter(1, car, USA) that meet Toys Analyst ’ s • report only when all USA 2. Enter(2, ball, Germany) constraints: 1, 6 orders have shipped 3. Ship(1) 4. Enter(3, ball, Germany) • Toys Analyst 5. Enter(4, car, USA) 6. Ship(2, 3) • queries on Toys orders 7. Enter(5, ball, Germany) • report only when all Toys 8. Ship(4) orders have shipped

  13. READY Approach • Each update creates a new version of the data lake • efficient implementation of update batches via „delta materialization“ (see paper) • All applications run in a sandbox • sandbox defines a set of integrity constraints • (sandbox also determines concurrency control policy) • Consumers: sandbox controls which versions are visible • non-compliant versions are not visible to consumer, but possibly to other consumers • query annotation determines which visible version to use (next, last, continuous) • Producers: sandbox controls which versions are legal • non-compliance results in abort of transactions, just as in regular RDBMS • In READY 1.0, there is only one producer sandbox

  14. READY Approach: Temporal Data Lake V4 V1 V2 V3 V5 Producer all versions of data lake • Producer generates new versions independent of consumers • Only requirement: each version meets producers integrity constraints

  15. READY Approach: Visibility of Versions V4 V1 V2 V3 V5 Producer all versions of data lake all versions visible to C1 Consumer1 (versions meet C1’s constraints) • Consumer1 only sees those versions that meets its constraints • does not block producer if producer creates version that is not compliant

  16. READY Approach: Query Annotations V4 V1 V2 V3 V5 Producer all versions of data lake all versions visible to C1 Consumer1 (versions meet C1’s constraints) query (last) • Consumer1 only sees those versions that meets its constraints • Last: use latest visible version to process query

  17. READY Approach: Query Annotations V4 V1 V2 V3 V5 Producer all versions of data lake all versions visible to C1 Consumer1 (versions meet C1’s constraints) query (next) • Consumer1 only sees those versions that meets its constraints • Last: use latest visible version to process query • Next: wait for next visible version to process query

  18. READY Approach: Decoupling V4 V1 V2 V3 V5 Producer all versions of data lake all versions visible to C1 Consumer1 (versions meet C1’s constraints) all versions visible to C2 Consumer2 (versions meet C2’s constraints) • Consumer2 only sees those versions that meet its constraints • may or may not overlap with C1 or any other consumer

  19. Related Work and Concepts • Views • Pro: sandbox is like a view that filters the right version of a record • Con: sandboxes are updateable (producers run in sandboxes) • Con: simpler view definition • Materialized Views, Incremental Maintenance & Streaming • a great way to implement sandboxes • DataHub, Version Control Systems (git), Temporal Databases • right way to think about data lake and visibility of versions

  20. Agenda • READY: Basic Concepts • READY 1.0: Implementation • Experiments & Results

  21. READY 1.0 ● Sandboxes ○ Each transaction / query runs in a sandbox ○ Sandboxes Define: ■ which snapshots of data lake are visible ■ which business objects are visible 21

  22. READY 1.0: Sandbox Syntax CREATE SANDBOX sandboxName ( argname argtype )* [ FOR UPDATES ] [ WHEN predicate ] [ WITH ( relationName: predicate )* ];

  23. READY 1.0: Sandbox Example CREATE SANDBOX noOpenOrderSandbox() WHEN NOT EXISTS (SELECT * FROM Order o WHERE o.o_status = "Open")

  24. READY 1.0: Parameterized Sandbox CREATE SANDBOX completeByNation(:nationId INT) WHEN FORALL (SELECT o.status as s FROM Order o, Customer c WHERE o.o_custkey == c.c_custkey AND c.c_nationkey == :nationId) SATISFY s = "Verified"

  25. READY 1.0: Sandbox Usage BEGIN USING completeByNation("Germany") NEXT; SELECT c.name, count(*) FROM Order o, Customer c WHERE o.o_custkey = c.c_custkey AND c.c_nationkey = "Germany" GROUP BY c.name COMMIT;

  26. READY 1.0: System Overview

  27. READY 1.0: Version Management

  28. READY 1.0: Delta Materialization

  29. READY 1.0: Version Selection (integrity checks) • Batch processing whenever needed • Incremental processing with every new version of data lake • Constraint checks can be expressed as tuple counting Exists: count(S) > 0 FORALL: count(S) = count(p(S)) • Transform constraint checking into: count(post(S)) = count(pre(S)) + count(delta(S))

  30. Agenda • READY: Basic Concepts • READY 1.0: Implementation (see paper) • Experiments & Results

  31. READY Prototype (Runtime System)

  32. TPC-H on READY TPC-H TPC-H Update Queries Functions Synthetic No Integrity constraints Constraints

  33. READY 1.0: Version Management

  34. READY 1.0: Delta Materialization

  35. Experimental Set-Up and Goals • Experiment 1: Measure Cost • study „sharing“ goal • vary number of applications (sandboxes) with synthetic integrity constraints • Experiment 2: Measure Data Freshness • study „decoupling“ goal • vary number of applications (sandboxes) with synthetic integrity constraints • Baselines for all experiments • Global: data warehouse in which all consumers run on single data mart • (conjunction of all sandboxes) • Personal: one data mart for each consumer

  36. Baseline 1: Global Data Warehouse Producer Consumer1 Consumer2 ETL DB DB Sandbox1 AND Sandbox2

  37. Baseline 2: Personal Data Warehouse Consumer1 Producer DB ETL1 Sandbox1 Consumer1 DB ETL2 DB Sandbox1

  38. Exp 1: Cost of TPC-H Update Functions • Cost of Delta Materialization • 8 Sandboxes, vary TPC-H Scaling Factor

  39. Exp 2: Data Freshness (vary SF, sandboxes) SF1 SF10

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend