DTM is a distributed transaction solution which provides cross-service eventually data consistency. It provides saga, tcc, xa, 2-phase message strategies for a variety of application scenarios. It also supports multiple languages and multiple store engine to form up a transaction as following:
- Support HTTP and gRPC, provide easy-to-use programming interfaces, lower substantially the barrier of getting started with distributed transactions. Newcomers can adapt quickly.
- Relieving developers from worrying about suspension, null compensation, idempotent transaction, and other tricky problems, the framework layer handles them all.
There is no mature open-source distributed transaction framework for non-Java languages.
Mature open-source distributed transaction frameworks for Java language include Ali's Seata, Huawei's ServiceComb-Pack, Jingdong's shardingsphere, himly, tcc-transaction, ByteTCC, and so on, of which Seata is most widely used.
The following is a comparison of the main features of dtm and Seata.
### 运行dtm
| Features | DTM | Seata | Remarks |
| :-----: | :----: | :----: | :----: |
| Supported languages | <spanstyle="color:green">Golang, Python, PHP, and others</span> | <spanstyle="color:orange">Java</span> | dtm allows easy access from a new language |
| XA | <spanstyle="color:green">✓</span> | <spanstyle="color:green">✓</span> | |
| AT | <spanstyle="color:orange">suggest XA</span> | <spanstyle="color:green">✓</span> | AT is similar to XA with better performance but with dirty rollback |
| SAGA | <spanstyle="color:green">support concurrency</span> | <spanstyle="color:green">complicated state-machine mode</span> | dtm's state-machine mode is being planned |
| Transactional Messaging | <spanstyle="color:green">✓</span> | <spanstyle="color:red">✗</span> | dtm provides Transactional Messaging similar to RocketMQ |
| Multiple DBs in a service |<spanstyle="color:green">✓</span>|<spanstyle="color:red">✗</span>||
| Communication protocols | <spanstyle="color:green">HTTP, gRPC</span> | <spanstyle="color:green">Dubbo, no HTTP</span> | |
| Star count | <imgsrc="https://img.shields.io/github/stars/dtm-labs/dtm.svg?style=social"alt="github stars"/> | <imgsrc="https://img.shields.io/github/stars/seata/seata.svg?style=social"alt="github stars"/> | dtm 0.1 is released from 20210604 and under fast development |
From the features' comparison above, if your language stack includes languages other than Java, then dtm is the one for you.
If your language stack is Java, you can also choose to access dtm and use sub-transaction barrier technology to simplify your business development.
## [Cook Book](https://en.dtm.pub)
# Quick start
### run dtm
``` bash
git clone https://github.com/dtm-labs/dtm && cd dtm
[](https://github.com/avelino/awesome-go#database)
# [中文文档](http://dtm.pub)
English | [简体中文](https://github.com/dtm-labs/dtm/blob/main/helper/README-cn.md)
# A Cross Language Distributed Transaction Manager
# Distributed Transactions Manager
## Who's using DTM
## What is DTM
[Tencent](https://www.tencent.com/)
DTM is a distributed transaction solution which provides cross-service eventually data consistency. It provides saga, tcc, xa, 2-phase message strategies for a variety of application scenarios. It also supports multiple languages and multiple store engine to form up a transaction as following:
DTM is the first distributed transaction management framework in Golang. Unlike other frameworks, DTM provides extremely easy access interfaces of HTTP and gRPC, supports multiple language bindings, and handles tricky problems of unordered sub-transactions at the framework level.