[ad_1]
Eventual consistency is a programming model where the current version of a program will deploy until every replica is consistent. Conflicts are resolved through write, read, or asynchronous repair methods. This process is used in optimistic replication, distributed shared memory, and distributed transactions.
Eventual consistency is a programming model in which programmers assume that over a long enough period of time and with no changes to a system, the current version of a particular program will deploy until every replica of the program is consistent. The concept of eventual consistency is used in programming methods such as optimistic replication, distributed shared memory, and distributed transactions. For databases, any consistency is achieved through a three-step process. First, the distributed information is made available on the system; this is followed by a soft state, where different users may still be working with different versions of the data; and finally consistency is achieved and all computers have access to identical data.
One of the most visible ways in which any consistency is enforced has to do with software updates that are distributed online. For the first few seconds after an update is released, nobody will have it; not enough time has passed for software users to download and install the update. This is the “available” status; the update exists, but has yet to be deployed. Over time, as users download the update, some will get it and some won’t. However, after enough time has passed, everyone using the software will be updated to the latest version. This is the premise behind the eventual consistency state: given enough time, any update will fully propagate throughout the system.
As the system works towards eventual consistency, conflicts are inevitable. These occur when the program version or information currently on your computer does not match the “model version” of the program. Programs are usually set up to recognize such conflicts and handle them. When the files on a specific computer are older than the latest model version of the software or data in question, the system usually prompts the user to initiate an update to resolve the disparity.
There are three possible methods to perform these resolutions: write repair, read repair, and asynchronous repair. All of these methods bring the program or data version in line with the consistent model. The key difference between these has to do with how the system times the repair operation. All of these operations have advantages and disadvantages.
In a write repair, changes to code stored on the computer are made during a write operation, when the computer is already writing something to the system’s hard drive. This fixes the inconsistency, bringing the program or data in line with the model, but it also temporarily slows down the original write operation. For a read repair, the repair operation occurs during one read cycle from the hard drive. This, in turn, slows down the read operation. In asynchronous repair, repair occurs when neither a read nor a write operation occurs, leading to the consumption of idle cycles on the CPU.
[ad_2]