Top Banner
Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL Replication in Databases and Distributed Systems Course: CS655 Rabiet Louis Colorado State University Thursday 5 December 2013 1 / 43
108

Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

May 07, 2018

Download

Documents

lamkhanh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Replication in Databases and Distributed SystemsCourse: CS655

Rabiet Louis

Colorado State University

Thursday 5 December 2013

1 / 43

Page 2: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

2 / 43

Page 3: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Plan

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

3 / 43

Page 4: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Analysis of replication in DB [GH96]

Hypothesis

All the nodes are suppose to have a copy of the data (nopartition, no scaling up)

Eager and lazy replication are not appropriate solutions [nextslides].

Eager: Synchronization then commit.Lazy: Asynchronous propagation.

Fixed number of objects in the database.

Fixed number of nodes (but may be unavailable).

No delay in communications.

4 / 43

Page 5: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Analysis of replication in DB [GH96]

Hypothesis

All the nodes are suppose to have a copy of the data (nopartition, no scaling up)

Eager and lazy replication are not appropriate solutions [nextslides].

Eager: Synchronization then commit.Lazy: Asynchronous propagation.

Fixed number of objects in the database.

Fixed number of nodes (but may be unavailable).

No delay in communications.

4 / 43

Page 6: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Analysis of replication in DB [GH96]

Hypothesis

All the nodes are suppose to have a copy of the data (nopartition, no scaling up)

Eager and lazy replication are not appropriate solutions [nextslides].

Eager: Synchronization then commit.

Lazy: Asynchronous propagation.

Fixed number of objects in the database.

Fixed number of nodes (but may be unavailable).

No delay in communications.

4 / 43

Page 7: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Analysis of replication in DB [GH96]

Hypothesis

All the nodes are suppose to have a copy of the data (nopartition, no scaling up)

Eager and lazy replication are not appropriate solutions [nextslides].

Eager: Synchronization then commit.Lazy: Asynchronous propagation.

Fixed number of objects in the database.

Fixed number of nodes (but may be unavailable).

No delay in communications.

4 / 43

Page 8: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Analysis of replication in DB [GH96]

Hypothesis

All the nodes are suppose to have a copy of the data (nopartition, no scaling up)

Eager and lazy replication are not appropriate solutions [nextslides].

Eager: Synchronization then commit.Lazy: Asynchronous propagation.

Fixed number of objects in the database.

Fixed number of nodes (but may be unavailable).

No delay in communications.

4 / 43

Page 9: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Analysis of replication in DB [GH96]

Hypothesis

All the nodes are suppose to have a copy of the data (nopartition, no scaling up)

Eager and lazy replication are not appropriate solutions [nextslides].

Eager: Synchronization then commit.Lazy: Asynchronous propagation.

Fixed number of objects in the database.

Fixed number of nodes (but may be unavailable).

No delay in communications.

4 / 43

Page 10: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Analysis of replication in DB [GH96]

Hypothesis

All the nodes are suppose to have a copy of the data (nopartition, no scaling up)

Eager and lazy replication are not appropriate solutions [nextslides].

Eager: Synchronization then commit.Lazy: Asynchronous propagation.

Fixed number of objects in the database.

Fixed number of nodes (but may be unavailable).

No delay in communications.

4 / 43

Page 11: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Just one node.

Node Deadlock Rate ≈ Trans Deadlock Rate ∗ Nb Trans

Prob Deadlock

Lifetime OneTrans

Trans Per sec ∗ Nb Actions ∗ OneAction Time

Prob Deadlock ≈ (Prob Waiting)2 ∗ Nb Trans

5 / 43

Page 12: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Just one node.

Node Deadlock Rate ≈ Trans Deadlock Rate ∗ Nb Trans

Prob Deadlock

Lifetime OneTrans

Trans Per sec ∗ Nb Actions ∗ OneAction Time

Prob Deadlock ≈ (Prob Waiting)2 ∗ Nb Trans

5 / 43

Page 13: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Just one node.

Node Deadlock Rate ≈ Trans Deadlock Rate ∗ Nb Trans

