Transactions - PowerPoint PPT Presentation

About This Presentation
Title:

Transactions

Description:

?ta? ? TM p?? e????e? t?? s??a??a?? (master) ???e? ?a ap??t?se? ??e?da???? p??? ... St?? s????e?a ? TM a?t?? t?? peer ?a?e? t?? ??t?t?ta Object Manager (OM) ? ?p??a ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 31
Provided by: Dion8
Category:

less

Transcript and Presenter's Notes

Title: Transactions


1
Transactions P2P Systems
  • ?????s?? ??a?as?p?????
  • ?as???? F?t?p?????

2
AGENDA
  • ??a?e???s? ?ata?eµ?µ???? s??a??a??? p??? ap? ?2?
    s?st?µa
  • ?? ??t?t?te? t?? p??t???????
  • ?a d?a???µµata ?atast?se?? t?? p??t???????
  • Simulation
  • S?µpe??sµata

3
??a?e???s? ?ata?eµ?µ???? s??a??a??? p??? ap? ?2?
s?st?µa
  • ??a?e???st?? t?? s??a??a??? ??µß?? ??a???? t??
    s??a??a???
  • ?ata?eµ?µ??? s??a??a?? (?p?s??a??a???) se
    d?af??et????? ??µß???
  • St???? ?a ap?d????? ?? a??????µ?? Strict 2PL,
    Conservative 2PL se P2P d??t??
  • ???pe? ?a ??f???? ?p???? ?? ?d?a?te??t?te? t??
    ?2? s?st?µ?t??

4
?d?a?te??t?te? t?? ?2? s?st?µ?t?? st?? ???p???s?
s??a??a???
  • ???? t?? ?s?t?µ?a? t?? ??µß??, ? ?at?stas? t??
    s??a??a??? p??pe? ?a e??a? ?ata?eµ?µ??? se ?????
    t??? ??µß??? t?? s??a??a??? (distributed state)
  • ? d??aµ???? ?a?a?t??a? ?d??e? se ????? ???µ?
    af??e?? ?a? a?a????se?? (mobile nodes)
  • O ??e???? ta?t??????sµ?? µe ??e?da???? se ?2?
    s?st?µata p??pe? ?a e?s?µat??e? a?t? ta
    ?a?a?t???st??? t???

5
?ata?eµ?µ???? ??e???? ta?t??????sµ??
  • G?a ?a µetat?ape? ? ??e???? ta?t??????sµ?? se
    ?ata?eµ?µ??? µ??f? ??e?????ta? ???sµ??e?
    ep??????
  • ?????? ?ata?eµ?µ??? d?a?e???s? t?? ??e?da????
  • ?? p??t?????? ??e?d?µat?? p?? ?a ???s?µ?p????e?
    (Strict 2PL, Conservative 2PL)

6
??st??? p??t?????? 2 f?se?? se ?2? s?st?µa
  • ?? µe?????t?µa t?? Strict 2PL e??a? ? eµf???s?
    ad?e??d??
  • ???? t?? s??µat?? t?? ?ata?eµ?µ???? d?a?e???s??
    t?? ??e?da????, ?d????µaste se ?ata?eµ?µ??a
    ad????da
  • G?a ?a ap?t?ape? ??a ad????d? ???s?µ?p????µe t??
    st?at????? wait-die se s??d?asµ? µe t?? ap?d?s?
    p??te?a??t?t?? sta transactions

7
???p???s? p??te?a??t?t?? se ?ata?eµ?µ???
pe??ß?????
  • ? p??te?a??t?ta e??? transaction a?t?st?????eta?
    st?? ??????? st??µ? p?? ?e????se t? transaction
  • ?? p??ß??µa e??a? ?at? p?s? ???? ?? ??µß??
    µp????? ?a ????? s???????sµ??a ??????a
  • G?a ?a ap?f?e??e? a?t?, ?ta? ??a? ??µß?? ?aµß??e?
    a?t?s? ??a transaction, s??????e? t? ?????s?µ?
    t?? transaction µe t? ????? t??

8
?p?t??p? ?ata?eµ?µ???? ad?e??d??
  • ?p???t??µe ?t? ????µe ta transactions ?1, ?2
  • Priority (T1) gt Priority (T2)
  • T1 ap???e?st??? ??e?da??? st?? peer A ??a t? ?1
  • T2 ap???e?st??? ??e?da??? st?? peer ? ??a t? ?2
  • ?st? ?t? ? T1 ??t? ??e?da??? ap? t?? peer ? ??a
    t? ?2 ?a? ? T2 ??t? ??e?da??? ap? t?? peer ? ??a
    t? ?1
  • G?a ?a ap?t?ape? a?t? t? ad????d?, ???s?µ?p????µe
    t?? p??te?a??t?te? a?t?? t?? transactions

