首页 \ 问答 \ 如何在分散的事件源数据库中处理共识?(How to handle consensus in a decentralized event sourced database?)

如何在分散的事件源数据库中处理共识?(How to handle consensus in a decentralized event sourced database?)

假设我有一个X服务器的动态网络(不是随时间修复的),只有附加数据库中的所有事件的相同副本。 现在,我想支持在这10台服务器中的任何一台上创建新事件,并让它们达成共识,复制事件,并且所有事件都会产生完全相同的事件顺序。 我知道这是一个常见的问题,并且有一些算法应该处理这样的事情。 但我并没有完全掌握它们,而且我对有关事件采购的共识有几个问题。

我认为服务器永远不能完全确定它认为已经达成共识的价值真的最终是“正确的”价值吗? 我的基础是,新服务器可以随时加入网络,并提供平衡以支持其他价值。 这可能会在很晚的时候发生。 但在这种情况下,服务器应如何处理新的“正确”值? 在事件采购中,附加补偿事件以进行更正是正常的,但是这些补偿事件是否必须同时复制到所有服务器? 确保所有服务器都具有完全相同的事件。

如果不添加补偿事件,而只是“弹出”已经提交的事件,我们不必复制这些我猜,但后来我们会遇到其他问题。 如果(错误地)提交的事件在事件总线上发送,以便其他服务可以对它们作出反应,我们不能只是从我们的事件数据库中弹出它们而不会弄乱它们。

或者,如果在一小段时间内达成共识后真正致力于价值,那会更好吗? 然后用冷手对待所有新/迟到的服务器? 让他们接受结果呢? 如果新服务器连接到比第一个更大的自己的网络并且他们都已经达成了对另一个值的共识,该怎么办?


Lets say I have dynamic network of X servers (not fixed over time) with a identical copy of all events in a append only database. Now I'd like to support creating new events on any of these 10 servers and have them reach consensus, replicate the events and all result in the exact same event order. I understand this is a common problem and that there are algorithms that are supposed to handle things like this. But I don't fully grasp them and I have a few questions regarding consensus in relation to event sourcing in particular.

I assume that a server never can be completely sure that the value it think it has reached consensus about is really what ends up being the "correct" value? I base this on the fact that new servers can join to the network at any time and tip the balance to favor another value. This could potentially happen much later as well. But in this case, how should a server handle a new "correct" value? In event sourcing it is normal to append compensating events to make corrections but shouldn't these compensating event have to be replicated to all servers as well then? To make sure that all servers have the exact same events I mean.

If not adding compensating event but instead just "popping" already committed events we wouldn't have to replicate these I guess but then we would run into other problems instead. If the (wrongly) committed events are sent out on a event bus so that other services can react to them we can't just pop them from our event db without messing things up.

Or is it better to just really commit to a value once consensus have been reached within a small timeframe? And then treat all new/late servers with a cold hand? Make them accept the result anyway? What if the new server is connected to it's own network that is larger then the first one and they all have reached consensus on another value?


原文:https://stackoverflow.com/questions/47391523
更新时间:2023-09-20 21:09

最满意答案

从子MovieClip调用函数作为gotoAndPlay的参数输入帧

例如,给定具有实例名称childMovieClip的符号

childMovieClip.gotoAndPlay(2);

子MovieClip实例

flash.display.MovieClip gotoAndPlay


Call function from the child MovieClip entering the frame as parameter to gotoAndPlay

For example, given a symbol with instance name childMovieClip

childMovieClip.gotoAndPlay(2);

child MovieClip instance

flash.display.MovieClip gotoAndPlay

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。