PBDMS HW3 (1)

.docx

School

University of Missouri, Kansas City *

*We aren’t endorsed by this school

Course

5560

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by DukeFreedom11576

Report
Name: Vignesh Mannava Section: 3 1. [ 20 points ] Suppose you logged in your social network website and updated your profile picture and called one of your friends to check. Your friend joins the website and still sees your old picture you had. Draw an event diagram like the one shown in class to show how this can happen in a replicated data system. Event Diagram: Profile Picture Updates Client Server 1 Server 2 Two servers keep the user credentials (replicated data). Password is updated in one server, but the login is attempted in the other server before the password is updated in the second one. Friend Me Update Picture Failed to see the Updated Picture Updated Picture Sign In Picture Updated Not Updated Picture
2. (a) [ 15 points ] What does the following three consistency models mean? a. Consistent prefix Consistent prefix: This structure ensures that out-of-order writes are never seen by readers. This implies that every read of a data item will always see the first write before the second write if an edit to the data item happens before another write. The data might not always be up to date, though. For instance, even if the initial write is the most recent one, a read of the data item can return the subsequent write if there is a write to it and additional writing happens before the first write has been reproduced to every duplicate. b. Bounded staleness Bounded staleness: This paradigm ensures that clients will never see material that is older than a certain period of time. The staleness bound refers to the maximum period of time during which information can be outdated. A read of a data item will never return data that is older than five seconds, for instance, if the staleness restriction is set at five seconds. The information might not always be up to date, though. For instance, even if the first write is the most recent, a read of the data item may return the subsequent write if a write to it happens and then another writing to the same data item happens before the first write has been replicated to all replicas. c. Monotone read Monotone read: The technique ensures that reading a data item will always yield an escalating sequence of data or the same value. This implies that a read of the data item will never return the second write if the first write has already been accessed if a write to the data item happens and then another write to the same piece of data happens before the first write has been propagated to all replicas. Strong consistency ensures that readers consistently view the most current writing, and it is the stronger of all these fidelity models. Those are, nonetheless, also far more effective, and scalable than solid consistency.
(b) [ 15 points ] Suppose your changed your profile picture to these fruits in this order: d. On Monday, “Apple” e. On Tuesday, “Orange” f. On Friday, “Mango” g. On Sunday, “Pineapple” Your friend saw your updates in the following listed orders: Which consistency models do these updates satisfy? (it can be zero or more models)? Explain your answer in short. (i) “Apple”, “Orange” This order matches the update order and satisfies the constrained staleness and monotone read consistency Prefixes. (ii) On Monday “Apple”, on Sunday “Mango”. This order satisfies the bounded staleness and monotone read consistency models, but not the consistent prefix consistency model, because the friend observed the "Mango" update before the "Orange" update. (iii) On Monday “Pears”, On Wednesday “Watermelon”, on Sunday “Pineapple”. This order fulfills the bounded staleness consistency model because the buddy observed all of the updates, but it does not satisfy the consistent prefix or monotone read consistency models because the updates were observed in a different order than they were applied.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help