矩阵时钟能解决什么而矢量时钟不能解决? [英] What do matrix clocks solve but vector clocks can't?

查看:117
本文介绍了矩阵时钟能解决什么而矢量时钟不能解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我理解矢量时钟的需求,因为标量逻辑时钟无法提供足够的信息来说明例如键值存储区更新中是否存在更新冲突.

I understand the need for vector clocks in terms of scalar logical clocks failing to provide enough information to tell whether there is an update conflict in a key value store update for example.

但是我不确定矢量时钟还没有解决什么问题,然后是更大的矩阵时钟又解决了什么问题?

But I am not sure what problem is still unsolved by vector clocks and then solved by the more bulky matrix clocks?

推荐答案

在最终一致性环境中,必须保留系统曾经创建的所有消息,直到每个对等方都收到消息为止(==最终一致性).但是,您不想永远保留消息,因此您需要一种方法来告诉所有节点已接收到哪些消息并且可以将其删除,这就是为什么使用矩阵时钟的原因.

In an eventual consistency environment all messages ever created by a system need to be kept until every peer has received the message (== eventual consistency). But you don't want to keep messages for ever, so you need to have a way to tell which messages were received by all nodes and can be deleted, this is why you use matrix clocks.

矩阵时钟是矢量时钟的列表,因此您知道系统中每个节点的当前状态.基于此,您可以知道哪个对等方已经收到了哪些消息.当您与系统中的另一个节点交换消息时,您需要比较矩阵时钟并记住每个节点的最大值.之后,您可以删除之前发送的消息,因为该节点必须已经接收到它们.

Matrix clocks are a list of vector clocks, so you know the current state of each node in the system. Based on this you can know which peer received already which messages. When you exchange messages with another node in the system you compare the matrix clocks and remember always the highest values for each node. Afterwards you can delete messages which were sent before, because the node already must have received them.

这是对TSAE(带时间戳的反熵)协议的非常简短的描述.您可以在1992年由Richard Andrew Golding撰写的论文项目弱一致性组通信和成员资格中了解更多相关信息(

This is a very brief description of TSAE (timestamped anti-entropy) protocol. You can read more about it in the dissertation project Weak-consistency group communication and membership by Richard Andrew Golding from 1992 (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.88.7385&rep=rep1&type=pdf) starting from chapter 5.

这篇关于矩阵时钟能解决什么而矢量时钟不能解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