当前普遍采用的复制技术和事务处理技术都无法满足应用的End-to-End可靠性需求,前者通过前向错误恢复来保证应用操作的存活性,后者通过后向错误恢复来保证应用数据的安全性.如何融合这两种技术以实现End-to-End可靠性保证,成为目前研究的热点问题.然而,已有的方法都是基于简单事务模式的假设,即只有中间层应用服务器上的容器发起事务,而很少考虑应用中普遍存在的复杂事务模式,如客户事务和嵌套事务.为了解决这个问题,首先识别出了几种典型的事务模式.针对这些事务模式,基于状态同步点概念提出了一种能够统一提供End-to-End可靠性保证的Web应用服务器复制机制RSCTP(replication scheme for complex transaction pattern).RSCTP机制采取primary-backup方式来复制EJB组件以保证业务逻辑的高可用性,同时采取primary-backup方式复制事务协调者来消除分布式事务处理中两阶段提交协议可能出现的阻塞问题.通过在不同事务模式下的失效分析,说明了该机制的有效性.已经实现了RSCTP机制并集成到了遵循J2EE规范的Web应用服务器OnceAS中.性能评价显示,该机制带来的系统开销较小.
The support of reliability as adopted in conventional replication or transaction processing techniques is not enough due to their distinct objectives: Replication guarantees the liveness of computational operations by using forward error recovery, while transaction processing guarantees the safety of application data by using backward error recovery. Combining the two mechanisms for stronger reliability is a challenging task. Current solutions, however, are typically on the assumption of simple transaction pattern where only a server transaction exists at the middle-tier application server, and seldom think about some complex patterns, such as client transaction or nested transaction. To address this problem, four typical transaction patterns in J2EE application are recognized first. Then a Web application server replication scheme based state synchronization point concept, RSCTP (replication scheme for complex transaction pattern), is presented to uniformly provide exactly-once semantic reliability support for these complex transaction patterns. In this scheme, EJB components are replicated to endow business logics with high availability. In addition, by replicating transaction coordinator, the blocking problem of 2PC protocol during distributed transactions processing is eliminated. Different transaction scenarios are also discussed to illustrate the effectivity of this scheme. This scheme has been implemented, and it has been integrated into J2EE compatible application server, OnceAS, and the performance evaluation shows that its overhead is acceptable.