All Projects → dtm-labs → dtmcli-php

dtm-labs / dtmcli-php

Licence: other
a php client for distributed transaction framework dtm.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to dtmcli-php

dtm
A distributed transaction framework that supports multiple languages, supports saga, tcc, xa, 2-phase message, outbox patterns.
Stars: ✭ 6,110 (+23400%)
Mutual labels:  transaction, distributed, distributed-transactions, tcc, saga, seata
Easytransaction
A distribute transaction solution(分布式事务) unified the usage of TCC , SAGA ,FMT (seata/fescar AutoCompensation), reliable message, compensate and so on;
Stars: ✭ 2,284 (+8684.62%)
Mutual labels:  transaction, tcc, saga
Seata
🔥 Seata is an easy-to-use, high-performance, open source distributed transaction solution.
Stars: ✭ 21,351 (+82019.23%)
Mutual labels:  tcc, saga, seata
Bytetcc
ByteTCC is a distributed transaction manager based on the TCC(Try/Confirm/Cancel) mechanism. It’s compatible with the JTA specification. User guide: https://github.com/liuyangming/ByteTCC/wiki
Stars: ✭ 2,749 (+10473.08%)
Mutual labels:  transaction, tcc
FreeSql.Cloud
提供跨数据库访问,分布式事务TCC、SAGA解决方案。
Stars: ✭ 42 (+61.54%)
Mutual labels:  tcc, saga
sargeras
基于Saga思想解决长事务(LLT,Long-Live-Transaction)的框架
Stars: ✭ 22 (-15.38%)
Mutual labels:  transaction, saga
Bytetcc Sample
Stars: ✭ 119 (+357.69%)
Mutual labels:  transaction, tcc
Go Saga
Implements saga-pattern in Go, another way to distribute transaction.
Stars: ✭ 183 (+603.85%)
Mutual labels:  transaction, distributed-transactions
Raincat
强一致分布式事务框架
Stars: ✭ 1,785 (+6765.38%)
Mutual labels:  transaction, tcc
Reliable
mq transaction, tcc, eventually consistency. tx life cycle: all listeners handled, if necessary, produce next message
Stars: ✭ 187 (+619.23%)
Mutual labels:  transaction, tcc
ddal
DDAL(Distributed Data Access Layer) is a simple solution to access database shard.
Stars: ✭ 33 (+26.92%)
Mutual labels:  transaction, distributed
phylanx
An Asynchronous Distributed C++ Array Processing Toolkit
Stars: ✭ 71 (+173.08%)
Mutual labels:  distributed
shardingsphere-ui
Distributed database middleware
Stars: ✭ 41 (+57.69%)
Mutual labels:  distributed-transactions
macOS-Security-Updates
Notifies the user when macOS Security components like Gatekeeper and XProtect have been updated
Stars: ✭ 53 (+103.85%)
Mutual labels:  tcc
monitor-merlin
Module for Effortless Redundancy and Loadbalancing In Naemon
Stars: ✭ 21 (-19.23%)
Mutual labels:  distributed
bitcoincashjs
WARNING: This project is no longer maintained. Please, use bitcore-lib-cash instead.
Stars: ✭ 80 (+207.69%)
Mutual labels:  transaction
dnr-editor
Distributed Data-Flow Coordination Platform Based on Node-RED
Stars: ✭ 72 (+176.92%)
Mutual labels:  distributed
ipfs-chat
Real-time P2P messenger using go-ipfs pubsub. TUI. End-to-end encrypted texting & file-sharing. NAT traversal.
Stars: ✭ 84 (+223.08%)
Mutual labels:  distributed
NScrapy
NScrapy is a .net core corss platform Distributed Spider Framework which provide an easy way to write your own Spider
Stars: ✭ 88 (+238.46%)
Mutual labels:  distributed
2017-highload-kv
Курсовой проект 2017 года курса "Проектирование высоконагруженных систем"
Stars: ✭ 26 (+0%)
Mutual labels:  distributed

a client for distributed transaction manager dtm

dtmcli 是分布式事务管理器dtm的客户端sdk

dtm分布式事务管理服务

DTM是一款跨语言的开源分布式事务管理器,优雅的解决了幂等、空补偿、悬挂等分布式事务难题。提供了简单易用、高性能、易水平扩展的分布式事务解决方案。

亮点

  • 极易接入
    • 支持HTTP,提供非常简单的接口,极大降低上手分布式事务的难度,新手也能快速接入
  • 使用简单
    • 开发者不再担心悬挂、空补偿、幂等各类问题,框架层代为处理
  • 跨语言
    • 可适合多语言栈的公司使用。方便go、python、php、nodejs、ruby各类语言使用。
  • 易部署、易扩展
    • 仅依赖mysql,部署简单,易集群化,易水平扩展
  • 多种分布式事务协议支持
    • TCC、SAGA、XA、事务消息

与其他框架对比

目前开源的分布式事务框架,暂未看到非Java语言有成熟的框架。而Java语言的较多,有阿里的SEATA、华为的ServiceComb-Pack,京东的shardingsphere,以及himly,tcc-transaction,ByteTCC等等,其中以seata应用最为广泛。

下面是dtm和seata的主要特性对比:

特性 DTM SEATA 备注
支持语言 Golang、python、php及其他 Java dtm可轻松接入一门新语言
异常处理 子事务屏障自动处理 手动处理 dtm解决了幂等、悬挂、空补偿
TCC事务
XA事务
AT事务 AT与XA类似,性能更好,但有脏回滚
SAGA事务 简单模式 状态机复杂模式 dtm的状态机模式在规划中
事务消息 dtm提供类似rocketmq的事务消息
通信协议 HTTP dubbo等协议,无HTTP dtm后续将支持grpc类协议
star数量 github stars github stars dtm从20210604发布0.1,发展快

从上面对比的特性来看,如果您的语言栈包含了Java之外的语言,那么dtm是您的首选。如果您的语言栈是Java,您也可以选择接入dtm,使用子事务屏障技术,简化您的业务编写。

使用示例

composer require yedf/dtmcli-php:dev-main
function FireTcc () {
    $dtm = 'http://192.168.69.128:8080/api/dtmsvr';
    $svc = 'http://192.168.69.128:4005/api';

    Dtmcli\tccGlobalTransaction($dtm, function ($tcc) use ($svc) {
        /** @var Dtmcli\Tcc $tcc */

        $req = ['amount' => 30];
        echo 'calling trans out' . PHP_EOL;
        $tcc->callBranch($req, $svc . '/TransOutTry', $svc . '/TransOutConfirm', $svc . '/TransOutCancel');
        echo 'calling trans in' . PHP_EOL;
        $tcc->callBranch($req, $svc . '/TransInTry', $svc . '/TransInConfirm', $svc . '/TransInCancel');
    });
}

可运行的使用示例

https://github.com/yedf/dtmcli-php-sample

特别说明

使用mix/guzzle为http客户端,支持swoole协程请求

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].