-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from codingapi/dev
Dev
- Loading branch information
Showing
161 changed files
with
2,449 additions
and
835 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Bug Report | ||
about: Report a issue to TX-LCN, please use this template. | ||
|
||
|
||
--- | ||
|
||
- [ ] I have searched the [issues](https://github.com/codingapi/tx-lcn/issues) of this repository and believe that this is not a duplicate. | ||
|
||
### 1. Bug Description | ||
|
||
|
||
### 2. Environment: | ||
- JDK version: | ||
- OS: | ||
- TX-LCN version: | ||
- Others: | ||
|
||
### 3. Exception Stacktrace | ||
|
||
``` | ||
Paste your Exception Stacktrace here! | ||
``` | ||
|
||
### 4. Tour Idea | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Feature Request | ||
about: Suggest an idea for TX-LCN | ||
|
||
--- | ||
|
||
## Why you need it? | ||
Is your feature request related to a problem? Please describe in details | ||
|
||
|
||
## How it could be? | ||
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it. | ||
|
||
|
||
## Other related information | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,19 @@ | ||
# tx-lcn分布式事务框架 (5.0.1.RELEASE) | ||
# Distributed Transaction Framework - LCN (5.0.2.RELEASE) | ||
|
||
[![Maven](https://img.shields.io/badge/endpoint.svg?url=https://bbs.txlcn.org/maven-central)](https://bbs.txlcn.org/maven-list) | ||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/codingapi/tx-lcn/blob/master/LICENSE) | ||
[![Gitter](https://badges.gitter.im/codingapi/tx-lcn.svg)](https://gitter.im/codingapi/tx-lcn?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
[![BBS](https://bbs.txlcn.org/style/Archlinux/txlcn-bbs.svg)](https://bbs.txlcn.org) | ||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?label=license)](https://github.com/codingapi/tx-lcn/blob/master/LICENSE) | ||
|
||
|
||
## 项目介绍 | ||
|
||
5.0完全拥抱springboot体系,基于JDK1.8,不仅仅支持LCN事务模式,同时引入了TCC,TXC模式,把分布式事务协调的模式抽象出来,让各种模式可以嵌套使用。 | ||
|
||
事务模式说明:TCC是用户自己实现提交回滚业务,LCN是框架代理JDBC Connection实现提交回滚业务, TXC是框架分析业务SQL提前提交,在需要回滚时生成逆向回滚。 | ||
|
||
TCC忽略不说。LCN与TXC两种框架实现的事务模式到底那个更优越呢? | ||
|
||
理论上,在并发量大,资源相对紧张时,TXC要优于LCN,但从目前测试上来说,结果却非如此,LCN还是稍优于TXC。同时TXC还限制了业务SQL形式,未做到完全逆向 | ||
后续版本将会着重优化TXC,包括性能上和SQL的完全逆向上。 | ||
|
||
|
||
版本较4.x主要特点: | ||
1. 基于springboot 研发 | ||
2. 抽离LCN封装业务,提出业务接口层与通讯层,可支持自定义分布式事务模式与通讯模式。 | ||
3. 支持LCN TXC TCC 三种事务模式,且可混合支持。 | ||
4. 性能较优秀,去掉了线程等待机制,提高吞吐量。 | ||
|
||
|
||
|
||
## 模块划分 | ||
|
||
1. txlcn-tc:*TXLCN分布式事务客户端* | ||
2. txlcn-common:*公共模块* | ||
3. txlcn-logger:*日志模块。(默认提供日志持久化到MySQL的支持)* | ||
4. txlcn-tm:*TXLCN事务管理器* | ||
5. txlcn-txmsg:*事务消息扩展接口* | ||
6. txlcn-txmsg-netty:*事务消息接口的Netty实现* | ||
7. txlcn-tracing:*分布式事务追踪工具* | ||
|
||
## 官网文档 | ||
|
||
官网文档 见docs分支 | ||
|
||
https://txlcn.org | ||
|
||
|
||
技术交流群:554855843(已满) 970071379(未满) | ||
|
||
## Modules | ||
1. txlcn-tc: *Distributed Transaction Client* | ||
2. txlcn-common: *Commons* | ||
3. txlcn-logger: *Provide persistent logs to MySQL* | ||
4. txlcn-tm: *Distributed Transaction Manager* | ||
5. txlcn-txmsg: *Distributed Transaction Message Extensions API* | ||
6. txlcn-txmsg-netty: *Distributed Transaction Message Extensions Implementation* | ||
7. txlcn-tracing: *Distributed Transaction Tracing* | ||
|
||
## The Authority | ||
Website: [https://txlcn.org](https://txlcn.org/en-us/) | ||
Statistics: [Leave your company messages](https://github.com/codingapi/tx-lcn/issues/7) | ||
QQ:554855843 (Hot) 970071379(Normal) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# TX-LCN分布式事务框架 (5.0.2.RELEASE) | ||
|
||
[![Maven](https://img.shields.io/badge/endpoint.svg?url=https://bbs.txlcn.org/maven-central)](https://bbs.txlcn.org/maven-list) | ||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/codingapi/tx-lcn/blob/master/LICENSE) | ||
[![Gitter](https://badges.gitter.im/codingapi/tx-lcn.svg)](https://gitter.im/codingapi/tx-lcn?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
|
||
|
||
## 项目介绍 | ||
|
||
5.0完全拥抱springboot体系,基于JDK1.8,不仅仅支持LCN事务模式,同时引入了TCC,TXC模式,把分布式事务协调的模式抽象出来,让各种模式可以嵌套使用。 | ||
|
||
事务模式说明:TCC是用户自己实现提交回滚业务,LCN是框架代理JDBC Connection实现提交回滚业务, TXC是框架分析业务SQL提前提交,在需要回滚时生成逆向回滚。 | ||
|
||
TCC忽略不说。LCN与TXC两种框架实现的事务模式到底那个更优越呢? | ||
|
||
理论上,在并发量大,资源相对紧张时,TXC要优于LCN,但从目前测试上来说,结果却非如此,LCN还是稍优于TXC。同时TXC还限制了业务SQL形式,未做到完全逆向 | ||
后续版本将会着重优化TXC,包括性能上和SQL的完全逆向上。 | ||
|
||
|
||
版本较4.x主要特点: | ||
1. 基于SpringBoot研发 | ||
2. 抽离LCN封装业务,提出业务接口层与通讯层,可支持自定义分布式事务模式与通讯模式。 | ||
3. 支持LCN TXC TCC 三种事务模式,且可混合支持。 | ||
4. 性能较优秀,去掉了线程等待机制,提高吞吐量。 | ||
|
||
|
||
|
||
## 模块划分 | ||
|
||
1. txlcn-tc:*TXLCN分布式事务客户端* | ||
2. txlcn-common:*公共模块* | ||
3. txlcn-logger:*日志模块。(默认提供日志持久化到MySQL的支持)* | ||
4. txlcn-tm:*TXLCN事务管理器* | ||
5. txlcn-txmsg:*事务消息扩展接口* | ||
6. txlcn-txmsg-netty:*事务消息接口的Netty实现* | ||
7. txlcn-tracing:*分布式事务追踪工具* | ||
|
||
## 官网文档 | ||
|
||
官网文档 见docs分支 | ||
|
||
https://txlcn.org | ||
|
||
|
||
技术交流群:554855843(已满) 970071379(未满) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@echo off | ||
|
||
start java -jar -Xms256m -Xmx512m txlcn-tm/target/txlcn-tm-5.0.1.RELEASE.jar | ||
start java -jar -Xms256m -Xmx512m txlcn-tm/target/txlcn-tm-5.0.2.RELEASE.jar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
### 构建镜像到本地 | ||
``` | ||
# 当前路径 tx-lcn/txlcn-tm | ||
mvn clean package -DskipTests docker:build | ||
``` | ||
|
||
#### 运行说明 | ||
- 可以不用构建,在有docker环境的机器上直接运行下面命令 | ||
|
||
1 、 命令行传参数运行 | ||
|
||
``` | ||
docker run -p 7970:7970 -p 8070:8070 --restart always --name tm -e spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tx_manager -e spring.datasource.username=root -e spring.datasource.password=root -e spring.redis.host=127.0.0.1 -e spring.redis.port=6379 -e spring.redis.password= -e tx-lcn.manager.admin-key=123456 -d codingapi/txlcn-tm | ||
``` | ||
- 说明 | ||
- -p 端口映射 宿主机器端口:容器内端口 | ||
- --name : 容器别名 | ||
- --restart always : 容器伴随docker服务启动(如果docker是开机启动,那么这个容器就是开机启动的) | ||
- -d : 放入后台运行 | ||
- -e 相当于 java -jar tm.jar 后面的参数, | ||
- spring.datasource.url 这个配置里面如果有特殊符号 命令行不支持,建议使用第二种方式 | ||
|
||
2 、 增加外部配置文件运行. 需要在宿主机器上有文件 /opt/data/lcntm/application-dev.properties | ||
``` | ||
spring.application.name=tx-manager | ||
server.port=7970 | ||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver | ||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/tx-manager?characterEncoding=UTF-8 | ||
spring.datasource.username=root | ||
spring.datasource.password=root | ||
#mybatis.configuration.map-underscore-to-camel-case=true | ||
#mybatis.configuration.use-generated-keys=true | ||
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect | ||
spring.jpa.hibernate.ddl-auto=none | ||
#tx-lcn.logger.enabled=true | ||
# TxManager Host Ip | ||
tx-lcn.manager.host=127.0.0.1 | ||
# TxClient连接请求端口 | ||
tx-lcn.manager.port=8070 | ||
tx-lcn.manager.admin-key=123456 | ||
# 心跳检测时间(ms) | ||
#tx-lcn.manager.heart-time=15000 | ||
# 分布式事务执行总时间 | ||
#tx-lcn.manager.dtx-time=30000 | ||
#参数延迟删除时间单位ms | ||
#tx-lcn.message.netty.attr-delay-time=10000 | ||
#tx-lcn.manager.concurrent-level=128 | ||
# 开启日志 | ||
#tx-lcn.logger.enabled=true | ||
#logging.level.com.codingapi=debug | ||
#redisIp | ||
spring.redis.host=127.0.0.1 | ||
#redis\u7AEF\u53E3 | ||
spring.redis.port=6379 | ||
#redis\u5BC6\u7801 | ||
#spring.redis.password= | ||
``` | ||
执行命令 | ||
``` | ||
docker run -p 7970:7970 -p 8070:8070 --restart always --name tm -v /opt/data/lcntm:/opt/data/lcntm -e spring.profiles.active=dev -e spring.config.additional-location=/opt/data/lcntm/application-dev.properties -d codingapi/txlcn.tm | ||
``` | ||
- 说明 | ||
- -v : 文件挂载 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.