...
首页> 外文期刊>MSDN Magazine >Easily Apply Transactions To Services
【24h】

Easily Apply Transactions To Services

机译:轻松将交易应用于服务

获取原文
获取原文并翻译 | 示例
           

摘要

A fundamental problem in programming is error recovery. After an error, your application must restore itself to the state it had before the error took place. Consider an application that tries to perform an operation comprising several smaller operations, potentially concurrently, where each of the individual operations can fail or succeed independently of the others. An error in any one of the smaller operations means the system is at an inconsistent state. Take a banking application, for example, that transfers funds between two accounts by crediting one account and debiting the other. Successfully debiting one account but failing to credit the other is an inconsistent state, because the funds cannot be in both places at the same time, and failing to debit while successfully crediting results with an equally inconsistent state in which the money is gone. It is always up to the application to recover from the error by restoring the system to the original state.
机译:编程中的一个基本问题是错误恢复。发生错误后,您的应用程序必须将自身恢复到发生错误之前的状态。考虑一个应用程序,它试图执行一个包含多个较小操作的操作(可能同时执行),其中每个单独的操作都可以独立于其他操作失败或成功。任何较小的操作中的错误都表示系统处于不一致状态。以银行应用程序为例,该应用程序通过贷记一个帐户并借记另一个帐户来在两个帐户之间转移资金。成功地从一个帐户借记但未向另一个帐户贷记是一种不一致的状态,因为资金不能同时在两个地方使用,并且在成功贷入结果时没有借记也有一个不一致的状态,即钱用完了。通过将系统还原到原始状态,应用程序始终可以从错误中恢复。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号