Кіріспе
Жоғары қолжетімділікке жету үшін үлестірілген есептеуде қолданылатын сәйкестік моделі – ақырғы сәйкестік. Ақырғы сәйкестік – бұл белгілі бір деректер элементіне жаңа жаңартулар енгізілмесе, аталған элементке жасалатын барлық сұраулардың соңында соңғы жаңартылған мәнді қайтаратынын бейресми түрде кепілдендіретін үлестірілген есептеуде қолданылатын сәйкестік моделі. Оптимистік көшірмелеу деп те аталатын ақырғы сәйкестік үлестірілген жүйелерде кеңінен қолданылады және алғашқы мобильді есептеу жобаларында пайда болды. Ақырғы сәйкестікке қол жеткізген жүйе жиі конвергенцияға жеткен немесе көшірмелер конвергенциясына қол жеткізген деп айтылады. Ақырғы сәйкестік – әлсіз кепілдік, ал желілік тұрақтылық сияқты күшті модельдер ақырғы сәйкестікке қарағанда қарапайым. Ақырғы сәйкестік қызметтері көбінесе BASE семантикасын (негізінен қолжетімді, жұмсақ күй, ақырғы сәйкестік) ұсынады, бұл дәстүрлі ACID (атомдық, тұрақтылық, оқшаулау, беріктік) принциптеріне қарама-қарсы келеді. Химияда негіз қышқылға қарама-қарсы болады, бұл аббревиатураны есте сақтауға көмектеседі. Осы дереккөз бойынша, BASE терминдерінің шамамен анықтамалары:
Негізінен қолжетімді: оқу және жазу операциялары мүмкіндігінше қолжетімді (деректер қоры кластерінің барлық түйіндерін пайдалана отырып), бірақ дәйекті болуы міндетті емес (конфликтілер шешілгеннен кейін жазу сақталмауы мүмкін, ал оқу соңғы жазуды көрсетпеуі мүмкін).
Жұмсақ күй: дәйектілік кепілдігі болмағандықтан, біраз уақыт өткеннен кейін күйді білудің белгілі бір ықтималдығы ғана бар, өйткені ол әлі конвергенцияланбаған болуы мүмкін.
Ақырғы сәйкестік: егер жазу операциялары орындалса және жүйе жеткілікті ұзақ жұмыс істесе, деректердің күйін білуге болады; осы деректерге жасалатын кез келген қосымша оқулар бірдей мәнді қайтарады.
Eventual consistency is a consistency model used in distributed computing to achieve high availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value. Eventual consistency, also called optimistic replication, is widely deployed in distributed systems and has origins in early mobile computing projects. A system that has achieved eventual consistency is often said to have converged, or achieved replica convergence. Eventual consistency is a weak guarantee – most stronger models, like linearizability, are trivially eventually consistent. Eventually consistent services are often classified as providing BASE semantics (basically available, soft state, eventual consistency), in contrast to traditional ACID (atomicity, consistency, isolation, durability). In chemistry, a base is the opposite of an acid, which helps in remembering the acronym. According to the same resource, these are the rough definitions of each term in BASE:
Basically available: reading and writing operations are available as much as possible (using all nodes of a database cluster), but might not be consistent (the write might not persist after conflicts are reconciled, and the read might not get the latest write)
Soft state: without consistency guarantees, after some amount of time, we only have some probability of knowing the state, since it might not yet have converged
Eventually consistent: If we execute some writes and then the system functions long enough, we can know the state of the data; any further reads of that data item will return the same value
Eventual consistency is sometimes criticized as increasing the complexity of distributed software applications. This is partly because eventual consistency is purely a liveness guarantee (reads eventually return the same value) and does not guarantee safety: an eventually consistent system can return any value before it converges.
Ақырғы сәйкестік кейде үлестірілген бағдарламалық қамтамасыз етудің күрделілігін арттырады деп сынға ұшырайды. Бұл, ішінара, ақырғы сәйкестік тек тірі қалу кепілдігі (оқулар соңында бірдей мәнді қайтарады) және қауіпсіздікке кепілдік бермейді, себебі ақырғы сәйкестік жүйесі конвергенцияға дейін кез келген мәнді қайтара алады.
Eventual consistency is a consistency model used in distributed computing to achieve high availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value. Eventual consistency, also called optimistic replication, is widely deployed in distributed systems and has origins in early mobile computing projects. A system that has achieved eventual consistency is often said to have converged, or achieved replica convergence. Eventual consistency is a weak guarantee – most stronger models, like linearizability, are trivially eventually consistent. Eventually consistent services are often classified as providing BASE semantics (basically available, soft state, eventual consistency), in contrast to traditional ACID (atomicity, consistency, isolation, durability). In chemistry, a base is the opposite of an acid, which helps in remembering the acronym. According to the same resource, these are the rough definitions of each term in BASE:
Basically available: reading and writing operations are available as much as possible (using all nodes of a database cluster), but might not be consistent (the write might not persist after conflicts are reconciled, and the read might not get the latest write)
Soft state: without consistency guarantees, after some amount of time, we only have some probability of knowing the state, since it might not yet have converged
Eventually consistent: If we execute some writes and then the system functions long enough, we can know the state of the data; any further reads of that data item will return the same value
Eventual consistency is sometimes criticized as increasing the complexity of distributed software applications. This is partly because eventual consistency is purely a liveness guarantee (reads eventually return the same value) and does not guarantee safety: an eventually consistent system can return any value before it converges.
Қатты ықшамдық
Соңғы үйлесімділік тек тірі қалу кепілі (жаңартулар әрі қарай байқалады) болса, күшті соңғы үйлесімділік (SEC) бірдей (ретсіз) жаңартулар жиынтығын алған кез келген екі түйіннің бірдей күйде болатынына қауіпсіздік кепілін қосады. Егер жүйе монотонды болса, қосымша ешқашан кері қайтарылмайды. SEC-ті қамтамасыз етудің кең таралған тәсілі – қақтығыссыз көшірілген дерек түрлері.