Reading Papers about Distributed Replication

Postgres-XC集群部署实例(单机调试) Postgres-XC集群部署实例(单机调试)  开始接触神奇的xc :),边学变记录单机部署pgxc集群的方法,仅供娱乐与调试。后面的实例会继续补充。(使用单用户+切换pg环境变量的脚本在调试代码的时候很方便) 版本 链接 Postgres-XC1.0 1.1 1.2 https://sourceforge.net/projects/postgres-xc/files/?sour 阅读详情

A. Practical Byzantine Fault Tolerance


1.What’s its checkpoint?

We will refer to the states produced by the execution of these requests as checkpoints and we will say that a checkpoint with a proof is a stable checkpoint. When the replication code invokes the make_checkpoint upcall, snfsd gets all the copy-on-write bits and creates a (volatile) checkpoint record, containing the current sequence number, a list of blocks and the digest of the current state. snfsd computes a digest of a checkpoint state as part of a make_checkpoint upcall. Although checkpoints are only taken occasionally, it is important to compute the state digest incrementally because the state may be large. We can avoid sending the entire checkpoint by partitioning the state and stamping each partition with the sequence number of the last request that modified it. To bring a replica up to date, it is only necessary to send it the partitions where it is out of date, rather than the whole checkpoint. A request that has executed tentatively may abort if there is a view change and it is replaced by a null request. In this case the replica reverts its state to the last stable checkpoint in the new-view message or to its last checkpointed state (depending on which one has the higher sequence number).

It said that 'We will refer to the states produced by the execution of these requests as checkpoints and we will say that a checkpoint with a proof is a stable checkpoint'. How does it recording the states produced by the execution of these requests? Does it need to interrupt the execution? And where does it save the information of checkpoints? Who has the function to record checkpoints? What's a checkpoint with a proof?

It said that 'Each replica collects checkpoint messages in its log until it has 2f+1 of them for sequence number n with the same digest d signed by different replicas(including possibly its own such message). These 2f+1 messages are the proof of correctness for the checkpoint'. Why does it need to collect other replicas' checkpoint messages? Why could the checkpoint be wrong? Do these replicas have the same checkpoints? 


2.About its advantages and limitations


Advantages:
(a) To tolerate Byzantine faults, the paper proposes an algorithm which works in a asynchronous system like the Internet. Previous systems, such as Rampart and SecureRing, rely on the synchrony assumption for correctness, which is dangerous in the presence of malicious attacks.
(b) Also, it uses an efficient authentication scheme based on message authentication codes during normal operation; public-key cryptography, which was cited as the major latency and throughput bottleneck in Rampart, is used only when there are faults.
(c) The paper used the approach to implement a real service: a Byzantine-fault-tolerant distributed file system that support the NFS protocol. And the system is only 3% slower than the standard NFS daemon in the Digital Unix kernel during normal-case operation.
(d) It provides experimental results that quantify the cost of the replication technique.
(e) Applying the read-only optimization to lookup improves the performance of BFS significantly and reduces the overhead relative to BFS-nr to 20%. 
(f) If the primary has actually failed, the group will be unable to process client requests until the delay has expired. Our algorithm is not vulnerable to this problem because it never needs to exclude replicas from the group.

Limitation:
(a) The algorithm does not address the problem of fault-tolerant privacy: a faulty replica may leak information to an attacker. And they plan to investigate secret sharing schemes to solve the problem in the future.
(b) In this paper they assume that the client waits for one request to complete before sending the next one. But they can allow a client to make asynchronous requests, yet preserve ordering constraints on them.
(c) The overhead introduced by the replication library is due to extra computation and communication, such as executing cryptographic operations and an extra message round-trip.
(d) There is still much work to do on improving our system. One problem of special interest is reducing the amount of resources required to implement our algorithm. The number of replicas can be reduced by using f replicas as witness that are involved in the protocol only when some full replica fails. We also believe that it is possible to reduce the number of copies of the state to f+1 but the details remain to be worked out.
(e) Our approach cannot mask a software error that occurs at all replicas. However, it can mask errors that occur independently at different replicas, including nondeterministic software errors.


3.Others about the paper


It introduces the three-phase protocol in normal-case operation. The protocol aims to totally order requests. Here is my question: Does the three-phase protocol tolerate Byzantine faults? Or just to totally order requests? 
Another question is about view changes: How to select the new primary? It says that when the primary p of view v+1 receives 2f valid view-change messages for view v+1 from other replicas, it multicasts a

 