Prob Deadlock

Lifetime OneTrans

Trans Per sec ∗ Nb Actions ∗ OneAction Time

Prob Deadlock ≈ (Prob Waiting)2 ∗ Nb Trans

5 / 43

Page 14: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Just one node.

Node Deadlock Rate ≈ Trans Deadlock Rate ∗ Nb Trans

Prob Deadlock

Lifetime OneTrans

Trans Per sec ∗ Nb Actions ∗ OneAction Time

Prob Deadlock ≈ (Prob Waiting)2 ∗ Nb Trans

5 / 43

Page 15: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Generalization.

Nb Trans’ = Trans Per sec’ ∗ Lifetime OneTrans’

Trans Per sec ∗ Nb Nodes

Nb Actions ∗ OneAction Time ∗ Nb Nodes

Scalability issue

Nb Trans’ in Nb Nodes2 order

6 / 43

Page 16: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Generalization.

Nb Trans’ = Trans Per sec’ ∗ Lifetime OneTrans’

Trans Per sec ∗ Nb Nodes

Nb Actions ∗ OneAction Time ∗ Nb Nodes

Scalability issue

Nb Trans’ in Nb Nodes2 order

6 / 43

Page 17: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Generalization.

Nb Trans’ = Trans Per sec’ ∗ Lifetime OneTrans’

Trans Per sec ∗ Nb Nodes

Nb Actions ∗ OneAction Time ∗ Nb Nodes

Scalability issue

Nb Trans’ in Nb Nodes2 order

6 / 43

Page 18: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Generalization.

Nb Trans’ = Trans Per sec’ ∗ Lifetime OneTrans’

Trans Per sec ∗ Nb Nodes

Nb Actions ∗ OneAction Time ∗ Nb Nodes

Scalability issue

Nb Trans’ in Nb Nodes2 order

6 / 43

Page 19: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Generalization.

Eager Deadlock =Prob Deadlock Eager

Lifetime OneTrans’∗ Nb Trans’

Prob Deadlock Eager ≈ (Prob Waiting)2 ∗ Nb Trans’

Scalability issue

Eager Deadlock in Nb Nodes3 order

7 / 43

Page 20: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Generalization.

Eager Deadlock =Prob Deadlock Eager

Lifetime OneTrans’∗ Nb Trans’

Prob Deadlock Eager ≈ (Prob Waiting)2 ∗ Nb Trans’

Scalability issue

Eager Deadlock in Nb Nodes3 order

7 / 43

Page 21: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Eager Replication

Generalization.

Eager Deadlock =Prob Deadlock Eager

Lifetime OneTrans’∗ Nb Trans’

Prob Deadlock Eager ≈ (Prob Waiting)2 ∗ Nb Trans’

Scalability issue

Eager Deadlock in Nb Nodes3 order

7 / 43

Page 22: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Group Replication

Motivation

scalable.

support disconnection of nodes.

Reminder

Any node can update data (no master) = Group Replication.

Reconciliation of conflict (timestamps are used) is needed (nodeadlock in lazy group schema).

8 / 43

Page 23: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Group Replication

Motivation

scalable.

support disconnection of nodes.

Reminder

Any node can update data (no master) = Group Replication.

Reconciliation of conflict (timestamps are used) is needed (nodeadlock in lazy group schema).

8 / 43

Page 24: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Group Replication

Motivation

scalable.

support disconnection of nodes.

Reminder

Any node can update data (no master) = Group Replication.

Reconciliation of conflict (timestamps are used) is needed (nodeadlock in lazy group schema).

8 / 43

Page 25: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Group Replication

Motivation

scalable.

support disconnection of nodes.

Reminder

Any node can update data (no master) = Group Replication.

Reconciliation of conflict (timestamps are used) is needed (nodeadlock in lazy group schema).

8 / 43

Page 26: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Group Replication

Motivation

scalable.

support disconnection of nodes.

Reminder

Any node can update data (no master) = Group Replication.

Reconciliation of conflict (timestamps are used) is needed (nodeadlock in lazy group schema).

8 / 43

