To improve the duplicate consistency under peer⁃to⁃peer pattern in distributed database system,a middleware⁃based database synchronization system was designed. The middleware is used to realize the database synchronization in the sys⁃tem to capture and analyze the transaction with transaction management module,collision detection module,communication module and transaction execution module,and then detect and treat with the conflict transaction. The experimental results show that,in comparison with the two⁃phase locking(2PL),the middleware⁃based database synchronization system can reduce the re⁃sponse time of the transaction due to the conflict detected and treated at local,decrease the unnecessary communication,and improve the system performance.%针对分布式数据库系统中对等模式下副本一致性的问题,设计了一个基于中间件的数据库同步系统。该系统利用中间件实现数据库同步的目的,通过事务管理模块、冲突检测模块、通信模块、事务执行模块完成事务的捕获、分析以及对冲突事务的检测和处理。实验结果表明,由于冲突在本地得到检测和处理,与两阶段协议(2PL)相比,基于中间件的数据库同步系统降低了事务的响应时间,减少了不必要的通信,提升了系统的性能。
展开▼