message to all other replicas. Is it related to the above question? 
My third question is that I still don’t understand what differences between it works in synchronous environment and asynchronous environment.
Maybe I couldn’t rebuild the system in the paper just according to the paper, but there are some approaches worthy for me to learn. For example, about checkpoint, we could  compute the state digest incrementally, and avoid sending the entire checkpoint by partitioning the sate.



B. Paxos Made Practical


1. What’s its checkpoint?


Since view numbers are monotonically increasing, the combination of view-id and timestamp, which we call a viewstamp, determines the execution order of all requests over time. When the primary receives a request from client, it will send a message to backups. And there is a field committed included. The field specifies a viewstamp below which the server has executed all requests and sent their results back to clients. These committed operations never need to be rolled back and can therefore be executed at backups. When the primary’s reply to the client gets lost and the primary subsequently fails, the cohort can re-execute the request after a reboot. In short, the checkpoint is used to record what requests have been executed, so that once fails, we don’t have to re-execute from the beginning. My question is that: Whether the whole request or one operation of the request does the checkpoint record?


2. About its advantages and limitations


Advantages:
(a) I think it build a clear view-change protocol. It considers the crashed cohort that fails to respond to message and the new cohort that may wish to join the system. And it is a multi-step process like Paxos, that involves first proposing a new view-id, then proposing the new view.
(b) The primary can temporarily respond to read-only requests without involving backups, if a majority of backups promise not to form a new view for 60 seconds. So that it could make the replication protocol more efficient.
(c) It employ a third machine, called a witness, that ordinarily sits idle without executing requests,but can participate in the consensus protocol to allow one of the other two replicas to form a view after a failure or network partition.

Limitation:
(a) In Practical Byzantine Fault Tolerance, its system uses view changes only to select a new primary but never to select a different set of replicas to form the new view. While in Paxos Made Practical, it uses view changes to form the new view. So I think the latter could learn from the former to reduce overhead.
(b) I believe it realizes consensus and view changes, but it doesn’t show the performance evaluation.


3. Others about the paper


In fact, the paper aims to solve the two limitations of Viewstamped Replication: (i) It doesn’t show how to replicate a simple system; (ii) It assumes that the set of possible cohorts is fixed over time. So the paper does it. It makes Paxos practical and easy to understand. 



C. Rex vs. Eve

Rex and Eve both aim at the multi-core server. In the paper of Rex, it often refers to Eve. So here I want to put them together and let them have a trail of strength with each other.


1. What’s its checkpoint?


Eve is an execute-verify architecture, and execute every batch of requests concurrently. So the checkpoint should be different from that of traditional SMR protocols. To achieve efficient state comparison and fine-grained checkpointing and rollback, Eve stores the state using a copy-on-write Merkle tree, whose root is a concise representation of the entire state.
Rex resorts to a general checkpointing framework to alleviate this burden. It doesn’t have the primary checkpoint periodically during its execution. Checkpointing cannot be done on a state where a request has not been processed completely because Rex does not have sufficient information for a replica to continue processing an incomplete request when re-starting from that checkpoint. When Rex decides to create a checkpoint, the primary sets the checkpoint flag, so that all threads will pause before taking on any new request. When a checkpoint is available on a replica, any committed trace before the cut points pf that checkpoint is no longer needed and can be garbage collected.


2. About its advantages and limitations


Eve Advantages:
(a) Eve will achieve a speedup of 6.5x compared to sequential execution with 16 execution threads.
(b) From the following figure (Figure 8), I think Eve has a good ability to recover from failure.

(c) Eve outperforms Remus by a factor of 4.7x and uses two orders of magnitude less network bandwidth because it can ensure that the states of replicas converge without requiring the transfer of all modified state.
(d) To keep its latency low while maintain a high peak throughput, Eve uses a dynamic batching scheme: the batch size decreases when the demand is low (providing good latency), and increases when the system starts becoming saturated, in order to leverage as much parallelism as possible.

Eve Limitations:
(a) Not implementing extra protection mode optimization for our asynchronous configurations.
(b) Our current implementation does not handle applications that include objects for which Java’s finalize method modifies state that need to be consistent across replicas.
(c) Our current prototype only supports in-memory application state.
(d) As the workload gets lighter (the execution time per request reduces), the overhead of Eve becomes more pronounced.
(e) What is the ability to handle concurrency faults? If bug exists in a replica, Eve can detect it, and then fix it by rolling back and re-execute sequentially; however, if bug occurs in two replica simultaneously, Eve can’t detect it.
(f) From the paper about Rex, handling on-disk state is tricky in the execute-verify model of Eve.


