Optimistic replication

Optimistic replication, also known as lazy replication,[1][2] is a strategy for replication, in which replicas are allowed to diverge.[3]

Traditional pessimistic replication systems try to guarantee from the beginning that all of the replicas are identical to each other, as if there was only a single copy of the data all along. Optimistic replication does away with this in favor of eventual consistency, meaning that replicas are guaranteed to converge only when the system has been quiesced for a period of time. As a result, there is no longer a need to wait for all of the copies to be synchronized when updating data, which helps concurrency and parallelism. The trade-off is that different replicas may require explicit reconciliation later on, which might then prove difficult or even insoluble.

Algorithms

An optimistic replication algorithm consists of five elements:

  1. Operation submission: Users submit operations at independent sites.
  2. Propagation: Each site shares the operations it knows about with the rest of the system.
  3. Scheduling: Each site decides on an order for the operations it knows about.
  4. Conflict resolution: If there are any conflicts among the operations a site has scheduled, it must modify them in some way.
  5. Commitment: The sites agree on a final schedule and conflict resolution result, and the operations are made permanent.

There are two strategies for propagation: state transfer, where sites propagate a representation of the current state, and operation transfer, where sites propagate the operations that were performed (essentially, a list of instructions on how to reach the new state).

Scheduling and conflict resolution can either be syntactic or semantic. Syntactic systems rely on general information, such as when or where an operation was submitted. Semantic systems are able to make use of application-specific information to make smarter decisions. Note that state transfer systems generally have no information about the semantics of the data being transferred, and so they have to use syntactic scheduling and conflict resolution.

Examples

One well-known example of a system based on optimistic replication is the CVS version control system, or any other version control system which uses the copy-modify-merge paradigm. CVS covers each of the five elements:

  1. Operation submission: Users edit local versions of files.
  2. Propagation: Users manually pull updates from a central server, or push changes out once the user feels they are ready.
  3. Scheduling: Operations are scheduled in the order that they are received by the central server.
  4. Conflict resolution: When a user pushes to or pulls from the central repository, any conflicts will be flagged for that user to fix manually.
  5. Commitment: Once the central server accepts the changes which a user pushes, they are permanently committed.

A special case of replication is synchronization, where there are only two replicas. For example, personal digital assistants (PDAs) allow users to edit data either on the PDA or a computer, and then to merge these two datasets together. Note, however, that replication is a broader problem than synchronization, since there may be more than two replicas.

Other examples include:

Implications

Applications built on top of optimistic replicated databases need to be careful about ensuring that the delayed updates observed do not impair the correctness of the application.

As a simple example, if an application contains a way of viewing some part of the database state, and a way of editing it, then users may edit that state but then not see it changing in the viewer. Alarmed that their edit "didn't work", they may try it again, potentially more than once. If the updates are not idempotent (e.g., they increment a value), this can lead to disaster. Even if they are idempotent, the spurious database updates can lead to performance bottlenecks, especially when the database systems are processing heavy loads; this can become a vicious circle.

Testing of applications is often done on a testing environment, smaller in size (perhaps only a single server) and less loaded than the "live" environment. The replication behaviour of such an installation may differ from a live environment in ways that mean that replication lag is unlikely to be observed in testing, masking replication-sensitive bugs. Application developers must be very careful about the assumptions they make about the effect of a database update, and must be sure to simulate lag in their testing environments.

Optimistically replicated databases have to be very careful about offering features such as validity constraints on data. If any given update may or may not be accepted based on the current state of the record, then two updates (A and B) may be individually legal against the starting state of the system, but one or more of the updates may not be legal against the state of the system after the other update (e.g., A and B are both legal, but AB or BA are illegal). If A and B are both initiated at roughly the same time within the database, then A may be successfully applied on some nodes and B on others, but as soon as A and B "meet" and one is attempted on a node which has already applied the other, a conflict will be found. The system must, in this case, decide which update finally "wins", and arrange for any nodes that have already applied the losing update to revert it. However, some nodes may temporarily expose the state with the reverted update, and there may be no way to inform the user who initiated the update of its failure, without requiring them to wait (potentially forever) for confirmation of acceptance at every node.