9
?p?t??p? ?ata?eµ?µ???? ad?e??d??
10
?p?t??p? ?ata?eµ?µ???? ad?e??d??
  • ? d?a?e???st?? s??a??a??? st?? peer ?, ?a
    ?d???se? t?? ?1 se ?at?stas? a?aµ????
  • ? ?2 ?a ?d????e? st?? f?s? t?? s???????s?? t??
    ??e?da???? t??
  • ? ?2 µp??e? ?a te?µat?se? e?te µe
    ep?t???a(commit) e?te µe ap?t???a(abort)
  • ??? ? T2 ??t?se? µ?a ??a ??e?da???, ?a ???e?
    restart
  • ????? µ???? ? ?2 ?????????e? pa?a???e? t??
    ??e?da???? t?? ?a? ? ?1 s??e???e? ?a?????? t??
    e?t??es? t??

11
Conservative 2PL
  • G?a t?? ap?t??p? t?? ad?e??d?? desµe???ta? ??e?
    ?? ??e?da???? e? t?? p??t????
  • ? peer p?? ?e????e? t?? s??a??a?? a????? e????e?
    ?a de? e?? µp??e? ?a p??e? ??a ta ??e?d?? p??
    ??e???eta? ??a ?a e?te??se? t? transaction.
  • ??a ?a? t? transaction ?e????e?
  • ??af??et??? µ?a ???? ??????? st??µ? p??spa?e? ?a??

12
AGENDA
  • ??a?e???s? ?ata?eµ?µ???? s??a??a??? p??? ap? ?2?
    s?st?µa
  • ?? ??t?t?te? t?? p??t???????
  • ?a d?a???µµata ?atast?se?? t?? p??t???????
  • Simulation
  • S?µpe??sµata

13
?? ?p??es?e? p?? p??sf??e? t? Structured Overlay
Network
  • ???s?µ?p????µe d?µ?µ??? overlay network ??at? ?
    a?a??t?s? t?? ap????e?µ???? ded?µ???? st? d??t??
    e??a? ??????? ?a? ap?te?esµat??? (p.? chord)
  • ?? ep?ped? p?? pe???aµß??e? t?? ?p??es?e? p??
    p??sf??e? t? DHT ??a t?? a?a??t?s? ?a? t??
    ap????e?s? t?? a?t??e?µ???? st? d??t?? ???µ??eta?
    Data Manager (DM)

14
?? ??t?t?te? ??a t?? ???p???s? t?? e?t??es??
s??a??a??? st? Structured Overlay Network
  • ?ta? ?p?ß??ete ??a transaction se ??a? peer µ?a
    d?e??as?a Transaction Manager (TM) e????e?te se
    a?t?? t?? ??µß?
  • Se ???e peer ?p???e? ??a? d?af??et???? TM ??a
    ???e transaction
  • O TM e??a? ?pe?????? ??a ta e???
  • a?????p??e? t?? e?t??es? t?? s??a??a???
  • ep???????e? µe t??? peers p?? ?a e?te??s??? t??
    ep?µ????? e????e?e? t?? s??a??a???
  • te?µat??e? t? transaction (commit ? abort ?
    restart)

15
?? ??t?t?te? ??a t?? ???p???s? t?? e?t??es??
s??a??a??? st? Structured Overlay Network
  • ?ta? ? TM p?? e????e? t?? s??a??a?? (master)
    ???e? ?a ap??t?se? ??e?da???? p??? se object
    ????? peer ep???????e? µe t?? TM t?? a?t?st?????
    peer
  • St?? s????e?a ? TM a?t?? t?? peer ?a?e? t??
    ??t?t?ta Object Manager (OM) ? ?p??a e??a?
    ?pe????? ??a t?? d?a?e???s? t?? ??e?da???? ?a?
    ??a t?? p???e?? p??? sta a?t??e?µe?a t?? peer

16
?? ??t?t?te? ??a t?? ???p???s? t?? e?t??es??
s??a??a??? st? Structured Overlay Network
Transaction Manager
Object Manager
Data Manager
17
AGENDA
  • ??a?e???s? ?ata?eµ?µ???? s??a??a??? p??? ap? ?2?
    s?st?µa
  • ?? ??t?t?te? t?? p??t???????
  • ?a d?a???µµata ?atast?se?? t?? p??t???????
  • Simulation
  • S?µpe??sµata