Page 27: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Group Replication

Lazy Reconcialiation Rate = Prob Collision ∗ Nb Nodes

Disconnection Time

Inbound Updates ∗ Outbound Updates

DB Size

(in o(Nb Nodes))

in o(Nb Nodes)

9 / 43

Page 28: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Group Replication

Lazy Reconcialiation Rate = Prob Collision ∗ Nb Nodes

Disconnection Time

Inbound Updates ∗ Outbound Updates

DB Size

(in o(Nb Nodes))

in o(Nb Nodes)

9 / 43

Page 29: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Master

A master is assigned to each object.

Conflict are in o(Nb Nodes2).

No support for disconnection.

10 / 43

Page 30: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Master

A master is assigned to each object.

Conflict are in o(Nb Nodes2).

No support for disconnection.

10 / 43

Page 31: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Lazy Master

A master is assigned to each object.

Conflict are in o(Nb Nodes2).

No support for disconnection.

10 / 43

Page 32: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Two-Tier Replication

Slight modification of the lazy master replication schema.

Restriction: at most a mobile node is involved in thetransaction.

A mobile (in the case where it is the master) while connect toa base node (that contains a replica of the data) and willupdate his content with this new data.

11 / 43

Page 33: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Two-Tier Replication

Slight modification of the lazy master replication schema.

Restriction: at most a mobile node is involved in thetransaction.

A mobile (in the case where it is the master) while connect toa base node (that contains a replica of the data) and willupdate his content with this new data.

11 / 43

Page 34: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Two-Tier Replication

Slight modification of the lazy master replication schema.

Restriction: at most a mobile node is involved in thetransaction.

A mobile (in the case where it is the master) while connect toa base node (that contains a replica of the data) and willupdate his content with this new data.

11 / 43

Page 35: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Plan

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

12 / 43

Page 36: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Motivation

Databases and distributed systems use replication.

One for Performance. One for failure resilience.

Idea is to compare them.

13 / 43

Page 37: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Motivation

Databases and distributed systems use replication.

One for Performance. One for failure resilience.

Idea is to compare them.

13 / 43

Page 38: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Motivation

Databases and distributed systems use replication.

One for Performance. One for failure resilience.

Idea is to compare them.

13 / 43

Page 39: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

5 Phases in replication

Request.

Server Coordination.

Execution.

Agreement Coordination.

Response.

14 / 43

Page 40: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

5 Phases in replication

Request.

Server Coordination.

Execution.

Agreement Coordination.

Response.

14 / 43

Page 41: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

5 Phases in replication

Request.

Server Coordination.

Execution.

Agreement Coordination.

Response.

14 / 43

Page 42: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

5 Phases in replication

Request.

Server Coordination.

Execution.

Agreement Coordination.

Response.

14 / 43

Page 43: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

5 Phases in replication

Request.

Server Coordination.

Execution.

Agreement Coordination.

Response.

14 / 43

Page 44: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Distributed System replication

Active replication.

Passive replication.

Semi-active replication.

15 / 43

Page 45: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Distributed System replication

Active replication.

Passive replication.

Semi-active replication.

15 / 43

Page 46: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Distributed System replication

Active replication.

Passive replication.

Semi-active replication.

15 / 43

Page 47: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Database replication One operation.

Eager primary copy.

Eager update everywherewith distributed locking.

Eager update everywherebased on atomic broadcast.

Lazy update everywhere.

16 / 43

Page 48: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Database replication One operation.

Eager primary copy.

Eager update everywherewith distributed locking.

Eager update everywherebased on atomic broadcast.

Lazy update everywhere.

16 / 43

Page 49: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Database replication One operation.

Eager primary copy.

Eager update everywherewith distributed locking.

Eager update everywherebased on atomic broadcast.

Lazy update everywhere.

16 / 43

Page 50: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Database replication One operation.

Eager primary copy.

Eager update everywherewith distributed locking.

Eager update everywherebased on atomic broadcast.

Lazy update everywhere.

16 / 43

Page 51: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Database replication Several operations.

Eager primary copy.