Rex Advantages:
(a) Rex has at most one active consensus instance at any time. The decision greatly simplifies the design of Rex.
(b) Eve’s correctness depends on marking the states of machines correctly, while Rex’s correctness depends on capture all the sources of non-determinism. Who is better? Compared to Eve, it is easy for Rex to find locks and nondeterministic functions among requests, because Rex uses its own synchronization primitives, so that Rex only needs to replace the interfaces of the program with its primitives to find all the locks and non-deterministic functions. Is it similar to LD_RRELOAD?

Rex Limitations:
(a) Rex introduces overhead in both execution of a primary for recording causal order and execution of secondary replicas for respecting that order.
(b) In Eve, replicas could execute independently, while in Rex, replicas could not, because they need to make the same nondeterministic decisions to ensure consistency.
(c) It is hard to find data race. But Rex thinks more and more people will realize the danger of data race.


3. Others about the paper


Does multithreading execution have relation to Byzantine faults? 
Eve realizes deterministic parallelism by mixer, as mixer will partitions the set of requests into non-conflicting batches. So that Eve can execute these batches concurrently without conflicts. While Rex is an execute-agree-follow model. At the beginning, it lets primary freely execute requests concurrently, meanwhile during its execution Rex will record the nondeterministic decisions into a trace. Then other machines should agree on the trace to ensure consensus. Secondary replicas would execute requests concurrently according the trace. I think Eve and Rex both find the nondeterministic decisions and conflicts among requests, and then let replicas agree on it to ensure consensus. My question is: do their approaches to capture the nondeterministic decisions have the same overhead? Who will be better?
About Rex, since we could remove unnecessary causal edges to reduce overhead, so if the client proposes three requests, and through execute state, we find that they are independent, so there is no causal edge among them, they could be executed concurrently. My thinking is that whether can we know they are independent without executing, just like preprocessing, so that we could omit the execute stage?










Java in easy steps Covers Java 9 6th Edition Java in easy steps Covers Java 9 6th Edition lambda 立即下载

相关推荐

About java

Think in java、Date structure based on java(数据结构与算法java版本)

Checkpoint Tuning and Troubleshooting Guide

Purpose: This bulletin provides the Database Administrator a better understanding of incremental checkpoint and ...

cuixie2370的博客 136

All About Java 8 Lambdas

java lambdas

MPPDB数据库新建表增加分布键心酸史

MPPDB小白,没有使用过MPPDB数据库的可能非常难找到MPPDB相关语法知识,建表语句都差不多,如下: CREATE TABLE table_name(colName1 varvhar,colName2 varchar); 这个语句可以一个表名为mppdb的表,但是如果这个表里面的数据较大而且数据分布不均匀的话,查询的时候就会出现“数据倾斜”的错误,这时候就需要分布键了,找了网上的方法被误解了,网上用DISTRIBUTED BY(字段名),事实上这是行不通的,于是寻找公司内部资料,找到了distri

qq_36785612的博客 2012

QCustomPlot实战:从入门到精通的数据可视化

本文详细介绍了如何使用QCustomPlot进行数据可视化,从基础环境搭建到高级图表定制,涵盖实时监控、多坐标系联动等实战技巧。基于Qt的QCustomPlot库以其强大的绘图能力和灵活的API,帮助开发者快速实现专业级数据可视化效果。

weixin_29003437的博客 115

gephi生成网络关系图_路网拓扑重建专题 (3) 网络图生成

城市道路网建模在获得基础路网之后,需要考虑道路交通网络的描述与表达问题。网络是将现实世界中的事物及其关系进行适当的抽象,构造成由节点和边按照一定规则组成的形式。一个实体网络可以由有限个“节点”集合与“边”集合构成的图表示,即网络表示为。对于一个由个节点组成的无权复杂网络,该图有邻接矩阵,这里。根据研究对象不同,建模方法主要包括原始法[1]和对偶法[2]两种,见图1,字母a-j为交叉口编号...

weixin_39761195的博客 3504

【国产数据库】GBase学习⑨ - 存储引擎