18
?a d?a???µµata ?atast?se?? t?? strict 2PL
  • ? s??????? ?at?stas? t?? distributed transaction
    e??a? ?ata?eµ?µ??? ?a? ep?µ???? ???e ??µß??
    e?te?e? ??a d??? t?? a?t?µat? ?atast?se??
  • ????µe d?? a?t?µata ?atast?se?? a?????a µe t??
    p??te?a??t?ta p?? ??e? ? TM p?? e????e? t?
    transaction

19
??t?µat? ?atast?se?? ??a ??a peer master µe µ????
?????s?µ? (I)
20
??t?µat? ?atast?se?? ??a ??a peer master µe
µe???? ?????s?µ? (II)
?at?stas? ??aµ????
?at?stas? ??t??es??
?at?stas? ?e?µat?sµ?? (Commit / Abort)
21
??t?µat? ?atast?se?? ??a Conservative 2PL
22
AGENDA
  • ??a?e???s? ?ata?eµ?µ???? s??a??a??? p??? ap? ?2?
    s?st?µa
  • ?? ??t?t?te? t?? p??t???????
  • ?a d?a???µµata ?atast?se?? t?? p??t???????
  • Simulation
  • S?µpe??sµata

23
?a??µet??? Simulation
  • ?????? peers st? d??t??
  • ?????? objects a?? peer (?e????µe p?? ???e peer
    ??e? t? ?d?? p????? ap? object)
  • ??s?? ?????? pa?aµ???? t?? peers st? d??t??
  • ??s?? ?????? e?t??es?? ???e ?ata?eµ?µ????
    s??a??a??? ( t?? p?????? t?? action)
  • ???µ?? ?p?ß???? a?t?se?? ??a s??a??a??? st?
    d??t??
  • ?????? ?p?ß???? te?e?ta?a? s??a??a??? (???µ??e?
    ?a? t? t???? t?? simulation)

24
Ge???t??a? S??a??a???
  • ?????? µ?s? e??? ?e???t??a s??a??a??? ???µ????ta?
    t?? p??????µe?e? pa?aµ?t???? d?µ???????µe set ap?
    ?ata?eµ?µ??e? s??a??a??? ?a? ?ste?a t?? e?te???µe
    se ??a d??t?? p?? a????? ???s?µ?p??e? t?
    p??t?????? Conservative ?a? µet? t? Strict 2PL
  • ? ???e s??a??a?? e??a? ??a s????? ap? Read ?a?
    Write p???e?? p??? se objects peers ??µß??

25
G?aµµat??? s??a??a???
  • ???e s??a??a?? a??????e? t?? e??? ??aµµat???
  • ltDTgt TIMESTART constant
  • DTID constant
  • MID constant
  • ltSTgt
  • ltSTgt
  • ltSTgt CID constant
  • ACTION READ WRITE
  • OBJECT constant

26
?a??de??µa S??a??a???
  • ??a s??a??a??
  • TIMESTART 12 DTID 2 MID 29
  • CID 33 ACTION READ OBJECT 12
  • CID 26 ACTION WRITE OBJECT 0
  • CID 10 ACTION READ OBJECT 19

27
?e??aµa 1? Sta?e??? ?a??µet???
  • MIN_DURATION_VISITING40
  • MAX_DURATION_VISITING80
  • MIN_SUBTRANSACTION10
  • MIN_SUBTRANSACTION30
  • ?????? Objects a?? peer 10
  • ?????? t?? peers 80
  • ?at? ?.? se 100 ???????? st??µ?? ?p?ß?????ta?
    p??? e?t??es? 20 transactions
  • H d????e?a t?? simulation e??a? ??t? pa?ap??? ap?
    1000 ???????? st??µ??

28
?e??aµa 1? ?p?te??sµata
29
AGENDA
  • ??a?e???s? ?ata?eµ?µ???? s??a??a??? p??? ap? ?2?
    s?st?µa
  • ?? ??t?t?te? t?? p??t???????
  • ?a d?a???µµata ?atast?se?? t?? p??t???????
  • Simulation
  • S?µpe??sµata

30
S?µpe??sµata
  • ?? p??te? e?de??e?? µa? de?????? p?? t?
    Conservative ?pe?te?e? ?st? ?a? ???? st? p?s?st?
    t?? commit s??a??a??? ??a?t? t?? stict 2PL
  • ???a??? se ??a P2P d??t?? p?? ?? peers
    e?s?????ta? ?a? e??????ta? µe ????? ???µ? ?
    d?ap???? t?? s??a??a??? ?a ?d??e? se pe??ss?te?a
    abort ap? ?t? µ?a p?? se???a?? e?t??es? t??
    s??a??a??? ?p?? ???eta? µ?s? t?? conservative
Write a Comment
User Comments (0)
About PowerShow.com