bc https://en.wikipedia.org/wiki/Gossip_protocol

  • 分布式容错性:分布式网络极其鲁棒,能够容忍部分节点的异常状态;
  • 不可篡改性:一致提交后的数据会一直存在,不可被销毁或修改;
  • 隐私保护性:密码学保证了数据隐私,即便数据泄露,也无法解析。

随之带来的业务特性将可能包括:

  • 可信任性:区块链技术可以提供天然可信的分布式账本平台,不需要额外第三方中介机构参与;
  • 降低成本:跟传统技术相比,区块链技术可能带来更短的时间、更少的人力,降低维护成本;
  • 增强安全:区块链技术将有利于安全、可靠的审计管理和账目清算,减少犯罪风险。

比特币区块链已经支持了简单的脚本计算,但仅限于数字货币相关的处理。除了支持数字货币外,还可以将区块链上执行的处理过程进一步泛化,即提供智能合约(Smart
Contract)。智能合约可以提供除了货币交易功能外更灵活的合约功能,执行更为复杂的操作。

这样扩展之后的区块链,已经超越了单纯数据记录的功能了,实际上带有点“智能计算”的意味了;更进一步地,还可以为区块链加入权限管理,高级编程语言支持等,实现更强大的、支持更多商用场景的分布式账本。

据参与者的不同,可以分为公有(Public)链、联盟(Consortium)链和私有(Private)链。

公有链,顾名思义,任何人都可以参与使用和维护,典型的如比特币区块链,信息是完全公开的。

如果进一步引入许可机制,可以实现私有链和联盟链两种类型。

私有链,由集中管理者进行管理限制,只有内部少数人可以使用,信息不公开。

联盟链则介于两者之间,由若干组织一起合作维护一条区块链,该区块链的使用必须是带有权限的限制访问,相关信息会得到保护,典型如供应链机构或银行联盟。

目前来看,公有链更容易吸引市场和媒体的眼球,但更多的商业价值会在联盟链和私有链上落地。

根据使用目的和场景的不同,又可以分为以数字货币为目的的货币链,以记录产权为目的的产权链,以众筹为目的的众筹链等……,也有不局限特定应用场景的通用链。

现有大部分区块链实现都至少包括了网络层、共识层、智能合约和应用层等结构,联盟链实现往往还会引入一定的权限管理机制。

问题是什么?

This
problem appears both in data consistency maintenance and in
synchronization of a cluster state (propagation of the cluster
membership information and so on). Although the problem above can
be solved by means of a global coordinator that monitors a
database and builds a global synchronization plan or schedule,
decentralized databases take advantage of more
fault-tolerant approach
. The main idea is to use
well-studied epidemic protocols
[7] that are relatively simple, provide a pretty good convergence
time, and can tolerate almost any failures or network partitions.
Although there are different classes of epidemic algorithms, we
focus on anti-entropy protocols because
of their intensive usage in NoSQL databases.

Anti-entropy
protocols assume that synchronization is performed by a fixed
schedule – every node regularly chooses another node at random or
by some rule and exchanges database contents, resolving
differences. There are three flavors of anti-entropy protocols: push,
pull, and push-pull
. The idea of the push protocol is
to simply select a random peer and push a current state of data to
it. In practice, it is quite silly to push the entire database, so
nodes typically work in accordance with the protocol which is
depicted in the figure below.

这个问题当然可以通过global
coordinator来解决, 但是decentralized设计可以提供more fault-tolerant
approach的设计.

其实算法很简单,
就是epidemic protocols,
这儿选了在Nosql中广泛应用的anti-entropy protocols.

Push,
问B你有什么和我不同, B告诉我, 我把不同部分push给B

Pull,
告诉B我有什么, B把我没有的发给我

Push-pull,
把上面两个同时结合做了, 图的下面两条线箭头画反了

Anti-entropy
protocols provide reasonable good convergence time and
scalability. The following figure shows simulation results for
propagation of an update in the cluster of 100 nodes. On each
iteration, each node contacts one randomly selected peer.

One
can see that the pull style provides better convergence than the
push, and this can be proven theoretically [7]. Also, push has a
problem with a “convergence tail” when a small percent of nodes
remains unaffected during many iterations, although almost all
nodes are already touched. The Push-Pull approach greatly improves
efficiency in comparison with the original push or pulls
techniques, so it is typically used in practice. Anti-entropy is
scalable because the average conversion time grows as a
logarithmic function of the cluster size.

Although
these techniques look pretty simple, there are many studies [5]
regarding performance of anti-entropy protocols under different
constraints. One can leverage knowledge of the network topology to
replace a random peer selection by a more efficient schema [10];
adjust transmit rates or use advanced rules to select data to be
synchronized if the network bandwidth is limited [9]. Computation
of digest can also be challenging, so a database can maintain a
journal of the recent updates to facilitate digests computing.

怎么衡量Anti-entropy
protocols, 当然是通过convergence
 time, 
肯定是Push-pull效率最高

原文地址:https://www.cnblogs.com/SZLLQ2000/p/9216767.html

时间: 2024-08-30 06:26:31