Eager update everywherewith distributed locking.

Certification replication.

17 / 43

Page 52: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Database replication Several operations.

Eager primary copy.

Eager update everywherewith distributed locking.

Certification replication.

17 / 43

Page 53: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Database replication Several operations.

Eager primary copy.

Eager update everywherewith distributed locking.

Certification replication.

17 / 43

Page 54: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Plan

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

18 / 43

Page 55: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Application [hHBR+04]

Interested in recovery.

Precise > Rollback > Gap.

Streams of data.

Pairs of primary/secondary.

19 / 43

Page 56: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Application [hHBR+04]

Interested in recovery.

Precise > Rollback > Gap.

Streams of data.

Pairs of primary/secondary.

19 / 43

Page 57: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Application [hHBR+04]

Interested in recovery.

Precise > Rollback > Gap.

Streams of data.

Pairs of primary/secondary.

19 / 43

Page 58: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Application [hHBR+04]

Interested in recovery.

Precise > Rollback > Gap.

Streams of data.

Pairs of primary/secondary.

19 / 43

Page 59: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Gap Recovery

In case of failure or partial communication, just ignore thequeries.

Called amnesia.

No recovery.

20 / 43

Page 60: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Gap Recovery

In case of failure or partial communication, just ignore thequeries.

Called amnesia.

No recovery.

20 / 43

Page 61: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Gap Recovery

In case of failure or partial communication, just ignore thequeries.

Called amnesia.

No recovery.

20 / 43

Page 62: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Passive standby

Sending the input queues, operators and output queues to thesecondary node.

To avoid suspension during check-pointing: sweep line.

Strongest property for recovery.

21 / 43

Page 63: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Passive standby

Sending the input queues, operators and output queues to thesecondary node.

To avoid suspension during check-pointing: sweep line.

Strongest property for recovery.

21 / 43

Page 64: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Passive standby

Sending the input queues, operators and output queues to thesecondary node.

To avoid suspension during check-pointing: sweep line.

Strongest property for recovery.

21 / 43

Page 65: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Upstream backup

Upstream nodes act as backup for downstream nodes.

22 / 43

Page 66: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Upstream backup

Upstream nodes act as backup for downstream nodes.

22 / 43

Page 67: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Upstream backup

Upstream nodes act as backup for downstream nodes.

22 / 43

Page 68: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Active standby

Same as passive standby except that upstream secondarynodes receive the tuples and are processing it.

Because of non deterministic operators, input must berecorded to keep the relation input,output.

23 / 43

Page 69: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Active standby

Same as passive standby except that upstream secondarynodes receive the tuples and are processing it.

Because of non deterministic operators, input must berecorded to keep the relation input,output.

23 / 43

Page 70: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Some extensions to make precise recovery

Passive standby: verification with downstream nodes.

Active standby: distribute information to replay operations.

Upstream Backup: using the watermarks.

24 / 43

Page 71: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Some extensions to make precise recovery

Passive standby: verification with downstream nodes.

Active standby: distribute information to replay operations.

Upstream Backup: using the watermarks.

24 / 43

Page 72: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Some extensions to make precise recovery

Passive standby: verification with downstream nodes.

Active standby: distribute information to replay operations.

Upstream Backup: using the watermarks.

24 / 43

Page 73: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Experimentation

recovery time bandwith overhead processing overhead

Amnesia 0 0 0

Passive K + Qp f1(1/M,C) f2(1/M,C)

Upstream K + Q ′p f3(1/M, c) f4(1/M, ops, paths)

Active ε 100% + f3(1/M, c) 100% + 2 ∗ f4(1/M, ops, paths)

25 / 43

Page 74: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Plan

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

26 / 43

Page 75: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

Commutativity =⇒ Convergence simpler

27 / 43

Page 76: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

SEC (Strong eventual Consistency).

Eventual delivery ∀i , j , f ∈ ci =⇒ 3f ∈ cjStrong convergence ∀i , j , ci ∈ cj =⇒ si ≡ sjTermination

Without any conflict resolution.

n − 1 failures possibles.

28 / 43