GBase 8c 提供了多种索引类型:hash,B-tree,gist,gin。每一种索引类型使用了一种不同的算法来适应不同类型的查询。GBase 8c 的数据分片策略:在创建表时,通过关键字distribute、replication来设置表分片策略。在此基础上,分区表功能,支持二级分区,9种分区组合,interval分区。interval分区:根据间隔自动创建分区,例如,1 day 、1 month(主备式)在不指定时,默认使用hash分片,分布式键按照顺序为第一个满足hash算法的字段。

学无止境 1861

从SGX到TDX:英特尔机密计算的技术演进与选型指南

本文深入解析了英特尔两代机密计算技术SGX与TDX的核心差异与选型策略。SGX提供应用级飞地隔离,安全等级高但开发复杂;TDX提供虚拟机级信任域保护,兼容性好且易于部署。文章结合金融与医疗行业实战案例,为开发者提供了清晰的选型指南,帮助根据代码可改性、安全需求、部署规模及生态成本选择最合适的机密计算方案。

java5的博客 421

Postgres-XL 10 使用介绍(一)

Postgres-XL 是一个基于PostgreSQL的一个开源项目,在此基础上提供可扩展的写入操作和大批量的并行处理.并且它是一个数据库组件集合体,可以将其安装在多个操作系统或虚拟机上.

driftingman的专栏 1484

哈工大集合论与图论(下)慕课MOOC答案

答案选自2023哈工大集合论与图论慕课,慕课的题重复率很高并且具有极高的相似性,选答案时要格外注意对比选项,能力有限答案不一定面面俱到,整理不易读者且用且珍惜。

qq_34168477的博客 2904

Unreal5 从入门到精通之 学习Niagara特效系统

UE5 Niagara粒子系统解析 Niagara是UE5中的高性能粒子特效系统,相比传统粒子系统具有完全可编程性和可视化节点编辑两大特点。核心单元发射器(Emitter)分为模板发射器(预设效果如喷泉、火焰)和空白发射器(高度自定义)。系统提供13种预设模板,包括吹飞粒子、五彩纸屑爆发、动态光束等常见特效。 Niagara采用三级模块化设计: 系统级:全局参数设置与更新 发射器级:控制粒子生成规则与行为 粒子级:处理单个粒子的生命周期和渲染 关键模块包括初始化粒子属性、物理模拟、颜色渐变等,支持GPU加速

TxNet 1127

一种DWS迁移Oracle的CONNECT BY语法的方案

本文提供一种GaussDB DWS迁移CONNECT BY语法方案。

华为云官方博客 1188

92. SAP ABAP 系统里长文本 Long Text 的设计和读取函数 READ_TEXT 的详细讲解

SAP ABAP中的长文本(Long Text)是指在SAP系统中存储和管理较长文本信息的一种机制。长文本通常用于存储描述性信息、注释、说明等,这些文本信息可能超过了标准数据库表字段的长度限制。 长文本的作用主要有以下几点: 1. 更多的信息存储:长文本允许您存储和显示比标准表字段允许的更多信息。例如,产品描述、用户注释、维护计划等可能需要大量的文本来详细描述。 2. 更好的可读性:长文本提供了更好的文本格式化选项,可以改善可读性。用户可以使用段落、列表、字体样式等格式化文本,以便更容易地理解和阅读。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 1999

【GaussDB(DWS)】数据分布式存储-三种类型的表

水平分表方式将一个数据表内的数据,按合适分布策略分散存储在多个节点内,DWS支持如表1所示的数据分布策略。用户可在CREATE TABLE时增加DISTRIBUTE BY参数,来对指定的表应用数据分布功能。DWS采用水平分表的方式,将业务数据表的元组打散存储到各个节点内。这样带来的好处在于,查询中通过查询条件过滤不必要的数据,快速定位到数据存储位置,可极大提升数据库性能。三种类型表测试完毕,感受是。

聚焦大数据、AI、数据库三大核心领域,分享 Flink/Spark 实时计算、数仓架构设计、AI 模型落地、数据库性能调优的实战干货,附可直接运行的源码与方案。提供企业技术内训、项目咨询与定制化服务,助力开发者与企业高效搞定数智技术难题。 5242

Plant Simulation 双深位立库开发系列教程-货架参数化

为了方便用户进行货架参数化,我们需要在交互界面上进行参数调整,右键打开RackLane,打开Dialog,在Rack_tab的tab下创建相应的对象,并创建NumberOfRightRack和NumberOfLeftRack作为数据连接对象。通过Rack._3D.VisibleGraphicGroups := ["default"]来切换需要显示的Rack,当不需要显示则可以Rack._3D.VisibleGraphicGroups := [""]即可。首先,加载默认的HBW库到模型中,确保结构树当中有。