bc https://en.wikipedia.org/wiki/Gossip_protocol的相关文章

kerberos (https://en.wikipedia.org/wiki/Kerberos_(protocol))

Protocol[edit] Description[edit] The client authenticates itself to the Authentication Server (AS) which forwards the username to a key distribution center(KDC). The KDC issues a ticket-granting ticket (TGT), which is time stamped, encrypts it using

Consul 基本概念,同类比较和内部原理

这个文章我们主要来说一下Consul的基本概念,以及其实现的内部原理,和Eureka的比较. # 1.什么是Consul?Consul是一种服务网格解决方案,提供具有服务发现,配置和分段功能的全功能控制平面. 这些功能中的每一个都可以根据需要单独使用,也可以一起使用以构建全服务网格. Consul需要数据平面并支持代理和本机集成模型. Consul附带一个简单的内置代理,因此一切都可以开箱即用,但也支持第三方代理集成,如Envoy.Consul 提供的关键功能: - 服务发现:Consul的客户

[skill][https][ssl/tls] HTTPS相关知识汇总

结论前置: A 身份验证 证书, 服务器证书 B 密钥协商 RSA   DHE / ECDHE   PSK C 加密通信 加密通信采用对称加密,使用B阶段协商出来的密钥. B 阶段如果使用 RSA 协商,可以用服务器证书在协商过程中解密到 C过程中的密钥.从而解密通信内容.(此方式下,采用旁路方式就可以). B 阶段如果使用DHE/ECDHE协商,至少需要建立链接时的server魔数(也许还需要私钥即服务器证书)才能计算出加密密钥.简单来说协商过程也是一次一密. 于是,应该有两种情况可以解密ht

Android安全之Https中间人攻击漏洞

Android安全之Https中间人攻击漏洞 Android安全 Https 攻击漏洞 应用加固 御安全 MITM 0X01 概述   HTTPS,是一种网络安全传输协议,利用SSL/TLS来对数据包进行加密,以提供对网络服务器的身份认证,保护交换数据的隐私与完整性. 中间人攻击,Man-in-the-middle attack,缩写:MITM,是指攻击者与通讯的两端分别创建独立的联系,并交换其所收到的数据,使通讯的两端认为他们正在通过一个私密的连接与对方直接对话,但事实上整个会话都被攻击者完全

Broadmann area (wiki)

Sources: https://en.wikipedia.org/wiki/Brodmann_area Lateral surface Medial serface Areas 3, 1 & 2 – Primary Somatosensory Cortex (frequently referred to as Areas 3, 1, 2 by convention) Area 4 – Primary Motor Cortex Area 5 – Somatosensory Association

https WebAPi

前言 话说又来需求了,之前对于在SelfHost中需要嵌套页面并操作为非正常需求,这回来正常需求了,客户端现在加了https,老大过来说WebAPi访问不了了,这是什么情况,我去试了试,还真是这个情况,不知道如何下手啊,最终为了解决这个问题,漫长的探索之旅就这样开始了,希望给需要在SelfHost下启动Https的童鞋一点启示和帮助. 话题引入 当在客户端发送请求发送不过去时看了看谷歌控制台显示的消息大意是不能混合使用即客户端为https,则WebAPi不能为http,估计是为了安全的问题,于是

关于HTTPS理论和实践

Summary: HTTP 通信时,可能信息被监听.服务器或客户端身份伪装等安全问题,HTTPS 则能有效解决这些问题. 原始的HTTP连接的时候,因服务器与用户之间是直接进行明文传输,导致用户面临着很多的风险与威胁.攻击者可以轻易的截获或者篡改传输的数据.包括窃取用户的Session信息.注入有害的代码等,乃至于修改用户传送至服务器的数据. 我们并不能替用户选择所使用的网络,他们很有可能使用一个开放的,任何人都可以窃听的网络,譬如一个咖啡馆或者机场里面的开放WiFi网络.普通的 用户很有可能被

电路(转自Wiki)

英文网址:https://en.wikipedia.org/wiki/Electrical_network 电路(英语:Electrical circuit)或称电子回路,是由电气设备和元器件, 按一定方式连接起来,为电荷流通提供了路径的总体,也叫电子线路或称电气回路,简称网络或回路.如电源.电阻.电容.电感.二极管.三极管.晶体管.集成电路和电键等,构成的网络.硬件.负电荷可以在其中运动. 目录 [隐藏] 1术语定义 2电路种类 2.1电子电路 2.1.1模拟电路 2.1.2数字电路 2.2集

charles代理以及关于其抓取https信息的操作

一直没有写一篇关于charles的文章来记录,但是发现偶尔还是会忘记,所以还是记一下,查起来比较方便. 首先在安装了charles之后默认的本地代理地址是 127.0.0.1:8888这个地址.如果希望代理本地计算机的http流量或者socks流量,可以将代理地址设置到127.0.0.1:8888这个地址上,就能在charles上查看到现在正在使用的流量了. 其实我平时常用的代理并不是代理pc上的流量,因为现在大部分现代浏览器都自带可以看包的功能,所以更多的时候,我可能需要使用它来代理我手机上的