Page 77: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

SEC (Strong eventual Consistency).

Eventual delivery ∀i , j , f ∈ ci =⇒ 3f ∈ cj

Strong convergence ∀i , j , ci ∈ cj =⇒ si ≡ sjTermination

Without any conflict resolution.

n − 1 failures possibles.

28 / 43

Page 78: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

SEC (Strong eventual Consistency).

Eventual delivery ∀i , j , f ∈ ci =⇒ 3f ∈ cjStrong convergence ∀i , j , ci ∈ cj =⇒ si ≡ sj

Termination

Without any conflict resolution.

n − 1 failures possibles.

28 / 43

Page 79: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

SEC (Strong eventual Consistency).

Eventual delivery ∀i , j , f ∈ ci =⇒ 3f ∈ cjStrong convergence ∀i , j , ci ∈ cj =⇒ si ≡ sjTermination

Without any conflict resolution.

n − 1 failures possibles.

28 / 43

Page 80: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

SEC (Strong eventual Consistency).

Eventual delivery ∀i , j , f ∈ ci =⇒ 3f ∈ cjStrong convergence ∀i , j , ci ∈ cj =⇒ si ≡ sjTermination

Without any conflict resolution.

n − 1 failures possibles.

28 / 43

Page 81: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

SEC (Strong eventual Consistency).

Eventual delivery ∀i , j , f ∈ ci =⇒ 3f ∈ cjStrong convergence ∀i , j , ci ∈ cj =⇒ si ≡ sjTermination

Without any conflict resolution.

n − 1 failures possibles.

28 / 43

Page 82: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Examples of CDRT

Vectors counters.

(Nn, [0, ..., 0],≥n, value, inc,maxn)

if pi can only update the i-th element in the vector ≡ vector-clock

29 / 43

Page 83: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Sufficient condition

Eventual delivery

Termination

Monotonic semi-lattice

=⇒ SEC

30 / 43

Page 84: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Treedoc: Cooperative editing

Treedoc [PMSL09]

c

b

a

0

0

e

d

0

f

1

1

31 / 43

Page 85: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Treedoc: Cooperative editing

Treedoc [PMSL09]

c

b

a

0

0

e

d

0

f

1

1

dC

dB

dA

dE

dD dF

32 / 43

Page 86: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Treedoc: Cooperative editing

Treedoc [PMSL09]

33 / 43

Page 87: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Plan

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

34 / 43

Page 88: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Hybrid Quorum [CML+06]

Use a quick quorum if no contention.

BFT [CL02] if contention.

Combine quorum and agreement based state-machinereplication.

35 / 43

Page 89: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Hybrid Quorum [CML+06]

Use a quick quorum if no contention.

BFT [CL02] if contention.

Combine quorum and agreement based state-machinereplication.

35 / 43

Page 90: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Hybrid Quorum [CML+06]

Use a quick quorum if no contention.

BFT [CL02] if contention.

Combine quorum and agreement based state-machinereplication.

35 / 43

Page 91: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Normal Case

Write operations = 2 phases.

Read operations = 1 phase

3f + 1 replica.

Phase Write1 = timestamp t obtained using a quorum.

Phase Write2 = Execution (2f + 1 must agree to execute theoperation at t).

36 / 43

Page 92: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Normal Case

Write operations = 2 phases.

Read operations = 1 phase

3f + 1 replica.

Phase Write1 = timestamp t obtained using a quorum.

Phase Write2 = Execution (2f + 1 must agree to execute theoperation at t).

36 / 43

Page 93: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Normal Case

Write operations = 2 phases.

Read operations = 1 phase

3f + 1 replica.

Phase Write1 = timestamp t obtained using a quorum.

Phase Write2 = Execution (2f + 1 must agree to execute theoperation at t).

36 / 43

Page 94: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Normal Case

Write operations = 2 phases.

Read operations = 1 phase

3f + 1 replica.

Phase Write1 = timestamp t obtained using a quorum.

Phase Write2 = Execution (2f + 1 must agree to execute theoperation at t).

36 / 43

Page 95: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Normal Case

