有关崩溃安全和容错编程的资源
我喜欢 LWN 文章“仅崩溃软件”,并且我想了解有关崩溃安全的更多信息和容错编程。
令人惊奇的是,要确保持久状态在故障情况下保持一致是非常困难的。这里我什至不谈论分布式操作:这在单节点上也很困难:即使是普通的 Berkeley DB(BDB 数据存储或 BDB 并发数据存储)如果系统崩溃,也可能会损坏数据库。不仅高级应用程序约束被打破,如果系统崩溃,数据库也可能无法正确打开。
关于碰撞安全和容错设计、方法和编程的好资源有哪些。
如果资源集中在 C++ 和 POSIX 环境上,我将不胜感激。
I like the LWN article "Crash-only software" and I would like to learn more about crash-safe and fault-tolerant programming.
It is surprisingly hard to assure that the persistent state is consistent in fault situations. Here I do not even talk about distributed operations: That is hard on a single node, too: Even the normal Berkeley DB (BDB Data Store or BDB Concurrent Data Store) might have a destroyed database if the system crashes. Not only that high level application constraints are broken, the database might not be opened correctly if the system crashes.
What are good resources about crash-safe and fault-tolerant designs, approaches, and programming.
If the resources focus on C++ and POSIX environments, I would appreciate that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Akka 是一个 Java 和 Scala 框架,在编写时就考虑到了“让它崩溃”。请参阅这篇文章和此演示文稿介绍了 Actor 和 let-it-crash。它也称为 Fail-Fast 和 worker/supervisor 风格。
关于 erlang 的两个很好的演示是 Systems that Never Stop (and Erlang) 和 Erlang 中的消息传递并发
Theron 是一个 C++ 的 actor 库,我也认为 Boost 中也有一些东西。
Erlang 还可以调用 C 或 C++ 代码,请参阅此讨论。 Java/Scala/Akka也可以调用C++代码。
(如果您喜欢 C++,我建议您看看 Scala,这是非常好的语言,如果您来自 C++,它比 Java 更好。)
另外 Jonas Boners 演示 可扩展性、可用性和可扩展性Stability Patterns 是关于该主题的一个很好的演示。
Akka is a framework for Java and Scala that is written with let-it-crash in mind. See this article and this presentation for an introduction to Actors and let-it-crash. It is also called Fail-Fast and worker/supervisor style.
Two good presentations on erlang is Systems that Never Stop (and Erlang) and Message Passing Concurrency in Erlang
Theron is a actor library for C++, I also think there is something in Boost also.
Also Erlang can call C or C++ code see this for a discussion. Java / Scala / Akka can also call C++ code.
(If you like C++ I suggest you to have a look at Scala, very nice language and better than Java if you come from C++.)
Also Jonas Boners presentation Scalability, Availability & Stability Patterns is a good presentation on the topic.
Erlang 和 Scala 语言中的 Aktor 模型是让它崩溃模型。请参阅这篇文章。
The Aktor model in languages Erlang and Scala the let it crash model. See this article.
要添加到上述答案集,可以使用 Groovy 和 GPars,已被错过。当然这不是C++。
C++ 中还有另一个实验库,名为 libcppa。 Theron 比这更成熟。
无论如何,你最好的选择是使用:
To add to the above set of answers, there is Groovy and GPars, which has been missed out. Of course this is not C++.
There is another experimental library in C++ called libcppa. Theron is more mature than this.
Any way your best bet is to use either:
如果你想用C++实现容错功能,基本上你会重写Erlang。不要重新发明轮子,Erlang OTP 已经存在并经过了 35 年以上的考验。使用它!
If you want to implement fault tolerance features in C++, basically you will rewrite Erlang. Don't reinvent the wheel, Erlang OTP is there and battle tested for 35+ years. Use it!.