geo replication geo replication
play

GEO-REPLICATION GEO-REPLICATION 150 ms SYNC DC2 DC2 DC1 DC1 - PowerPoint PPT Presentation

INTERNET SERVICES NOWADAYS Services operate on a global scale. PUTTING CONSISTENCY BACK An unprecedented number of people are using INTO EVENTUAL CONSISTENCY internet services. Valter Balegas, Srgio Duarte, Carla Ferreira, Rodrigo


  1. INTERNET SERVICES NOWADAYS • Services operate on a global scale. PUTTING CONSISTENCY BACK • An unprecedented number of people are using INTO EVENTUAL CONSISTENCY internet services. Valter Balegas, Sérgio Duarte, Carla Ferreira, Rodrigo Rodrigues, Nuno Preguiça NOVA LINCS / U. Nova de Lisboa Mahsa Najafzadeh, Marc Shapiro INRIA, LIP6 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 2 GEO-REPLICATION GEO-REPLICATION 150 ms SYNC DC2 DC2 DC1 DC1 20 ms 20 ms 3 4 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15

  2. GEO-REPLICATION GEO-REPLICATION DC2 DC2 DC1 DC1 enroll(Pac-man, A) Player Tournament Player Tournament Player Tournament Player Tournament A Sonic A A Sonic A Sonic Sonic Pac-man B Pac-man B Pac-man B Pac-man B Mario Mario Mario Mario Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 5 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 6 GEO-REPLICATION GEO-REPLICATION DC2 DC2 DC1 DC1 enroll(Mario, A) removeTournament(A) Tournament Player Tournament Tournament Player Tournament Player Player Sonic A Sonic A Sonic A Sonic A B Pac-man B B Pac-man B Pac-man Pac-man Mario Mario Mario Mario 7 8 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15

  3. GEO-REPLICATION GEO-REPLICATION SYNC DC2 DC2 DC1 DC1 removeTournament(A) Player Tournament Player Tournament Player Tournament Player Tournament A Sonic A Sonic Sonic Sonic Pac-man B Pac-man B Pac-man B Pac-man B Mario Mario Mario Mario Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 9 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 10 GEO-REPLICATION STRONG CONSISTENCY enroll(Mario, A) DC2 DC1 DC1 Mario is enrolled in SYNC SYNC SYNC tournament that was concurrently removed. DC2 enroll(Pac-man, A) removeTournament(A) Tournament Player Tournament Player Ordering of operations: Sonic Sonic B Pac-man B Pac-man enroll(Pac-man, A) enroll(Mario, A) removeTournament(A) Mario Mario 11 12 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15

  4. OUTLINE IS COORDINATION NEEDED? enroll(Mario, A) • Background Local operation Low latency J • Explicit Consistency • Indigo DC1 SYNC • Evaluation DC2 • Conclusion enroll(Pac-man, A) removeTournament(A) Ordering of operations: removeTournament(A) enroll(Mario, A) enroll(Pac-man, A) Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 13 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 14 A METHODOLOGY FOR EXPLICIT CONSISTENCY EXPLICIT CONSISTENCY • Identify I-offenders • Programmer specifies application invariant. – Static analysis identifies operations that may break invariants when executed concurrently. • System ensures that every state transition preserves the invariant. • Choose reservations – Efficient mechanism to execute I-offenders avoiding coordination. • Opportunity to improve performance by not restricting execution ordering. • Instrument application code with selected mechanism. 15 16 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15

  5. A METHODOLOGY FOR STATIC ANALYSIS: APPLICATION MODEL EXPLICIT CONSISTENCY • Identify I-offenders • Programmer specifies: – Static analysis identifies operations that may break – Invariant: invariants when executed concurrently. “Players can only participate in existing tournaments.” Inv = enrolled(p,t) � player(p) � tournament(t) • Choose reservations – Efficient mechanism to execute I-offenders avoiding coordination. – Operations’ side effects: enroll (p,t): { enrolled (p,t) := true } • Instrument application code with selected mechanism. removeTournament(t): { tournament (t) := false} Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 17 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 18 A METHODOLOGY FOR STATIC ANALYSIS: ALGORITHM EXPLICIT CONSISTENCY • Identify I-offenders Inv = enrolled (p,t) � player (p) � tournament (t) Use SMT Solver to – Static analysis identifies operations that may break test all pairs of Inv = true � player (p) � tournament (t) operations. invariants when executed concurrently. enroll(p,t) • Choose reservations Inv = true Inv = false – Efficient mechanism to execute I-offenders avoiding coordination. Inv = true � false removeTournament(t) Inv = enrolled(p,t) � false • Instrument application code with selected mechanism. 19 20 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15

  6. RESERVATIONS RESERVATIONS: MULTI-LEVEL LOCK • Mechanisms to control the execution of I-offenders • Protects the execution of conflicting without breaking invariants. operations. • Coordination outside the operation flow. • Only allow the execution of one type of • Different reservations for different invariants: operation at a time. Invariant type Reservation Generic Multi-level Lock Numeric Escrow • Operation can be executed by multiple clients Referential Integrity Multi-level Lock Uniqueness UID Generator that hold the lock. Disjunction Multi-level Mask Range partition Partition Lock Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 21 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 22 RESERVATIONS: EXAMPLE RESERVATIONS: EXAMPLE DC2 DC2 DC1 DC1 enroll(Pac-man, A) Player Tournament Player Tournament Player Tournament Player Tournament Sonic Sonic A Sonic Sonic A A A Pac-man B Pac-man B Pac-man B Pac-man B Mario Mario Mario Mario DC1 DC2 DC1 DC2 DC1 DC2 DC1 DC2 ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) 23 24 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15

  7. RESERVATIONS: EXAMPLE RESERVATIONS: EXAMPLE DC2 DC2 DC1 DC1 enroll(Pac-man, A) enroll(Mario, A) Player Tournament Player Tournament Player Tournament Player Tournament Sonic A Sonic A Sonic A Sonic A Pac-man B Pac-man B Pac-man B Pac-man B Mario Mario Mario Mario DC1 DC2 DC1 DC2 DC1 DC2 DC1 DC2 ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 25 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 26 26 RESERVATIONS: EXAMPLE RESERVATIONS: EXAMPLE DC2 DC2 DC1 DC1 removeTournament(A) enroll(Mario, A) Player Tournament Player Tournament Player Tournament Player Tournament Sonic Sonic A Sonic Sonic A A A Pac-man B Pac-man B Pac-man B Pac-man B Mario Mario Mario Mario DC1 DC2 DC1 DC2 DC1 DC2 DC1 DC2 ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) ENROLL(*,A) 27 28 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15 Valter Balegas – NOVA LINCS, FCT-UNL - Putting Consistency Back Into Eventual Consistency @ Eurosys'15

Recommend


More recommend