Optimistic Replication Systems ~ IceCube?WinFS????? ~ - PowerPoint PPT Presentation

About This Presentation
Title:

Optimistic Replication Systems ~ IceCube?WinFS????? ~

Description:

Optimistic Replication Systems IceCube WinFS Optimistic Replication Systems Lotus Notes, CVS, Unison [Benjamin C. Pierce ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 69
Provided by: acjp
Category:

less

Transcript and Presenter's Notes

Title: Optimistic Replication Systems ~ IceCube?WinFS????? ~


1
Optimistic Replication Systems
IceCube?WinFS?????
  • ?? ??

2
Optimistic Replication Systems
  • ?)Lotus Notes, CVS, Unison Benjamin C. Pierce
  • ??????????????????????????
  • PDAPC?????????
  • ??????????????????

?????
3
Optimistic Replication????
  • Replication
  • ????????????????
  • Reconciliation
  • ??????????????????

??
??
??
4
Optimistic Replication???
  • ?????????????????
  • ??????????????????
  • ????????????????????
  • Reconciliation????????????

5
?????Reconciliation???
  • ???2??????????
  • State transfer
  • ?)??????????
  • Operation transfer
  • ?)????????????????

6
??????
  • MSR???Optimistic Replication Systems
  • IceCube
  • Operation transfer?
  • WinFS
  • State transfer?

7
IceCube
Nuno Perguica, Marc Shapiro, and Caroline
Matheson. Efficient Semantics-aware
Reconciliation for Optimistic Write Sharing.
MSR-TR-2002-52
8
A Motivating Scenario
  • ????????
  • ????? ???????????????
  • Reconciliation double booking?????

??? 1
??? 2
900 room A
900 room A
1000 room C
1000 room B
1000 room B or 1000 room C
1000 room C
reconciliation
9
???????????????Reconciliation????
  • ?????????????????(????????)??????????????

??? 2??????????
??? 1
??? 2
900 room A
1
3
900 room A
900 room A or 900 room B
900 room B
2
900 room B or 900 room C
reconciliation
10
???????????????Reconciliation????
  • ?????????????????(????????)??????????????

??? 1??????????
??? 1
??? 2
900 room A
2
1
900 room A
900 room A or 900 room B
3
900 room B or 900 room C
reconciliation
11
??????Reconciliation
  • ?????????????????????

??? 1
??? 2
900 room A
900 room A
900 room A or 900 room B
900 room B
900 room B or 900 room C
900 room C
reconciliation
12
IceCube
  • A general-purpose reconciliation engine

??????(??double booking??????)
IceCube
reconcilable ????????(??????????)
13
IceCube?????
  1. ??????????????????

?????
Balance 1000
Alice
Brian
Balance 1000
14
IceCube?????
  • ?????????????????
  • ?????????????????
  • ?????????????????

???0???????????
????????
?????
Balance 1000
Balance 500
Meeting on Oct. 13 for Alice and Brian Flight
Reservation for Alice on Oct. 11 Debit Expense
Account 500
Alice
?????????????????
Meeting on Oct. 13 for Alice and Brian Flight
Reservation for Brian on Oct. 12 Debit Expense
Account 800 Flight Reservation for Brian on Oct.
11 Debit Expense Account 500
Brian
Balance 1000
Balance 200
Balance -300
?????????????
15
IceCube?????
  • Reconciliation
  • ?????????????????

???0???????????
?????????????
?????
Balance 1000
Balance 500
Meeting on Oct. 13 for Alice and Brian Flight
Reservation for Alice on Oct. 11 Debit Expense
Account 500 Meeting on Oct. 13 for Alice and
Brian Flight Reservation for Brian on Oct. 12
Debit Expense Account 800 Flight Reservation
for Brian on Oct. 11 Debit Expense Account 500
Alice
?????????????????
Brian
Balance 1000
Balance 200
Balance -300
?????????????
16
IceCube?????
  • Reconciliation
  • ?????????????(??????)?????(????)????

???0???????????
?????????????
?????
Balance 1000
Balance 500
Meeting on Oct. 13 for Alice and Brian Flight
Reservation for Alice on Oct. 11 Debit Expense
Account 500 Meeting on Oct. 13 for Alice and
Brian Flight Reservation for Brian on Oct. 12
Debit Expense Account 800 Flight Reservation
for Brian on Oct. 11 Debit Expense Account 500
Alice
?????????????????
Brian
Balance 1000
Balance 200
Balance -300
?????????????
17
IceCube?????
  • Reconciliation
  • ?????????????(??????)?????(????)????

?????
??????
Balance 1000
Balance 500
Alice
Brian
Balance 1000
Balance 200
Balance -300
18
IceCube?????
  • Reconciliation
  • ???????????????????????????????????

?????
??????
Balance 500
Balance 0
Alice
Balance -300
Balance 0
Brian
19
???IceCube??????????
  • ????????????????

