Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
218
|
第
12
章
12.6 Gossip
传播
群众始终是精神时疫的滋生地。
—
Carl Jung
为了纳入其他节点,并让更新的传播具有广播的
范围
和反熵的
可靠性
,我们可以用
Gossip
译注 1
协议。
Gossip
协议
是一种概率性的通信过程,它是基于谣言在人类社会中的传播方式或疾病在
人群中的传播方式。谣言和流行病十分形象地描述了该协议的工作方式:只要还有想听
的人,谣言就会继续蔓延;只要人群中还有易感的成员,疾病就会继续传播。
Gossip 协议的主要目标是使用协作式的传播将信息从一个进程传播到集群的其余部分。
就像病毒在整个人群中传播的过程,它从一个人传染给另一个人,每一步都可能扩大感
染的范围,Gossip 协议中信息也在系统中不断中继,使越来越多的进程参与进来。
持有需要传播的记录的进程称为
传染性的
(infective),而任何尚未收到更新的进程称为
易感染的
(susceptible)。传染性的进程经过一段时间的主动传播之后,不再传播新状态,
这时我们称它为
已删除的
(removed)[DEMERS87]。所有进程都以易感染状态开始。每
当某个数据记录的更新到达时,接收到该更新的进程将变成传染性状态,并开始将更新
分发给其他
随机的
相邻进程,从而感染它们。一旦传染性进程确定更新已经传播,它们
就会变成已删除状态。
为了避免显式的协调和维护全局的接收者列表,以及避免要求单个协调者向系统中的每
个参与者都广播消息,这类算法使用
兴趣损失
(loss of interest)函数建模完整性。协议
的效率取决于:在将发送冗余消息的开销保持在最低的情况下,能多快地 ...
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