Specifjcation and Implementation of Replicated List The Jupiter - - PowerPoint PPT Presentation

specifjcation and implementation of replicated list
SMART_READER_LITE
LIVE PREVIEW

Specifjcation and Implementation of Replicated List The Jupiter - - PowerPoint PPT Presentation

. . . . . . . . . . . . . . . . Specifjcation and Implementation of Replicated List The Jupiter Protocol Revisited (OPODIS2018) Hengfeng Wei , Yu Huang, Jian Lu Nanjing University December 17, 2018 Hengfeng Wei (Nanjing


slide-1
SLIDE 1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Specifjcation and Implementation of Replicated List

— The Jupiter Protocol Revisited (OPODIS’2018)

Hengfeng Wei, Yu Huang, Jian Lu

Nanjing University

December 17, 2018

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 1 / 32

slide-2
SLIDE 2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The Main Contribution

The Jupiter protocol [Nichols et al., 1995]a for replicated list satisfjes the weak list specifjcation [Attiya et al., 2016]b.

aDavid A. Nichols et al. (1995). “High-latency, Low-bandwidth

Windowing in the Jupiter Collaboration System”. In: Proceedings of the 8th Annual ACM Symposium on User Interface and Software Technology. UIST ’95. ACM, pp. 111–120.

bHagit Attiya et al. (2016). “Specifjcation and complexity of

collaborative text editing”. In: Proceedings of the 2016 ACM Symposium on Principles of Distributed Computing. PODC ’16. ACM, pp. 259–268.

This was proposed as a conjecture in a PODC paper [Attiya et al., 2016].

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 2 / 32

slide-3
SLIDE 3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The Main Contribution

The Jupiter protocol [Nichols et al., 1995]a for replicated list satisfjes the weak list specifjcation [Attiya et al., 2016]b.

aDavid A. Nichols et al. (1995). “High-latency, Low-bandwidth

Windowing in the Jupiter Collaboration System”. In: Proceedings of the 8th Annual ACM Symposium on User Interface and Software Technology. UIST ’95. ACM, pp. 111–120.

bHagit Attiya et al. (2016). “Specifjcation and complexity of

collaborative text editing”. In: Proceedings of the 2016 ACM Symposium on Principles of Distributed Computing. PODC ’16. ACM, pp. 259–268.

This was proposed as a conjecture in a PODC paper [Attiya et al., 2016].

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 2 / 32

slide-4
SLIDE 4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Outline

  • 1. Why do we care about replicated list?
  • 2. What is the weak list specifjcation

weak?

  • 3. How does the Jupiter protocol work?
  • 4. How to prove that Jupiter satisfjes

weak?

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 3 / 32

slide-5
SLIDE 5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Outline

  • 1. Why do we care about replicated list?
  • 2. What is the weak list specifjcation

weak?

  • 3. How does the Jupiter protocol work?
  • 4. How to prove that Jupiter satisfjes

weak?

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 3 / 32

slide-6
SLIDE 6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Outline

  • 1. Why do we care about replicated list?
  • 2. What is the weak list specifjcation Aweak?
  • 3. How does the Jupiter protocol work?
  • 4. How to prove that Jupiter satisfjes

weak?

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 3 / 32

slide-7
SLIDE 7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Outline

  • 1. Why do we care about replicated list?
  • 2. What is the weak list specifjcation Aweak?
  • 3. How does the Jupiter protocol work?
  • 4. How to prove that Jupiter satisfjes

weak?

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 3 / 32

slide-8
SLIDE 8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Outline

  • 1. Why do we care about replicated list?
  • 2. What is the weak list specifjcation Aweak?
  • 3. How does the Jupiter protocol work?
  • 4. How to prove that Jupiter satisfjes Aweak?

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 3 / 32

slide-9
SLIDE 9

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Replicated List

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 4 / 32

slide-10
SLIDE 10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Replicated Collaborative Text Editing Systems

(a) Google Docs (b) Apache Wave (c) Wikipedia (d) L

A

T EX Editor

Replicas are required to respond to user operations immediately. Updates are propagated to other replicas asynchronously.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 5 / 32

slide-11
SLIDE 11

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Replicated list object: to model the core functionality

Ins(a, p) : Insert a at position p. Del(p) : Delete the element at position p. Read : Return the list.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 6 / 32

slide-12
SLIDE 12

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Weak List Specifjcation

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 7 / 32

slide-13
SLIDE 13

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Defjnition (Weak List Specifjcation Aweak [Attiya et al., 2016]) Informally, Aweak requires the ordering between elements that are not deleted to be consistent across the system.

Specify a global property on all states across the system.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 8 / 32

slide-14
SLIDE 14

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

We show that Aweak can be rephrased as

Defjnition (Pairwise State Compatibility Property) For any pair of list states, there cannot be two elements a and b such that a precedes b in one state but b precedes a in the other.

σ0 : ab σ1 : ba a b σ0 : ab σ1 : ba

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 9 / 32

slide-15
SLIDE 15

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Jupiter

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 10 / 32

slide-16
SLIDE 16

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Jupiter adopts the client-server architecture [Nichols et al., 1995]: (n + 1) replicas ≜ (n) Client + (1) Server

S C1 C2 C3 User

Issue Ops Respond Immed.

Client

FIFO Updates

Server

FIFO Updates

Other Clients

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 11 / 32

slide-17
SLIDE 17

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Jupiter adopts the client-server architecture [Nichols et al., 1995]: (n + 1) replicas ≜ (n) Client + (1) Server

S C1 C2 C3

1 2 3 4

2 2 1 1 3 3 4 4

User

Issue Ops

− − − − − − − − − − − →

Respond Immed.

Client

FIFO

− − − − − − − →

Updates

Server

FIFO

− − − − − − − →

Updates

Other Clients

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 11 / 32

slide-18
SLIDE 18

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Challenge: Confmicts caused by concurrent operations

(The server is not drawn.)

efecte efecte

Ins Del

efgecte efect

Ins Del

efgece efgect efecte efecte

Ins Del

efgecte efect

Ins Del

efgect efgect Solution: Operational Transformation (OT) [Ellis and Gibbs, 1989]

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 12 / 32

slide-19
SLIDE 19

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Challenge: Confmicts caused by concurrent operations

(The server is not drawn.)

efecte

C1

efecte

C2

Ins Del

efgecte efect

Ins Del

efgece efgect efecte efecte

Ins Del

efgecte efect

Ins Del

efgect efgect Solution: Operational Transformation (OT) [Ellis and Gibbs, 1989]

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 12 / 32

slide-20
SLIDE 20

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Challenge: Confmicts caused by concurrent operations

(The server is not drawn.)

efecte

C1

efecte

C2

  • 1 = Ins(f, 1)
  • 2 = Del(5)

efgecte efect

Ins Del

efgece efgect efecte efecte

Ins Del

efgecte efect

Ins Del

efgect efgect Solution: Operational Transformation (OT) [Ellis and Gibbs, 1989]

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 12 / 32

slide-21
SLIDE 21

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Challenge: Confmicts caused by concurrent operations

(The server is not drawn.)

efecte

C1

efecte

C2

  • 1 = Ins(f, 1)
  • 2 = Del(5)

efgecte efect

1 = Ins(f, 1)

2 = Del(5)

efgece efgect efecte efecte

Ins Del

efgecte efect

Ins Del

efgect efgect Solution: Operational Transformation (OT) [Ellis and Gibbs, 1989]

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 12 / 32

slide-22
SLIDE 22

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Challenge: Confmicts caused by concurrent operations

(The server is not drawn.)

efecte

C1

efecte

C2

  • 1 = Ins(f, 1)
  • 2 = Del(5)

efgecte efect

1 = Ins(f, 1)

2 = Del(5)

efgece efgect efecte

C1

efecte

C2

  • 1 = Ins(f, 1)
  • 2 = Del(5)

efgecte efect

Ins Del

efgect efgect Solution: Operational Transformation (OT) [Ellis and Gibbs, 1989]

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 12 / 32

slide-23
SLIDE 23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Challenge: Confmicts caused by concurrent operations

(The server is not drawn.)

efecte

C1

efecte

C2

  • 1 = Ins(f, 1)
  • 2 = Del(5)

efgecte efect

1 = Ins(f, 1)

2 = Del(5)

efgece efgect efecte

C1

efecte

C2

  • 1 = Ins(f, 1)
  • 2 = Del(5)

efgecte efect

1 = Ins(f, 1)

2 = Del(6)

efgect efgect Solution: Operational Transformation (OT) [Ellis and Gibbs, 1989]

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 12 / 32

slide-24
SLIDE 24

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

σ

  • 1
  • 2

2 = OT(o2, o1)

1 = OT(o1, o2)

Commutative:

σ; o1; o′

2 ≡ σ; o2; o′ 1

[Ellis and Gibbs, 1989]

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 13 / 32

slide-25
SLIDE 25

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Q : What if replicas diverge by ≥ 2 steps?

0123 123 13

Del(0) Del(1) Del(3) Del Del Del Del

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 14 / 32

slide-26
SLIDE 26

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Q : What if replicas diverge by ≥ 2 steps?

0123 123 13

Del(0) Del(1)

012

Del(3) Del Del Del Del

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 14 / 32

slide-27
SLIDE 27

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Q : What if replicas diverge by ≥ 2 steps?

0123 123 13

Del(0) Del(1)

012

Del(3)

12

Del(2) Del(0) Del Del

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 14 / 32

slide-28
SLIDE 28

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Q : What if replicas diverge by ≥ 2 steps?

0123 123 13

Del(0) Del(1)

012

Del(3)

1 12

Del(2) Del(0) Del(1) Del(1)

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 14 / 32

slide-29
SLIDE 29

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Key Challenge to Solve: When a replica r receives an operation o from another replica redirected by the server, how should o be transformed?

Transformed with which operations and in what order?

Key Ideas:

  • 1. With concurrent operations previously executed at
  • 2. In the serialization order of operations established at the server

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 15 / 32

slide-30
SLIDE 30

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Key Challenge to Solve: When a replica r receives an operation o from another replica redirected by the server, how should o be transformed?

Transformed with which operations and in what order?

Key Ideas:

  • 1. With concurrent operations previously executed at
  • 2. In the serialization order of operations established at the server

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 15 / 32

slide-31
SLIDE 31

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Key Challenge to Solve: When a replica r receives an operation o from another replica redirected by the server, how should o be transformed?

Transformed with which operations and in what order?

Key Ideas:

  • 1. With concurrent operations previously executed at r
  • 2. In the serialization order of operations established at the server

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 15 / 32

slide-32
SLIDE 32

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Jupiter uses 2D state spaces

[Xu, Sun, and Li, 2014]

to manage the procedure of performing OTs [Ellis and Gibbs, 1989].

0123 123 13 1 012 12

Del(0) Del(1) Del(3) Del(2) Del(0) Del(1) Del(1)

  • Edges are labeled with operations.

Local Dimension: For operations generated by the client Global Dimension: For operations generated by others

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 16 / 32

slide-33
SLIDE 33

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Jupiter uses 2D state spaces

[Xu, Sun, and Li, 2014]

to manage the procedure of performing OTs [Ellis and Gibbs, 1989].

0123 123 13 1 012 12

Del(0) Del(1) Del(3) Del(2) Del(0) Del(1) Del(1)

  • Edges are labeled with operations.

Local Dimension: For operations generated by the client Global Dimension: For operations generated by others

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 16 / 32

slide-34
SLIDE 34

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Each client maintains a 2D state space.

1: INS(x, 0) 𝝑 1 x 12 𝝑 123 𝒃 1234 𝒄𝒃 𝝑 1 x 12 𝝑 13 𝒃𝒚 123 𝒃 1234 𝒄𝒃 𝝑 1 x 12 𝝑 14 𝒚𝒄 124 𝒄 1234 𝒄𝒃 123 𝒃 4: INS(b, 0) 4: INS(b, 0) 3: INS(a, 0) 𝝑 1 x 12 𝝑 123 𝒃 𝝑 1 x 12 𝝑 13 𝒃𝒚 123 𝒃 𝝑 1 x 12 𝝑 14 𝒚𝒄 124 𝒄 3: INS(a, 0) 2: DEL(x, 0) 2: DEL(x, 0) 𝝑 1 x 12 𝝑 𝝑 1 x 13 𝒃𝒚 𝝑 1 x 14 𝒚𝒄 2: DEL(x, 0) 3: INS(a, 0) 4: INS(b, 1) 𝝑 1 x 𝝑 1 x 𝝑 1 x 1: INS(x, 0) 1: INS(x, 0) 1: INS(x, 0)

C1 C2 C3 S

𝝑 1 x 𝝑 1 x 𝝑 1 x 𝝑 1 x 12 𝝑 123 𝒃 1234 𝒄𝒃 𝝑 1 x 12 𝝑 13 𝒃𝒚 123 𝒃 1234 𝒄𝒃 𝝑 1 x 12 𝝑 14 𝒚𝒄 124 𝒄 1234 𝒄𝒃 123 𝒃 𝝑 1 x 12 𝝑 123 𝒃 𝝑 1 x 12 𝝑 13 𝒃𝒚 123 𝒃 𝝑 1 x 12 𝝑 123 𝒃 4: INS(b, 0) 3: INS(a, 0) 𝝑 1 x 12 𝝑 𝝑 1 x 12 𝝑 𝝑 1 x 12 𝝑 2: DEL(x, 0)

C1 C2 C3

The server maintains n (= 3) 2D state spaces, one for each client.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 17 / 32

slide-35
SLIDE 35

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Mismatch!

Global property on all replica states specifjed by Aweak Local view each replica maintains in Jupiter

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 18 / 32

slide-36
SLIDE 36

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

CJupiter (Compact Jupiter)

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 19 / 32

slide-37
SLIDE 37

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

CJupiter maintains an n-ary ordered state space for each replica.

ϵ 1 x

1: Ins(x, 0)

12 ϵ 13 ax 123 a

2: Del(x, 0) 3: Ins(a, 0) 3: Ins(a, 0) 2: Del(x, 1)

124 b

4: Ins(b, 0)

1234 ba

3 : I n s ( a , 1 ) 4: Ins(b, 0)

14 xb

4 : I n s ( b , 1 ) 2 : D e l ( x , )

There can be more than two edges coming from the same node. Edges from the same node are totally ordered according to the serialization order of associated operations.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 20 / 32

slide-38
SLIDE 38

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

CJupiter maintains an n-ary ordered state space for each replica.

ϵ 1 x

1: Ins(x, 0)

12 ϵ 13 ax 123 a

2: Del(x, 0) 3: Ins(a, 0) 3: Ins(a, 0) 2: Del(x, 1)

124 b

4: Ins(b, 0)

1234 ba

3 : I n s ( a , 1 ) 4: Ins(b, 0)

14 xb

4 : I n s ( b , 1 ) 2 : D e l ( x , )

There can be more than two edges coming from the same node. Edges from the same node are totally ordered according to the serialization order of associated operations.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 20 / 32

slide-39
SLIDE 39

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Theorem (Equivalence of CJupiter and Jupiter) Under the same schedule, the behaviors of corresponding replicas in CJupiter and Jupiter are the same. Schedule: Issue, Send, and Receive of operations Behavior: A sequence of replica states

Equivalence from the perspectives of both the server and clients.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 21 / 32

slide-40
SLIDE 40

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Theorem (Equivalence of CJupiter and Jupiter) Under the same schedule, the behaviors of corresponding replicas in CJupiter and Jupiter are the same. Schedule: Issue, Send, and Receive of operations Behavior: A sequence of replica states

Equivalence from the perspectives of both the server and clients.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 21 / 32

slide-41
SLIDE 41

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

At the server side:

Proposition (n ↔ 1 (Informal)) The single n-ary ordered state space at the server side in CJupiter is a union of n 2D state spaces at the server side in Jupiter.

At the client side:

Proposition ( (Informal)) Jupiter is slightly optimized in implementation at clients by eliminating redundant OTs in CJupiter.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 22 / 32

slide-42
SLIDE 42

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

At the server side:

Proposition (n ↔ 1 (Informal)) The single n-ary ordered state space at the server side in CJupiter is a union of n 2D state spaces at the server side in Jupiter.

At the client side:

Proposition (1 ↔ 1 (Informal)) Jupiter is slightly optimized in implementation at clients by eliminating redundant OTs in CJupiter.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 22 / 32

slide-43
SLIDE 43

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Proposition (Compactness of CJupiter (Informal))

At a high level, CJupiter maintains only one n-ary ordered state space.

ϵ 1 x

1: Ins(x, 0)

12 ϵ 13 ax 123 a

2 : D e l ( x , ) 3 : I n s ( a , ) 3 : I n s ( a , ) 2 : D e l ( x , 1 )

124 b

4: Ins(b, 0)

1234 ba

3 : I n s ( a , 1 ) 4 : I n s ( b , )

14 xb

4: Ins(b, 1) 2 : D e l ( x , )

All replica states are represented in a single data structure. Each replica behavior corresponds to a path going through this state space.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 23 / 32

slide-44
SLIDE 44

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Proposition (Compactness of CJupiter (Informal))

At a high level, CJupiter maintains only one n-ary ordered state space.

ϵ 1 x

1: Ins(x, 0)

12 ϵ 13 ax 123 a

2 : D e l ( x , ) 3 : I n s ( a , ) 3 : I n s ( a , ) 2 : D e l ( x , 1 )

124 b

4: Ins(b, 0)

1234 ba

3 : I n s ( a , 1 ) 4 : I n s ( b , )

14 xb

4: Ins(b, 1) 2 : D e l ( x , )

All replica states are represented in a single data structure. Each replica behavior corresponds to a path going through this state space.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 23 / 32

slide-45
SLIDE 45

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Proposition (Compactness of CJupiter (Informal))

At a high level, CJupiter maintains only one n-ary ordered state space.

ϵ 1 x

1: Ins(x, 0)

12 ϵ 13 ax 123 a

2 : D e l ( x , ) 3 : I n s ( a , ) 3 : I n s ( a , ) 2 : D e l ( x , 1 )

124 b

4: Ins(b, 0)

1234 ba

3 : I n s ( a , 1 ) 4 : I n s ( b , )

14 xb

4: Ins(b, 1) 2 : D e l ( x , ) S, C1 C2 C3

All replica states are represented in a single data structure. Each replica behavior corresponds to a path going through this state space.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 23 / 32

slide-46
SLIDE 46

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

CJupiter Satisfjes the Weak List Specifjcation

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 24 / 32

slide-47
SLIDE 47

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

We focus on a single n-ary ordered state space.

ϵ 1 x

1: Ins(x, 0)

12 ϵ 13 ax 123 a

2: Del(x, 0) 3: Ins(a, 0) 3: Ins(a, 0) 2: Del(x, 1)

124 b

4: Ins(b, 0)

1234 ba

3 : I n s ( a , 1 ) 4: Ins(b, 0)

14 xb

4 : I n s ( b , 1 ) 2 : D e l ( x , ) S, C1 C2 C3

We show the pairwise state compatibility property in three steps.

By Contradiction, By Induction, and By Case Analysis.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 25 / 32

slide-48
SLIDE 48

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 Take any two nodes/states v1 and v2. Lemma (LCA (Lowest Common Ancestor)) Each pair of states in the n-ary ordered state space has a unique LCA.

v0 v1 v2

v0 = LCA(v1, v2)

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 26 / 32

slide-49
SLIDE 49

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 Consider the paths to v1 and v2 from their LCA v0. Lemma (Disjoint Paths) The set of operations Ov0❀v1 along Pv0❀v1 is disjoint from the set of

  • perations Ov0❀v2 along Pv0❀v2.

v0 v1 v2

Pv0⇝v1 Pv0⇝v2

v0 = LCA(v1, v2)

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 27 / 32

slide-50
SLIDE 50

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3 Consider the states in these two paths. Lemma (Compatible Paths) Each pair of states consisting of one state v in Pv0❀v1 and the other v′ in Pv0❀v2 are compatible.

v0 v v′ v1 v2

Pv0⇝v1 Pv

0⇝v 2

v0 = LCA(v1, v2) In particular, v1 and v2 are compatible.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 28 / 32

slide-51
SLIDE 51

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The Main Contribution

The Jupiter protocol [Nichols et al., 1995]a for replicated list satisfjes the weak list specifjcation [Attiya et al., 2016]b.

aDavid A. Nichols et al. (1995). “High-latency, Low-bandwidth

Windowing in the Jupiter Collaboration System”. In: Proceedings of the 8th Annual ACM Symposium on User Interface and Software Technology. UIST ’95. ACM, pp. 111–120.

bHagit Attiya et al. (2016). “Specifjcation and complexity of

collaborative text editing”. In: Proceedings of the 2016 ACM Symposium on Principles of Distributed Computing. PODC ’16. ACM, pp. 259–268.

This was proposed as a conjecture in a PODC paper [Attiya et al., 2016].

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 29 / 32

slide-52
SLIDE 52

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Model checking/verifying a family of Jupiter protocols using TLA+/TLAPS

AbsJupiter (Wei@TR’18) CJupiter (Wei@OPODIS’18) XJupiter (Xu@CSCW’14) AJupiter (Attiya@PersonalComm’17)

Refjnement

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 30 / 32

slide-53
SLIDE 53

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 31 / 32

slide-54
SLIDE 54

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Attiya, Hagit et al. (2016). “Specifjcation and complexity of collaborative text editing”. In: Proceedings of the 2016 ACM Symposium on Principles of Distributed Computing. PODC ’16. ACM, pp. 259–268. Ellis, C. A. and S. J. Gibbs (1989). “Concurrency Control in Groupware Systems”. In: Proceedings of the 1989 ACM SIGMOD International Conference on Management of Data. SIGMOD ’89. ACM, pp. 399–407. Nichols, David A. et al. (1995). “High-latency, Low-bandwidth Windowing in the Jupiter Collaboration System”. In: Proceedings of the 8th Annual ACM Symposium on User Interface and Software Technology. UIST ’95. ACM,

  • pp. 111–120.

Roh, Hyun-Gul et al. (Mar. 2011). “Replicated Abstract Data Types: Building Blocks for Collaborative Applications”. In: J. Parallel Distrib. Comput. 71.3,

  • pp. 354–368.

Shapiro, Marc et al. (2011). “Confmict-free Replicated Data Types”. In: Proceedings

  • f the 13th International Conference on Stabilization, Safety, and Security of

Distributed Systems. SSS’11. Springer-Verlag, pp. 386–400. Xu, Yi, Chengzheng Sun, and Mo Li (2014). “Achieving Convergence in Operational Transformation: Conditions, Mechanisms and Systems”. In: Proceedings of the 17th ACM Conference on Computer Supported Cooperative Work. CSCW ’14. ACM, pp. 505–518.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 32 / 32

slide-55
SLIDE 55

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Backup

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 1 / 9

slide-56
SLIDE 56

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Does Jupiter satisfy the weak list specifjcation?

Yes, it does.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 2 / 9

slide-57
SLIDE 57

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Replication (for availability)

Updates

Replicas respond to user operations immediately Updates are propagated asynchronously

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 3 / 9

slide-58
SLIDE 58

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Defjnition (Eventual Convergence [Ellis and Gibbs, 1989]) The lists are identical at all replicas at quiescence, i.e., all update

  • perations have been executed at all replicas.

Defjnition (Strong Eventual Consistency [Shapiro et al., 2011]) The lists are identical at all replicas whenever after executing the same set of update operations.

Specify little on intermediate states going through by replicas.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 4 / 9

slide-59
SLIDE 59

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Defjnition (Eventual Convergence [Ellis and Gibbs, 1989]) The lists are identical at all replicas at quiescence, i.e., all update

  • perations have been executed at all replicas.

Defjnition (Strong Eventual Consistency [Shapiro et al., 2011]) The lists are identical at all replicas whenever after executing the same set of update operations.

Specify little on intermediate states going through by replicas.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 4 / 9

slide-60
SLIDE 60

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Defjnition (Eventual Convergence [Ellis and Gibbs, 1989]) The lists are identical at all replicas at quiescence, i.e., all update

  • perations have been executed at all replicas.

Defjnition (Strong Eventual Consistency [Shapiro et al., 2011]) The lists are identical at all replicas whenever after executing the same set of update operations.

Specify little on intermediate states going through by replicas.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 4 / 9

slide-61
SLIDE 61

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Strong/weak list specifjcation [Attiya et al., 2016]

Specify global properties on all states across the system. Proved: RGA [Roh et al., 2011] satisfjes the strong list specifjcation. Conjecture: Jupiter [Nichols et al., 1995] satisfjes the weak list specifjcation.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 5 / 9

slide-62
SLIDE 62

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

It is still challenging to achieve convergence despite the server. S C1 C2 C3

1

1

1 1 2

2

2 2 3

3

3 3 4

4

4 4

Serializability may not be desirable. It does not imply that clients process operations in the same order.

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 6 / 9

slide-63
SLIDE 63

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

∀σ, σ′ : a, b ∈ σ ∩ σ′ = ⇒ (a ≺σ b ⇐ ⇒ a ≺σ′ b) (σ, σ′ : list; a, b : element; ≺σ: precedes)

σ0 : ab σ1 : ba a b σ : a b σ1 : ba

σ0 : ax σ1 : xb σ2 : ba a x b σ0 : a x σ1 : xb σ

2

: b a

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 7 / 9

slide-64
SLIDE 64

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

OT functions for a replicated list object [Ellis and Gibbs, 1989]

OT

(

Ins(a1, p1, pr1), Ins(a2, p2, pr2)

)

=

                    

Ins(a1, p1, pr1) p1 < p2 Ins(a1, p1 + 1, pr1) p1 > p2 NOP p1 = p2 ∧ a1 = a2 Ins(a1, p1 + 1, pr1) p1 = p2 ∧ a1 ̸= a2 ∧ pr1 > pr2 Ins(a1, p1, pr1) p1 = p2 ∧ a1 ̸= a2 ∧ pr1 ≤ pr2 OT

(

Ins(a1, p1, pr1), Del(_, p2, pr2)

)

=

  

Ins(a1, p1, pr1) p1 ≤ p2 Ins(a1, p1 − 1, pr1) p1 > p2 OT

(

Del(_, p1, pr1), Ins(a2, p2, pr2)

)

=

  

Del(_, p1, pr1) p1 < p2 Del(_, p1 + 1, pr1) p1 ≥ p2 OT

(

Del(_, p1, pr1), Del(_, p2, pr2)

)

=

        

Del(_, p1, pr1) p1 < p2 Del(_, p1 − 1, pr1) p1 > p2 NOP p1 = p2

Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 8 / 9

slide-65
SLIDE 65

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Consider a replicated system with n (= 3) clients.

S C1 C2 C3

1

1

I n s ( x , )

1 1 2

2

D e l ( )

2 2 3

3

Ins(a, 0)

3 3 4

4

I n s ( b , 1 )

4 4 Hengfeng Wei (Nanjing University) Replicated List (Jupiter) December 17, 2018 9 / 9