20
????????
  • ??????????????????
  • ???????????????????????
  • IceCube??????????????

21
??????????????????
  • ?????
  • ???????????
  • ?)??????????????????
  • ?????
  • ????????????????invariants
  • ???????pre-condition?post-condition
  • ?)?????????????0??

22
????? (1/2)
  • ???2????????????
  • a ? b
  • ?????a?b?????????????????a?b??????????????
  • a ? b
  • ?????a?????????????????b????????????????????

a
b
a
b
or
b
a
23
????? (2/2)
  • ???????????????????????
  • a ? b ? b ? a
  • b?a???????????
  • a ? b ? b ? a
  • a?b???????? or ????????
  • a ? b ? b ? a
  • a?b??????????? or ????????

24
???????????????
  • ??
  • ????????
  • ???????
  • ??????????
  • ??
  • ?????????????(??????)
  • ???????????????
  • ???????????????NP????????????????????

25
?????????
???????? A ?????? s e
A????????????????a?????
a????????????
Yes
No
a?s?????
???rollback??
A??????
No
Yes
s??????
26
????????????
???????? Balance 600
?????? s
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
27
????????????
???????? Balance 600
?????? s
a
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
28
????????????
???????? Balance 600
?????? s
a
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
29
????????????
???????? Balance 600
?????? s
a
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
30
????????????
???????? Balance 600
-200
?????? s
a
b
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
31
????????????
???????? Balance -200
?????????
?????? s
a
b
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
32
????????????
600
???????? Balance -200
?????????????
?????? s
a
b
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
33
????????????
???????? Balance 600
?????????????
?????? s
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
34
????????????
???????? Balance 600
?????????????
?????? s
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
35
????????????
???????? Balance 600
?????? s
c
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
36
????????????
???????? Balance 500
?????? s
c
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
37
????????????
???????? Balance 500
?????? s
c
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
38
????????????
???????? Balance 500
100
?????? s
c
d
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
39
????????????
???????? Balance 100
?????? s
c
d
??????????????????
Flight Reservation for Brian on Oct. 12 Debit
Expense Account 800 Flight Reservation for Brian
on Oct. 11 Debit Expense Account 500 Flight
Reservation for Brian on Oct. 10 Debit Expense
Account 300
a
b
c
????????
d
e
f
??????
??????
??????
(a?b ? b?a) ? (c?d ? d?c) ? (e?f ? f?e)? (a?c
? c?a) ? (c?e ? e?c) ? (a?e ? e?a)
?????
??????
??????
??????
????? Balance gt 0
40
IceCube?????????????????
  • Calendar
  • Reconcilable Mail Folders
  • ?)????????????????rename?????????????
  • Replicated File System

41
IceCube????
  • A general-purpose reconciliation engine
  • ??????????????????????????????????

42
WinFS
  • Dahlia Malkhi and Doug Terry. Concise Version
    Vectors in WinFS. In Proceedings of the 19th
    International Symposium on Distributed Computing
    (DISC), 2005

43
WinFS???
  • ??????????(?????)???
  • ???????????????????
  • ???????????????????????

o1
o3
o1
o3
o1
o3
o3
o1
o2
o4
o2
o4
o2
o4
o4
o2
A
B
44
WinFS???
  • ??????????(?????)???
  • ???????????????????
  • ???????????????????????

?????????????????????????????(???????????)
o1
o3
o1
o3
o1
o1
o2
o4
o2
o4
A
B
45
??????
  • ???????????????????????????????
  • ???Version Vectors???????????????????????????

46
????????
  • ??????????????
  • Versions Vectors????????????
  • ????????????????

47
????????????????
  • a?b?????????????( a ? b ???)

?????????????????e1 ? e2
??????o1???
??????o2???
A
e1
e2
?????????????e2 ? e4
??
B
e4
e3
??????o1???
???????? e1 ? e4
(??)e1 ? e3?e3 ? e1???????
48
??????????????????????
  • ??????????????a, b????
  • a ? b????b?????
  • a ? b?b ? a????????????????????

A
e1
??
??
o 1
e1 ? e2 ? e3 ???o3
B
e2
??
o 2
C
e3
o 3
49
??????????????????????
  • ??????????????a, b????
  • a ? b????b?????
  • a ? b?b ? a????????????????????

A
e2
o 2
??
??
e2 ? e3 ? e3 ? e2???????????????
B
e1
??
o 1
e3
C
o 3
50
????????????????
  • Version Vectors??
  • ??????????Version Vector(VV)???
  • ???????????????VV?????
  • e1 ? e2 ? (e1?VV) lt (e2?VV) ????????

51
Version Vector??? (1/2)
  • (????)??????????
  • ???i?Version Vector?Vi???
  • ????????????????0???
  • ???????????????
  • Vi gt Vj ? ?k, Vik ? Vjk ???l, Vil gt
    Vjl

