矢量时钟的实现

发布于 2024-09-05 17:17:52 字数 142 浏览 3 评论 0原文

对于在不同设备上运行的代码,我需要确定这些设备之间发送的消息的顺序。因此,我想使用矢量时钟,因为我读到矢量时钟允许事件排序。

是否有我可以使用的已建立的框架/公共 API?或者参考实现= 或者我必须从头开始编码吗?

感谢您的任何参考和提示

For my code which is running on different devices, i need to determine the ordering of messages which are sent between those devices. Therefore I would like to use vector clocks since I read vector clocks allow for the ordering of events.

Is there any established framework/public API which I can use for that? Or a reference implementation= Or do I have to code it from scratch?

Thanks for any references and hints

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤城病女 2024-09-12 17:17:52

VectorClock 实现可从 Google 代码

您还可以查看 Cassandra 中添加矢量时钟支持的补丁。

您还应该阅读 wiki [1] [2] 了解该技术和其他替代方案的限制。

A VectorClock implementation is available from Google Code.

You could also look at the patches to add vector clock support in Cassandra.

You should also read the wiki [1] [2] for limitations of the technique and other alternatives.

聽兲甴掵 2024-09-12 17:17:52

我发现这个矢量时钟是用 Java 编写的,作为 project voldemort 的一部分。

这是源代码。您还需要下拉类和接口引用。

以下是 Javadoc 的链接。

这是关于矢量时钟的维基百科文章。

I found this vector clock written in Java as a part of project voldemort.

Here's a link to the source code. You'll need to also pull down the class and interface references.

Here's a link to the Javadoc.

Here's a Wikipedia article on vector clocks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文