230 likes | 382 Views
Replicated Data Protocols. Venkata N Pidugu Student number: 0537127. Practical answers to question rised in previous presentation “replicated data Management in mobile computing”. ->Do replicas exchange data items or update operations?
E N D
Replicated Data Protocols Venkata N Pidugu Student number: 0537127
Practical answers to question rised in previous presentation “replicated data Management in mobile computing” • ->Do replicas exchange data items or update operations? • ->How do devices record updates that need to be propagated to other • devices • ->What metadata is stored and communicated about replicated items?
Representing Updates • Challenges faced by a replication protocol designer:- • ->What to send between replica's to bring them into coherent state. • ->To Perform update operations • ->How replica's echange operations.
Operation Sending Protocols:- • ->record and send operations to each other. • ->Operations on its local replica. • ->Operations in a deterministic manner.
Item Sending Protocols :- • ->Replacing older items with same unique identifier. • ->Comparision between operation sending and item sending protocols • -Both differ in what needs to be standerdized during replicas. • ->In item sending protocols, replica's must share a common item layout i,e physical schema, since they exchange data items. • ->In Operation-sending protocols, replicas must agree on the supported operations but are free to provide different implementations.
Recording Updates :- -> Two Basic Schemes have been used to record the set of updates that need to be exchanged between replica's..... 1.Log Based Scheme 2.State Based Scheme
Log Based Replication :- • ->In general, the size of a device’s operation log is unbounded and depends on the size of update • operations, the update rate, and the propagation latency • ->Some systems provide log compaction mechanisms • that discard obsolete operations. • ->In a client–server system, such as Coda, clients can discard their logs once they successfully • replay them to the servers.
State Based Systems :- • ->This style of replication, shown in Figure , has been used in replicated file systems, such as Ficus, and even some database management systems.
State based System issues: “Delete Operations” • ->In a state-based system, if a delete operation simply removes an item from the • initiating device’s replica, this can cause problems. • ->create delete ambiguity: confusion between replicas which rised as synchronization between two replicas. • ->Solution:The solution adopted by most systems is to mark items with a special “deleted” bit rather • discarding them. Such deleted items are known as tombstones or death certificates. Tombstones replicate among devices just like other items.
Sending Updates :- • ->Direct Broadcast: • -the simplest technique for disseminating updates is for a device that performs a local update operation to immediately send that update to all other replicas. • ->Directly sending updates between replicas avoids the need to log such updates. • ->For example, clients of the Coda file system, when in connected mode, multicast each update • operation to the set of available servers that replicate the file being updated.
Full Replica or Log Exchange :- • ->A simple and very robust protocol can be obtained by having pairs of devices periodically exchange • the full contents of their replicas. • ->Eventual consistency is easily achieved as long as each device holding a replica directly • or indirectly communicates with all other replicas. • ->Mobile devices require protocols that are both robust and network-efficient, i.e., that incrementally disseminate updated items.
Message Queue Protocols :- • ->A reliable messaging system, such as IBM’s MQ Series or Microsoft’s SQL Service Broker, can • also serve as a simple mechanism for propagating updates. • ->Each replica need not have a direct connection to each other replica • ->Reliable multicast relies on having a multicast tree in which each replica occurs at least once. • ->Layering replication on top of a messaging infrastructure can potentially simplify the implementation but is also a cause for concern regarding eventual convergence.
Modified Bit Protocols :- • ->Consider a situation in which two devices synchronize only with each other, such as a cell phone • and home PC that share a copy of a person’s address book. • ->When an item is updated by a local operation, in addition to changing the item’s contents, the item’s modified bit is set to one. • ->This modified-bit protocol is widely used in synchronization products for cell phones and • PDAs, such as Palm’s HotSync protocol.
Device Master Timestamp Protocols:- • ->The device–master model , compared with peer-to-peer models, allows a simpler replication protocol since fixed and mobile devices always receive updates from one source, the master. • ->One technique is for the master to assign update timestamps to each item that it updates locally • or for which it receives an update from a client device. • ->Each client (or the master) records the time of its last synchronization with the master.
Device Master log Based Protocols:- • ->For update operations that originate at the master or that are received by the master from a • device and need to be propagated to other devices, master-maintained update logs are also possible, but less desirable. • ->A basic synchronization protocol that works for any pair of devices can be obtained by having • one device send version metadata for all items in its replica so that the second device can determine what versions it is missing. • ->This synchronization protocol is particularly well-suited for state-based replication but could also be used for log-based systems by exchanging metadata about log entries.
Knowledge Driver State Based Protocols :- • ->To accommodate devices such as cellphones, pds's, the WinFS system demonstrated that a variation of this knowledge-driven protocol can be used for state-based systems in which devices do not maintain update logs. • ->A more serious problem stems from the fact that state-based synchronization protocols only send the latest version of an item.
Ordering Updates :- • ->To reach eventual consistency in a state-based replication protocol in which devices send updated • items, devices must agree on which version of each item is the latest version. • ->Ordering delivery:- One approach is for the replication protocol to ensure that updated items or update operations reach all devices in the same order. • ->Update Timestamps:- A commonly used decentralized technique that works with almost any replication protocol is to assign a timestamp to each update.
Overall Presentation:- • -> In Many cases data has access to only data that is presented locally and much of the data arrives through replication from other devices. • ->The design of a replication protocol then centers on issues of how to record, propagate, order, • and filter updates. • ->This lecture explores the choices faced in designing a replication protocol, with particular emphasis on meeting the needs of mobile applications.
References:- • Data Management for mobile computing • Synthesis lectures on mobile computing • 2008, Douglas B Terry, Microsoft Research. • Data Management for Mobile Computing • Issues in Data Management for Pervasive Environments • SasikanthAvancha, DipanjanChakraborty, Harry Chen, LalanaKagal, • FilipPerich, Timothy Finin, Anupam Joshi • Department of Computer Science & Electrical Engineering • University of Maryland, Baltimore County • 1000 Hilltop Circle, Baltimore, MD