Skip to content

Commit 1dfe898

Browse files
committed
LICENSE-2.0
1 parent 75ffcac commit 1dfe898

260 files changed

Lines changed: 3863 additions & 57 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# tx-lcn分布式事务框架 (5.0.0.RC1)
2+
23
[![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)
4+
35
## 项目介绍
46
5.0完全拥抱springboot体系,JDK版本为1.8开发,将不仅仅支持LCN事务模式,也引入了TCC,TXC模式,同时把分布式事务协调的模式抽象出来,让各种模式可以嵌套使用。
57

@@ -15,63 +17,15 @@
1517
## 模块划分
1618

1719
docs : 官网文档
18-
example : 测试demo
1920
tx-client:TXLCN分布式事务客户端
2021
tx-client-dubbo:dubbo框架客户端
2122
tx-client-springcloud:springcloud框架客户端
2223
tx-commons:公共模块
2324
tx-jdbcproxy-p6spy:sql拦截代理,采用了p6spy方式。
2425
tx-logger:性能测试日志
2526
tx-manager:TXLCN事务管理器
26-
tx-spi-rpc:rpc扩展接口
27-
tx-spi-rpc-netty:rpc netty实现
27+
tx-spi-message:消息扩展接口
28+
tx-spi-message-netty:netty消息实现
2829
tx-spi-sleuth:sleuth扩展接口
2930

3031

31-
32-
## 运行说明
33-
34-
需要准备的服务:
35-
36-
* redis 用于tx-manager事务数据储存。
37-
* mysql demo操作数据,事务日志数据记录,TxManager异常数据。
38-
* zookeeper [dubbo] demo依赖
39-
* consul [springcloud] demo依赖
40-
41-
42-
43-
数据的初始化:
44-
45-
1. 将example下的 txlcn-demo.sql 导入到txlcn-demo数据库。
46-
2. 将tx-manager下的 tx-manager.sql 导入到tx-manager数据库。
47-
48-
49-
demo 调用链说明:
50-
51-
demo-client LCN事务,事务发起方,调用了d与e
52-
demo-d TXC事务,事务参与方
53-
demo-e TCC事务,事务参与方
54-
55-
56-
启动顺序:
57-
58-
1. 启动TxManager。
59-
2. 启动example下的三个demo。
60-
61-
62-
效果说明:
63-
64-
访问 http://ip:port/txlcn?value=xxxx, 正常响应 ok-d > ok-e > ok-client
65-
66-
67-
## 当前阶段状况
68-
69-
1. 目前项目功能已经研发完毕,完成了自测与压测(压测并发到2000),测试报表待完善。
70-
2. 文档尚未开始编写,后面将编写详细文档,待完善。
71-
3. 原理说明,使用说明书,问题排查都会在官网上说明体现,待完善。
72-
4. 尚未发布正式版,大家可以反馈好的意见,我们在发布版本之前还会不断优化。
73-
5. 针对与TXC模式目前只是测试了简单的sql语句,对于过于复杂的更新sql可能存在问题,将会继续优化。
74-
6. 项目将会在正式发布前继续做调整。
75-
76-
77-
若发现好的意见或问题请提交到issue,感谢.

pom.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@
299299
<version>${txlcn-guava.version}</version>
300300
</dependency>
301301

302-
303-
304-
305302
<dependency>
306303
<groupId>org.springframework.cloud</groupId>
307304
<artifactId>spring-cloud-dependencies</artifactId>

tx-client-dubbo/src/main/java/com/codingapi/txlcn/client/dubbo/spi/sleuth/TxDubboConfiguration.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017-2019 CodingApi .
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.codingapi.txlcn.client.dubbo.spi.sleuth;
217

318
import com.codingapi.txlcn.spi.sleuth.listener.SleuthParamListener;

tx-client-dubbo/src/main/java/com/codingapi/txlcn/client/dubbo/spi/sleuth/loadbalance/TXLCNConsistentHashLoadBalance.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017-2019 CodingApi .
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
217

318
import com.alibaba.dubbo.common.URL;

tx-client-dubbo/src/main/java/com/codingapi/txlcn/client/dubbo/spi/sleuth/loadbalance/TXLCNLeastActiveLoadBalance.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017-2019 CodingApi .
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
217

318
import com.alibaba.dubbo.common.URL;

tx-client-dubbo/src/main/java/com/codingapi/txlcn/client/dubbo/spi/sleuth/loadbalance/TXLCNLoadBalance.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017-2019 CodingApi .
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
217

318
import com.alibaba.dubbo.common.URL;

tx-client-dubbo/src/main/java/com/codingapi/txlcn/client/dubbo/spi/sleuth/loadbalance/TXLCNRandomLoadBalance.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017-2019 CodingApi .
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
217

318
import com.alibaba.dubbo.common.URL;

tx-client-dubbo/src/main/java/com/codingapi/txlcn/client/dubbo/spi/sleuth/loadbalance/TXLCNRoundRobinLoadBalance.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017-2019 CodingApi .
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
217

318
import com.alibaba.dubbo.common.URL;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
txlcn_random=TXLCNRandomLoadBalance
2-
txlcn_roundrobin=TXLCNRoundRobinLoadBalance
3-
txlcn_leastactive=TXLCNLeastActiveLoadBalance
4-
txlcn_consistenthash=TXLCNConsistentHashLoadBalance
1+
txlcn_random=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNRandomLoadBalance
2+
txlcn_roundrobin=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNRoundRobinLoadBalance
3+
txlcn_leastactive=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNLeastActiveLoadBalance
4+
txlcn_consistenthash=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNConsistentHashLoadBalance

tx-client-springcloud/src/main/java/com/codingapi/txlcn/client/springcloud/spi/sleuth/TxSpringCloudConfiguration.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017-2019 CodingApi .
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package com.codingapi.txlcn.client.springcloud.spi.sleuth;
217

318
import com.codingapi.txlcn.spi.sleuth.listener.SleuthParamListener;

0 commit comments

Comments
 (0)