santayana的专栏 1260

18、地下矿山中人工智能在区分真实微震事件与噪声信号的应用

本文提出一种基于遗传编程(GP)的新型经验模型,用于地下矿山中真实微震事件与噪声信号(特别是爆破信号)的自动区分。针对传统方法和常见机器学习算法存在的黑箱问题、过拟合及准确性不足等局限,GP模型通过符号回归和进化机制生成可解释的数学表达式,具备自动特征选择能力,有效提升了分类准确率。研究使用包含100个样本的真实数据库,结合敏感性分析优化模型参数,并与线性判别分析(LDA)进行对比,结果表明GP模型在分类性能上更具优势。该模型可应用于实时微震监测系统,提高矿山安全生产水平,降低误判带来的成本开销,具有良好的

assembly8low的博客 95

mysql distribute by_Mysql与分布式Gaussdb 100语法差异及常见问题汇总

mysql与gaussdb的差异:YEAR(CURRENT_TIMESTAMP()) year =》 EXTRACT (year from current_timestamp ()) year((#{year} - 1) + '0101000000') =》 to_date((#{year} - 1)||'-01-01','%Y-mm-%d...

weixin_29074295的博客 2349

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

如何设计好分布式数据库,这个策略很重要

摘要:GaussDB(for openGauss)是分布式架构,数据分布在各个DN上,设计好的数据分布策略是分布式数据库设计中最关键的环节。

华为云官方博客 1773

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

Some papers about NLP

Attention 1、Neural Machine Translation by Jointly Learning to Align and Translate 2、Effective Approaches to Attention-based Neural Machine Translation 3、ABCNN: Attention-Based Convolutional Neural Net...

lpty的博客 1187

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

Papers about DL

Paper , DL

cs6ting 1289

JAVA 接口 Interface 学习笔记 implements

接口 接口特性 接口不可以被实例化 实现类必须实现接口的所有方法,否则实现类必须是抽象类 实现类可以实现多个接口,来弥补Java不能多继承 接口中的变量都是静态常量 public interface DemoInterface {     public void demo();  //其他方法  //所有方法都是抽象的 } 如何使用接口    小结:接口的优点

zhangyufeng0126的博客 1759

PostgreSQL 关于报错All datanode modified table row count not same的解决

在生产运行中,用delete using删除表数据时出现了报错: ERROR:All datanode modified table row count not same 在确认了表分布为DISTRIBUTE BY REPLICATION之后,确认是删除目标表是复制表,因为复制表的数据分布特性是同一行数据分布在所有数据节点,推测是某两个或几个数据节点数据对不齐。 因为情况比较紧急,需要马上解决问题,没有追溯问题原因,直接采取措施解决报错。 ALTER TABLE table_name DISTRIBUTE

qq_33573730的博客 344

Java Puzzle: unreachable statement

http://javapapers.com/core-java/java-puzzle-unreachable-statement/ thanks to Joe.This is an interesting puzzle to test our understanding on java compiler. What happens when we compile below...

weixin_33726943的博客 326

glusterfs创建分布式复制卷(Distributed + Replication)

作者:吴业亮 博客:http://blog.youkuaiyun.com/wylfengyujiancheng 一、环境信息 node1 192.168.8.11 两块磁盘 node2 192.168.8.12 两块磁盘 node3 192.168.8.13 两块磁盘 node4 192.168.8.14 两块磁盘 node5 192.168.8.15 两块磁盘 node6 192.168.8.1...

本人任职于安超云技术架构部,拥有十余年云计算与AI经验。专注AI基础设施、分布式集群、高可用架构、虚拟化、存储、网络及数据库等领域。博客内容以学习笔记为主,力求准确,但个人能力所限,难免疏误。非常欢迎交流指正,期待与您共同探讨技术 2528

研究生计划

2014上学期: Oral English Mind Map Papers about Sensor Data Structure & Algorithm Think in Java  Offer目标: 阿里 百度 腾讯 所学知识: Java源码 设计模式 Linux 编程之美 TCP/IP 软件工程 想去谷歌工作?15个面试问题据说难倒天才...

logic 134
上一篇: gem5简介
下一篇: Python之道(四)之条件语句
刘秋杉
博客等级 码龄14年 1233粉丝 146原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值