120 likes | 303 Views
More on Replication and Consistency. CS-4513 D-Term 2007
E N D
More onReplication and Consistency CS-4513D-Term 2007 (Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne, Modern Operating Systems, 2nd ed., by Tanenbaum, and Distributed Systems: Principles & Paradigms, 2nd ed. By Tanenbaum and Van Steen) More on Replication and Consistency
Replication • Common in distributed systems • Reliability • Performance • Maintaining consistency among replicas • Correctness in operation • Unsurprising behavior • Many models for consistency More on Replication and Consistency
A Mini-Taxonomy ofReplication Techniques • Copy entire database vs. • Update individual items • Single source of changes • I.e., Primary-based protocols vs. • Multiple, independent sources of changes • I.e. Replicated-write protocols More on Replication and Consistency
Copying Entire Database • Single source of changes • Simply copy entire database • E.g., DNS domain • early implementations, at least • … More on Replication and Consistency
Copying Entire Database (continued) • … • Multiple concurrent, sources of changes • Every item in database must have timestamp • With suitable granularity • Merge copies, item-by-item • Deletions must be preserved • At least until all replicas have seen them • Question: can it be proven mathematically that replicas converge? More on Replication and Consistency
Multiple Sources of Change ExampleGrapevine Registry • In early implementation, an entire registry was copied and merged after each update • Each item has timestamp • {IP address, local time} • Registry’s own timestamp • Latest timestamp of any of its members • Registry comprises two sublists • Current members • Deleted members • … More on Replication and Consistency
Grapevine Registry Example (continued) • … • Merging item-by-item • Later version of any item replaces earlier version of same item • Item may move between current and deleted lists • No provision for resolving inconsistent, concurrent updates by different servers • Apply same rule recursively to groups • I.e., an item may be a group, comprising other items • To update group, merge with copied group by same rule More on Replication and Consistency
What if Database is Too Big? • Propagate updates to individual items • Each item has timestamp • Newer timestamp replaces older timestamp • Each update is a single operation (or sequence) • Add, Delete, or Change • Apply recursively to groups • Propagate only the element that has changed • Preserve deletions until all updates have fully propagated More on Replication and Consistency
Propagating Individual Updates • Primary-based protocols • Simple, since all updates are monotonically time-stamped • Replicated write protocols • Similar to merge protocols • Later timestamp wins • Deletions must be preserved until updates have fully propagated More on Replication and Consistency
Question • What can we say about update order as perceived by clients? More on Replication and Consistency
Wrap-up — Replication and Consistency • Much more to be said • Lots of research • Practical implementations in a number of large, distributed systems More on Replication and Consistency
Questions? Next Topic More on Replication and Consistency