References

  1. ^ Ladin, R.; Liskov, B.; Shrira, L.; Ghemawat, S. (1992). "Providing high availability using lazy replication". ACM Transactions on Computer Systems. 10 (4): 360–391. CiteSeerX 10.1.1.586.7749. doi:10.1145/138873.138877. S2CID 2219840.
  2. ^ Ladin, R.; Liskov, B.; Shrira, L. (1990). Lazy replication: exploiting the semantics of distributed services. Proceedings of the Ninth Annual ACM Symposium on Principles of Distributed Computing. pp. 43–57. doi:10.1145/93385.93399.
  3. ^ Saito, Yasushi; Shapiro, Marc (2005). "Optimistic replication". ACM Computing Surveys. 37 (1): 42–81. CiteSeerX 10.1.1.324.3599. doi:10.1145/1057977.1057980. S2CID 1503367.
  4. ^ Gray, J.; Helland, P.; O’Neil, P.; Shasha, D. (1996). The dangers of replication and a solution (PDF). Proceedings of the 1996 ACM SIGMOD International Conference on Management of Data. pp. 173–182. doi:10.1145/233269.233330.[permanent dead link]
  5. ^ Terry, D.B.; Theimer, M.M.; Petersen, K.; Demers, A.J.; Spreitzer, M.J.; Hauser, C.H. (1995). Managing update conflicts in Bayou, a weakly connected replicated storage system. Proceedings of the Fifteenth ACM Symposium on Operating Systems Principles. pp. 172–182. doi:10.1145/224056.224070.
  6. ^ Kermarrec, A.M.; Rowstron, A.; Shapiro, M.; Druschel, P. (2001). The IceCube approach to the reconciliation of divergent replicas. Proceedings of the Twentieth Annual ACM Symposium on Principles of Distributed Computing. pp. 210–218. doi:10.1145/383962.384020.

Read other articles:

Aghireşu EgeresDesaReruntuhan Kastil AghireşuLocation of the settlement on County mapLua error in Modul:Location_map at line 425: Kesalahan format nilai koordinat.Koordinat: Lua error in package.lua at line 80: module 'Module:ISO 3166/data/RO' not found.Country RumaniaCountyCluj CountyStatusCommune (Comună)Settled1263Commune seatAghireşuVillagesAghireşu, Aghireşu-Fabrici, Arghişu, Băgara, Dâncu, Dorolţu, Inucu, Leghia, Macău, Ticu, Ticu-ColoniePemerintahan • MayorLehe…

Mabel Normand nel 1918 Mabel Normand, nome completo Mabel Ethelreid Normand (New Brighton, 9 novembre 1892 – Monrovia, 22 febbraio 1930), è stata un'attrice, sceneggiatrice, regista e produttrice statunitense. Indiscussa regina della commedia durante l'epoca gloriosa e pionieristica del muto, si guadagnò l'appellativo di Charlot femmina che, per quanto riduttivo, dimostra il valore del personaggio e la stima di cui godeva a suo tempo. Normand fu una tra le prime grandi star del cinema, prota…

