LASS Reading Group Puru Kulkarni, UMass - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

LASS Reading Group Puru Kulkarni, UMass

Description:

Support of undoing writes (use of write logs) No time-varying data used by merge procedures ... Efficient undo/redo. Views of tentative/committed data. Anti ... – PowerPoint PPT presentation

Number of Views:123
Avg rating:3.0/5.0
Slides: 22
Provided by: Has662
Category:

less

Transcript and Presenter's Notes

Title: LASS Reading Group Puru Kulkarni, UMass


1
LASS Reading GroupPuru Kulkarni, UMass
  • Epidemic Algorithms for Replicated Database
    Maintenance
  • A. Demers et.al
  • Managing Update Conflicts in Bayou,
  • a Weakly Connected Replicated Storage System
  • D. Terry et.al
  • Xerox Palo Alto Research Centre

2
Introduction
  • replicated databases
  • mutual consistency on updates to data
  • consistency model
  • algorithms analogous to epidemics
  • eventual consistency
  • randomized (server makes independent random
    choices)
  • robust and scalable algorithms

3
Algorithms
  • Direct Mail
  • Anti-Entropy
  • Rumor mongering
  • Factors to compare
  • Time for update propagation
  • Network traffic generated for each update
  • reliability

4
Direct Mail
  • for each s in S do
  • Postmailto s, msg("Update", x.valueof()
  • endloop
  • (traffic number of sites average distance
    between
  • sites)
  • On update send mail to all replicas
  • Depends on reliability of underlying service
  • Server needs to be aware of all sites

5
Epidemic Algorithms
  • Types of sites Infective, Susceptible, Removed
  • Anti-Entropy algorithm (executed at replica s)
  • for some s in S do
  • Resolve_Difference (s, s)
  • endloop
  • Resolve_Difference
  • Push
  • Pull
  • Push-Pull

6
Anti-Entropy
  • Properties
  • site s chosen at random
  • Periodic execution of anti-entropy
  • compare entire dataset (expensive)
  • some susceptible sites possible
  • Always infective or susceptible
  • Improvements
  • database checksum
  • bounded recent-updates list
  • inverted index of database by timestamp

7
Complex Epidemics
  • Maintain list of infective updates
  • Replica tries to insert update and change its
    list
  • When to remove update from list?
  • Rumor mongering
  • plant rumor (infect)
  • Infected sites spread rumor randomly
  • If recipient knows of rumor, with probability 1/k
    site goes to removed state
  • probability of failure depends on k

8
Rumor mongering
  • Criteria to judge epidemic
  • Residue (sir 1)
  • Traffic (ratio of total update traffic and
    number of sites)
  • Delay (tarr, tlast)
  • Variations of Rumor mongering
  • Blind v/s Feedback
  • Counter v/s Coin
  • Push v/s Pull
  • Connection limit, Hunting

9
Rumor mongering
  • Less network traffic
  • Non-zero probability of site not getting an
    update (depends on k)
  • Anti-entropy for backup (infrequently)
  • Direct mail for backup (traffic overhead)
  • Rumor cycles more frequent than anti-entropy
  • Less resources for update transfer

10
Epidemic algorithms
  • Deletion of item
  • Remove from database
  • Resurrection problem
  • Insert death certificate in replicas
  • Spread using epidemic algorithms
  • When to delete death certificates
  • Tradeoff (risk of resurrection v/s space)
  • Bounded time interval
  • Distributed algorithm

11
Epidemic algorithms
  • Dormant Death Certificates
  • Hold death certificate till t1
  • Create dormant after t1 till t2 (on some
    sites)
  • Reactivate death certificate if obsolete update
    encounters dormant certificate
  • If not, remove dormant after t2
  • Reduces network traffic
  • k and t2 control probability of failure
  • Spatial Distribution
  • Network not uniform, Favor neighbors?
  • Effect of network topology

12
BAYOU
  • Features
  • Replicated data (relational database)
  • Read/write anywhere model
  • weakly consistent data (weak connectivity)
  • Conflict detection/resolution (application-aware)
  • Eventual consistency
  • Example applications
  • Meeting room scheduler
  • Bibliography database
  • Mobile email, Bayou project co-coordinator

13
Bayou
  • System model
  • Client Application Bayou API
  • Read/write at any available server
  • Log of writes and resulting data
  • Write performed locally (execution, conflict
    detection/resolution)
  • Effects of write immediately available
    (tentative/committed writes)
  • System support for conflict detection
  • Application specific conflict resolution

14
Bayou
  • Update management
  • Pairwise anti-entropy sessions
  • Exchange of write-logs determine order of writes
    and conflicts
  • Eventual consistency (theory of epidemics)
  • Factors for write-convergence
  • Network connectivity
  • Frequency of anti-entropy
  • Server policies (site selection)

15
Bayou
  • Conflicts
  • Application specific
  • Meeting scheduler (timings overlap)
  • File update (record level)
  • Dependency checks
  • How to detect conflicts?
  • Application specific query (similar to SQL) and
    expected result
  • Merge Procedure
  • Steps to resolve conflict

16
Bayou
  • Replica (eventual) Consistency
  • Writes performed in the same, well-defined order
    at all servers (global-ordering)
  • Conflict detection and merge procedures
    deterministic
  • Tentative/committed writes
  • Tentative writes ordered by timestamps of
    accepting server
  • Support of undoing writes (use of write logs)
  • No time-varying data used by merge procedures

17
Bayou
  • Replica (eventual) Consistency
  • Stable write, all the preceding writes are fixed
    in the log (do not need re-execution)
  • Client can decide whether to access
    tentative/stable data
  • How to determine stable write?
  • Send accept-times for data on anti-entropy
  • If server has time lower than all, then commit
  • Partitions cause delays or commit problems
  • Sending timestamps is overhead

18
Bayou
  • Replica (eventual) Consistency
  • Primary commit scheme
  • Single server designated to commit writes
  • Commits propagate during anti-entropy
  • Different data items can have different primary
    servers
  • Disconnected operation supported, quorum based or
    distributed algorithms for commit not a good idea
  • Primary can be located near locus of activity, to
    increase rate of write commits

19
Bayou
  • Replica (eventual) Consistency
  • Non-transparent, application specific conflict
    detection/resolution
  • Pair-wise anti-entropy
  • Ordering of writes (tentative and global)
  • Primary commit scheme

20
Bayou
  • Implementation issues
  • Space efficient write logging
  • Efficient undo/redo
  • Views of tentative/committed data
  • Anti-entropy support
  • Resurrection of discarded committed writes
  • Authentication for access control

21
Bayou
  • Conflict management conclusions
  • Non-transparent
  • Application specific resolution
  • Per-write conflict re-solvers
  • Partial and multi-object updates
  • Tentative/stable resolutions
  • Security
  • Additional issues
  • Rate of anti-entropy, server selection, partial
    replication, alternate data models
Write a Comment
User Comments (0)
About PowerShow.com