计算机工程与应用 ›› 2011, Vol. 47 ›› Issue (19): 245-248.

• 工程与应用 • 上一篇    

基于预申请和功能替代的Sagas模型改进

罗作民,马 琦   

  1. 西安理工大学 计算机科学与工程学院,西安 710048
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-07-01 发布日期:2011-07-01

Improved model of Sagas based on apply beforehand and functional alternation

LUO Zuomin,MA Qi   

  1. School of Computer Science and Engineering,Xi’an University of Technology,Xi’an 710048,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-07-01 Published:2011-07-01

摘要: 为了提高事务执行的成功率,降低传统Sagas模型中补偿事务的执行给系统造成的损失,提出了基于预申请和功能替代的Sagas的改进模型PRSagas。该模型对长事务的各子任务执行所需的资源进行预申请,然后分别对每个子任务进行预分析,获取替代集后,分析各替代成功执行的可行性,选择成功率最高的子事务组成最终要执行的子任务流。通过分析和实验,说明了该模型的正确性和有效性。

关键词: Sagas模型, THP技术, 功能替代

Abstract: In order to improve the successful rate of transaction executing,and reduce the loss of system caused by executing compensate transaction in the traditional sagas model,this paper presents an improved model of Sagas——PRSagas based on apply beforehand and functional alternation.This model applies recourses beforehand which required by each sub-task of long transaction executing,then pre-analyzes each sub-task respectively and obtains the replacement set.After analyzing the feasibility of executing each substitution,this model selects the most succesful sub-transaction to compose the final execution of sub-task-flow.Through analysis and experiment,it shows the correctness and effectiveness of this model.

Key words: model of Sagas, Tentative Hold Protocol(THP), functional alternation