Festival Lagu Populer Indonesia 1983Kompilasi karya Various ArtistDirilis1983Direkam?GenrePopDurasi?LabelMusica StudiosSeries Festival Lagu Populer Indonesia 1982 (1982)'Festival Lagu Populer Indonesia 1982'1982 Festival Lagu Populer Indonesia 1983 (1983) Festival Lagu Populer Indonesia 1984 (1984)'Festival Lagu Populer Indonesia 1984'1984 Festival Lagu Populer Indonesia 1983 adalah Album kompilasi yang dirilis pada tahun 1984. Daftar lagu SALAMKU UNTUKNYA (Irianti Erningpradja, Adjie Soetam…

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Desember 2023. Untuk Pahlawan Nasional Indonesia, lihat KH Fakhruddin. Untuk Ketua Umum Muhammadiyah, lihat Abdul Rozak Fachruddin. Untuk kegunaan lain, lihat Fakhruddin (disambiguasi). Gaya atau nada penulisan artikel ini tidak mengikuti gaya dan nada penulisan ensikl…

Pistol based on the AR-15 design This AR-15 style–pistol has a shorter barrel and has no buttstock. An AR-15–style pistol is a handgun assembled using an AR-15–style receiver with suitable parts to create a pistol held and fired with one hand. History Colt's Manufacturing Company began marketing the Colt AR-15 self-loading rifle in 1964.[1] These rifles were assembled from interchangeable parts designed to allow replacement of malfunctioning parts without the gunsmith skills and to…

Masjid An-Nur Tongkang東港清真寺AgamaAfiliasiIslamCabang/tradisiSuniLokasiLokasiDonggang, Kabupaten Pingtung, TaiwanKoordinat22°27′40.9″N 120°26′47.7″E / 22.461361°N 120.446583°E / 22.461361; 120.446583Koordinat: 22°27′40.9″N 120°26′47.7″E / 22.461361°N 120.446583°E / 22.461361; 120.446583ArsitekturTipeMasjidRampung18 Februari 2018 Masjid An-Nur Tongkang (Bahasa Tionghoa: 東港清真寺; Hanyu Pinyin; Dōnggǎng Qīngz…

Aspect of nonverbal communication For other uses, see Posture. For posture in a physical context, see Human positions. Young Girl Holding a Letter, circa 1665 In humans, posture can provide a significant amount of important information through nonverbal communication. Psychological studies have also demonstrated the effects of body posture on emotions. This research can be traced back to Charles Darwin's studies of emotion and movement in humans and animals.[1] Currently, many studies ha…

Airports of Thailand plc.JenisPublikIndustriTransportasiDidirikan30 September 2002KantorpusatBangkok, ThailandTokohkunciSaprang Kalayanamitr (CEO)ProdukOperasi dan layanan bandar udaraPendapatan52,783 juta Baht (2016)Laba operasi19,571 juta Baht (2016)Situs webhttp://www.airportthai.co.th/ Airports of Thailand plc. (disingkat AOT) merupakan sebuah perusahaan publik Thailand, menangani beberapa bandar udara nasional. Didirikan pada 30 September 2002 setelah dibuat menjadi perusahaan swasta, yang …

Football clubSV Real RinconFull nameSportvereniging Real RinconNickname(s)RealFounded1957[1]GroundStadion Antonio Trenidat, Rincon, Bonaire[1]Capacity1,500[1]ManagerDanielo TrenidatLeagueBonaire League2018–19Bonaire League, 1st (champions) Home colours Away colours SV Real Rincon is a football club from the town of Rincon in Bonaire in the Caribbean Netherlands. The team has won the Bonaire League on 11 occasions, most recently in 2018–19, as well as twice finishing t…

جامعة جرايسلاند معلومات التأسيس 1895  الموقع الجغرافي إحداثيات 40°36′58″N 93°55′33″W / 40.616°N 93.9258°W / 40.616; -93.9258   الرمز البريدي 50140[1]  المكان لاموني  البلد الولايات المتحدة  إحصاءات عدد الطلاب 1517 (سبتمبر 2020)[1]  عدد الموظفين 324 (سبتمبر 2020)[1]  ال…

American baseball player (1852–1931) Baseball player Jack BurdockSecond basemanBorn: April 1852 (1852-04)Brooklyn, New York, U.S.Died: November 27, 1931(1931-11-27) (aged 79)Brooklyn, New York, U.S.Batted: RightThrew: RightMLB debutMay 2, 1872, for the Brooklyn AtlanticsLast MLB appearanceJune 23, 1891, for the Brooklyn GroomsMLB statisticsBatting average.250Home runs18Runs batted in501 Teams Brooklyn Atlantics (1872–1873) New York Mutuals (1874) Hartf…

1991 Indian filmThoothu Po ChellakkiliyeTheatrical release posterDirected byKasthuri RajaWritten byKasthuri RajaProduced byK. PrabhakaranStarringVarunrajSenbagamVaidegiCinematographyK. B. AhmedEdited byLancy MohanMusic byDevaProductioncompanyAnbalaya FilmsRelease date 6 December 1991 (1991-12-06) CountryIndiaLanguageTamil Thoothu Po Chellakkiliye (transl. Pet parrot, go as messenger) is a 1991 Indian Tamil-language romantic drama film written and directed by Kasthuri Raja. T…

Real Salt LakeNama lengkapReal Salt LakeJulukanClaret and Cobalt[1]Berdiri14 Juli 2004; 19 tahun lalu (2004-07-14)StadionStadion Rio TintoSandy, Utah(Kapasitas: 20,213[2])Ketua Dell Loy HansenPelatih kepala Pablo MastroeniLigaMajor League Soccer2021Wilayah barat: ke-7Keseluruhan: ke-13Play-off: Semi-finalSitus webSitus web resmi klub Kostum kandang Kostum tandang Musim ini Real Salt Lake merupakan sebuah tim sepak bola Amerika Serikat yang bermain di divisi utama Major …

1992 crime novel by Miyuki Miyabe All She Was Worth AuthorMiyuki MiyabeOriginal title火車 [Kasha]TranslatorAlfred BirnbaumCountryJapanLanguageJapaneseGenreCrime novelPublisherMariner Books (Eng. tran.)Publication date1992Published in English1996Media typePrint (Hardback & Paperback)ISBN978-0-395-96658-7OCLC41096131 All She Was Worth is a crime novel by Miyuki Miyabe. It was originally published under the Japanese title Kasha (Japanese: 火車). Plot introduction In 1992, Tok…

Play written by Will Ferrell You're Welcome America. A Final Night With George W BushPoster for You're Welcome America. A Final Night With George W BushWritten byWill FerrellCharactersGeorge W. BushDate premieredFebruary 5, 2009 (2009-02-05)Place premieredCort TheatreNew York CityOriginal languageEnglishGenreComedy You're Welcome America. A Final Night with George W Bush is a comedic Broadway play written by and starring American comedian Will Ferrell as George W. Bush, which ran …

Cet article est une ébauche concernant l’économie et les États-Unis. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Ronald Reagan lors d'un discours télévisé dans le Bureau ovale, présentant son plan législatif sur la réduction des impôts, en juillet 1981. Les Reaganomics, mot-valise de « Reagan » et « economics », fait référence aux politiques économiques du président des É…

Bulgarian political party Volya Movement Движение ВоляLeaderVeselin MareshkiFounded15 July 2007; 16 years ago (2007-07-15) (Liberal Alliance)4 November 2012 (2012-11-04) (Today)28 November 2016 (2016-11-28) (Volya)Split fromOrder, Law and JusticePreceded byNational Movement for Freedom and DemocracyHeadquartersVarna, BulgariaIdeologyBulgarian nationalism[1]Right-wing populism[2][3][4][5]…

Community college in Grayson County, Texas, U.S. For the similarly named defunct college in Whitewright, see Grayson College (1887–1912). Grayson CollegeThe Administration Building at the main campus in DenisonFormer namesGrayson County College (1965–2012) [1]TypePublic community collegeEstablished1965[2]PresidentJ. P. McMillenAdministrative staff270[3][4]Students5,000+[5]LocationDenison, Texas, United States33°42′22″N 96°38′04″W / &#…

Ankylosaurid dinosaur genus from the Late Cretaceous Period Not to be confused with Ankylosuchus. AnkylosaurusTemporal range: Late Cretaceous (Maastrichtian), 68–66 Ma PreꞒ Ꞓ O S D C P T J K Pg N ↓ Cast of Ankylosaurus skull (AMNH 5214) in front view, Museum of the Rockies Scientific classification Domain: Eukaryota Kingdom: Animalia Phylum: Chordata Clade: Dinosauria Clade: †Ornithischia Clade: †Thyreophora Clade: †Ankylosauria Family: †Ankylosauridae Subfamily: †Anky…

Canadian actress Nell ShipmanShipman in 1918BornHelen Foster-Barham(1892-10-25)October 25, 1892Victoria, British Columbia, CanadaDiedJanuary 23, 1970(1970-01-23) (aged 77)Cabazon, California, U.S.Occupation(s)Actress, screenwriter, director, producer, animal trainerYears active1910–1947Spouses Ernest Shipman ​(m. 1910⁠–⁠1920)​ Charles H. Austin Ayers ​ ​(m. 1925⁠–⁠1932)​ PartnerBer…

Kembali kehalaman sebelumnya