search
Homephp教程php手册PHP:分布式事务及两阶段提交方案实现思路

PHP:分布式事务及两阶段提交方案实现思路

Jun 06, 2016 pm 07:50 PM
phpaffairsdistributedaccomplishIdeassubmitplan

PHP因此语言特性和适用场景所限,其分布式事务实现不如Java那么成熟。 如果想通过PHP自行实现分布式事务, 1、可以参考一下Atomikos项目Atomikos, 该方案说明文档可通过如下资源下载阅读: http://download.csdn.net/detail/iefreer/5148135 这是一个分布式

PHP因此语言特性和适用场景所限,其分布式事务实现不如Java那么成熟。

如果想通过PHP自行实现分布式事务,

1、可以参考一下Atomikos项目Atomikos, 

该方案说明文档可通过如下资源下载阅读:

http://download.csdn.net/detail/iefreer/5148135


这是一个分布式事务的JAVA开源实现。

此外,你需要阅读一下XA/JTA相关的内容,以了解更多关于分布式事务的相关理论知识。

基本上两阶段提交2-phase-commit (2PC)在理论上并不难理解:

  • 所有参与的系统会被询问是否可以提交
  • 所有这些系统必须回答这个问题,是或否,是代表从那个时刻起,提交比较能够通过
  • 当所有系统都没问题的时候执行提交,仅此而已
  • 万一有某个系统有问题,那么所有的系统必须同步回滚
  • 协调系统规定在特定时间内返回应答,否则认为是否定答案
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.