Write operations = 2 phases.

Read operations = 1 phase

3f + 1 replica.

Phase Write1 = timestamp t obtained using a quorum.

Phase Write2 = Execution (2f + 1 must agree to execute theoperation at t).

36 / 43

Page 96: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Contention

if Write2 has been completed, it is still assigned.

if Write1 has obtained t then the operation will be executedat t ′ ≥ t

37 / 43

Page 97: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Contention

if Write2 has been completed, it is still assigned.

if Write1 has obtained t then the operation will be executedat t ′ ≥ t

37 / 43

Page 98: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Plan

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

38 / 43

Page 99: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

3 Applicable only on commutative operations.

3 Not many use cases?

39 / 43

Page 100: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

CRDT

3 Applicable only on commutative operations.

3 Not many use cases?

39 / 43

Page 101: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Streaming

3 Number of replica = 2.

Checkpointing.

Load Balancing between the two nodes.

Several loops (image processing).

Path exploration.

40 / 43

Page 102: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Streaming

3 Number of replica = 2.

Checkpointing.

Load Balancing between the two nodes.

Several loops (image processing).

Path exploration.

40 / 43

Page 103: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Streaming

3 Number of replica = 2.

Checkpointing.

Load Balancing between the two nodes.

Several loops (image processing).

Path exploration.

40 / 43

Page 104: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Streaming

3 Number of replica = 2.

Checkpointing.

Load Balancing between the two nodes.

Several loops (image processing).

Path exploration.

40 / 43

Page 105: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Streaming

3 Number of replica = 2.

Checkpointing.

Load Balancing between the two nodes.

Several loops (image processing).

Path exploration.

40 / 43

Page 106: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Plan

1 Eager and lazy replications

2 Databases and distributed systems

3 Streaming application

4 CRDTTreedoc: Cooperative editing

5 Hybrid Replication

6 Thoughts

7 CCL

41 / 43

Page 107: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Eager and lazy replications Databases and distributed systems Streaming application CRDT Hybrid Replication Thoughts CCL

Conclusion

Thank You for your attention !

42 / 43

Page 108: Replication in Databases and Distributed Systems - …cs655/lectures/CS655-Louis_Rabiet...Replication in Databases and Distributed Systems Course: CS655 ... Trans Per sec Nb Actions

Bibliography

Miguel Castro and Barbara Liskov.

Practical byzantine fault tolerance and proactive recovery.ACM Trans. Comput. Syst., 20(4):398–461, November 2002.

James Cowling, Daniel Myers, Barbara Liskov, Rodrigo Rodrigues, and Liuba Shrira.

Hq replication: A hybrid quorum protocol for byzantine fault tolerance.In Proceedings of the 7th Symposium on Operating Systems Design and Implementation, OSDI ’06, pages177–190, Berkeley, CA, USA, 2006. USENIX Association.

Jim Gray and Pat Helland.

The dangers of replication and a solution.In In Proceedings of the 1996 ACM SIGMOD International Conference on Management of Data, pages173–182, 1996.

Jeong hyon Hwang, Magdalena Balazinska, Er Rasin, Michael Stonebraker, and Stan Zdonik.

High-availability algorithms for distributed stream processing.Technical report, 2004.

Nuno Preguica, Joan Manuel Marques, Marc Shapiro, and Mihai Letia.

A commutative replicated data type for cooperative editing.In Proceedings of the 2009 29th IEEE International Conference on Distributed Computing Systems, ICDCS’09, pages 395–403, Washington, DC, USA, 2009. IEEE Computer Society.

Marc Shapiro, Nuno Preguica, Carlos Baquero, and Marek Zawirski.

Conflict-free replicated data types.In Proceedings of the 13th International Conference on Stabilization, Safety, and Security of DistributedSystems, SSS’11, pages 386–400, Berlin, Heidelberg, 2011. Springer-Verlag.

Matthias Wiesmann, Fernando Pedone, Andre Schiper, Betina Kemme, and Gustavo Alonso.

Understanding replication in databases and distributed systems.pages 264–274, 2000.