Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
共识
|
259
献 [LAMPSON01] 还区分了
外
Quorum 和
决策
Quorum,它们可转换为准备和接受阶段,
并给出了类似于柔性 Paxos 中的 Quorum 定义。
14.3.8
共识的推广解法
Paxos 解释起来可能不大容易:它包含多个角色和多个步骤,还有各式各样的变体,常
常令人难以跟上。但其实我们可以用更简单的方式思考它。之前我们将参与者分成各
种角色,还划分了决策回合,现在,我们可以只用一组简单的概念和规则来实现与单
回合 Paxos 相同的保证。我们对该方法仅做简短的讨论,因为这还是一个相对较新的
进展 [HOWARD19]
—
了解它很重要,虽然我们尚未看到它的实现和实际应用。
假设有一个客户端和一组服务器。每个服务器上有多个
寄存器
(register),每个寄存器用
一个下标来标识。寄存器只能被写入一次,它可能处于以下三种状态之一:未写入、包
含一个
值
或包含
nil
(一个特殊的空值)。
不同服务器中下标相同的寄存器构成一个
寄存器集
。每个寄存器集可以包含一个或多个
Quorum。根据其中的寄存器的状态,Quorum 可能处于
未决定
(Any 和 Maybe v)或
已
决定
(None 和 Decided v)两种状态之一:
Any
取决于将来的操作,该 Quorum 可以决定为任何值。
Maybe v
如果该 Quorum 做出一个决定,那个决定只能是 v。
None
该 Quorum 无法决定出值。
Decided v
该 Quorum 已经决定出值 v。
客户端与服务器交换消息并维护一个状态表,用于跟踪值和寄存器,并可以从中推断出 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787111655169