52
Version Vector??? (2/2)
  • e1 ? e2 ? (e1?VV) lt (e2?VV)?????????????
  • ???i?????????????Vii Vii 1
  • ???j????i???????Vi max(Vi, Vj)

A 0
B 0
e1 ? e2 e2 ? e4
A 1
B 0
A 2
B 0
A 3
B 0
A
e1
e2
e3
??
A 0
B 0
A 2
B 0
A 2
B 1
B
e4
53
Version Vectors???????????
  • ??????????????a, b????
  • (a?VV) gt (b?VV) ???a?????
  • (a?VV) gt (b?VV) ? (a?VV) lt (b?VV)
    ???????????????????

a ? b ? (a?VV) lt (b?VV) ??????????
54
Version Vectors????????????1
VV1
A 0
B 0
C 0
A 1
B 0
C 0
A
e1
??
o 1
A 0
B 0
C 0
A 1
B 0
C 0
A 1
B 1
C 0
VV1 lt VV3 (e1 ? e3)???o3
??
B
e2
VV3
o 2
A 0
B 0
C 0
A 1
B 1
C 1
A 1
B 1
C 0
??
C
e3
o 3
55
Version Vectors????????????2
VV2
A 0
B 0
C 0
A 0
B 1
C 0
A 1
B 1
C 0
A
e2
o 2
??
A 0
B 0
C 0
A 0
B 1
C 0
??
VV2 gt VV3 ? VV3 gt VV2???????????????
B
e1
VV3
o 1
A 0
B 1
C 0
A 0
B 1
C 1
A 0
B 0
C 0
??
C
e3
o 3
56
Version Vectors????
  • ?????????????????????
  • ?????????????????
  • O(??????? ????)

57
?????????? (1/2)
  • ???????????Version Vector???

o1 o2 o3
A 0 0 0
B 0 0 0
o1 o2 o3
A 1 0 0
B 0 0 0
o1 o2 o3
A 1 0 1
B 0 0 0
A
e1
e3
o1 1
o3 1
o1 o2 o3
A 0 0 0
B 0 0 0
o1 o2 o3
A 0 0 0
B 0 1 0
??
B
e2
o2 1
58
?????????? (1/2)
  • ???????????Version Vector???

A 0
B 0
A 1
B 0
A 2
B 0
e1
e3
A
o1 1
o3 1
??
A 0
B 0
A 0
B 1
B
e2
o2 1
59
?????????? (2/2)
  • ???????????????????????????

o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,2)
A 0
B 0
A 1
B 0
A 2
B 0
A
e1
e3
o1 1
o3 1
o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,0)
o2 (B,1)
o3 (A,0)
??
A 0
B 0
A 0
B 1
B
e2
o2 1
60
?????????
e2?????x???????m???????????
  • ??????o???? m gt n ? e1 ? e2????????????

??????o???????????????x???????n??
o (.,.)
(.,.)
x m

A
e2
x

o (x,n)
(.,.)
??
e1
B
61
?????????
o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,2)
A 0
B 0
A 1
B 0
A 2
B 0
A
e1
e3
o1 1
o3 1
o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,0)
o2 (B,1)
o3 (A,0)
???A????????
??
A 0
B 0
A 0
B 1
B
e2
o2 1
62
?????????
o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,2)
A 0
B 0
A 1
B 0
A 2
B 0
A
e1
e3
o1 1
o3 1
o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,0)
o2 (B,1)
o3 (A,0)
??
A 0
B 0
A 0
B 1
???B????????
B
e2
o2 1
63
?????????
o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,0)
o1 (A,1)
o2 (A,0)
o3 (A,2)
A 0
B 0
A 1
B 0
A 2
B 0
A
e1
e3
o1 1
o3 1
o1 (A,0)
o2 (A,0)
o3 (A,0)
o1 (A,0)
o2 (B,1)
o3 (A,0)
??
A 0
B 0
A 0
B 1
???A????????
B
e2
o2 1
64
???????????
  • ????????????????????
  • ???????????????????????????
  • ?????????????????????????????
  • ? ?????????????????????????????????
  • ???

65
WinFS????
  • ???????????????????????
  • ??Version Vector??????????????????????????

66
??????
  • Optimistic Replication Systems?????
  • IceCube
  • WinFS

67
????
  • Efficient Semantics-aware Reconciliation for
    Optimistic Write Sharing
  • Nuno Perguica, Marc Shapiro, and Caroline
    Matheson
  • MSR-TR-2002-52
  • Concise Version Vectors in WinFS
  • Dahlia Malkhi and Doug Terry
  • 19th International Symposium on Distributed
    Computing, 2005
  • Optimistic Replication
  • Yasushi Saito and Marc Shapiro
  • ACM Computing Surveys, 2005

68
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com