Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
166
|
第
8
章
定要怀疑最后一个确认消息是否已送达目的地。
注意我们没有做任何时序上的假设:将军间的通信是完全异步的。并没有一个上限约束
将军必须在多长时间内做出回应。
8.5 FLP
不可能定理
Fisher、Lynch 和 Paterson 在论文中描述了一个著名的问题:
FLP 不可能问题
[FISCHER85]
(FLP 是作者姓氏的首字母),论文讨论了一种共识形式:各进程启动时有一个初始值,
并尝试就新值达成共识。算法完成后,所有正常进程上的新值必须相同。
如果网络完全可靠,很容易对特定值达成共识。但实际上,系统容易出现各式各样的故
障,例如消息丢失、重复、网络分区,以及进程缓慢或崩溃。
共识协议描述了这样一个系统:给定
初始状态
的多个进程,它将所有进程带入
决定状态
。
一个正确的共识协议必须具备以下三个属性:
一致性
协议达成的决定必须是一致的:每个进程都做出了决定且所有进程决定的值是相同
的。否则我们就尚未达成共识。
有效性
达成共识的值必须由某一个参与者
提出
,这意味着系统本身不能“提出”值。这也
意味着这个值不是无关紧要(trivial)的:进程不能总是决定某个预定义的默认值。
终止性
只有当所有进程都达到决定状态时,协议才算完成。
文献 [FISCHER85] 假定处理过程是完全异步的,进程之间没有共享的时间概念。这样的
系统中的算法不能基于超时,并且一个进程无法确定另一个进程是崩溃了还是仅仅运行
太慢。论文表明,在这些假设下,不存在任何协议能保证在有限时间内达成共识。完全
异步的共识算法甚至无法容忍一个远程进程无通知地突然崩溃。 ...
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