提交 1dfe8986 编写于 作者: U ujued

LICENSE-2.0

上级 75ffcacc
# tx-lcn分布式事务框架 (5.0.0.RC1)
[![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体系,JDK版本为1.8开发,将不仅仅支持LCN事务模式,也引入了TCC,TXC模式,同时把分布式事务协调的模式抽象出来,让各种模式可以嵌套使用。
......@@ -15,7 +17,6 @@
## 模块划分
docs : 官网文档
example : 测试demo
tx-client:TXLCN分布式事务客户端
tx-client-dubbo:dubbo框架客户端
tx-client-springcloud:springcloud框架客户端
......@@ -23,55 +24,8 @@ tx-commons:公共模块
tx-jdbcproxy-p6spy:sql拦截代理,采用了p6spy方式。
tx-logger:性能测试日志
tx-manager:TXLCN事务管理器
tx-spi-rpc:rpc扩展接口
tx-spi-rpc-netty:rpc netty实现
tx-spi-message:消息扩展接口
tx-spi-message-netty:netty消息实现
tx-spi-sleuth:sleuth扩展接口
## 运行说明
需要准备的服务:
* redis 用于tx-manager事务数据储存。
* mysql demo操作数据,事务日志数据记录,TxManager异常数据。
* zookeeper [dubbo] demo依赖
* consul [springcloud] demo依赖
数据的初始化:
1. 将example下的 txlcn-demo.sql 导入到txlcn-demo数据库。
2. 将tx-manager下的 tx-manager.sql 导入到tx-manager数据库。
demo 调用链说明:
demo-client LCN事务,事务发起方,调用了d与e
demo-d TXC事务,事务参与方
demo-e TCC事务,事务参与方
启动顺序:
1. 启动TxManager。
2. 启动example下的三个demo。
效果说明:
访问 http://ip:port/txlcn?value=xxxx, 正常响应 ok-d > ok-e > ok-client
## 当前阶段状况
1. 目前项目功能已经研发完毕,完成了自测与压测(压测并发到2000),测试报表待完善。
2. 文档尚未开始编写,后面将编写详细文档,待完善。
3. 原理说明,使用说明书,问题排查都会在官网上说明体现,待完善。
4. 尚未发布正式版,大家可以反馈好的意见,我们在发布版本之前还会不断优化。
5. 针对与TXC模式目前只是测试了简单的sql语句,对于过于复杂的更新sql可能存在问题,将会继续优化。
6. 项目将会在正式发布前继续做调整。
若发现好的意见或问题请提交到issue,感谢.
......@@ -299,9 +299,6 @@
<version>${txlcn-guava.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.dubbo.spi.sleuth;
import com.codingapi.txlcn.spi.sleuth.listener.SleuthParamListener;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
import com.alibaba.dubbo.common.URL;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
import com.alibaba.dubbo.common.URL;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
import com.alibaba.dubbo.common.URL;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
import com.alibaba.dubbo.common.URL;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance;
import com.alibaba.dubbo.common.URL;
......
txlcn_random=TXLCNRandomLoadBalance
txlcn_roundrobin=TXLCNRoundRobinLoadBalance
txlcn_leastactive=TXLCNLeastActiveLoadBalance
txlcn_consistenthash=TXLCNConsistentHashLoadBalance
\ No newline at end of file
txlcn_random=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNRandomLoadBalance
txlcn_roundrobin=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNRoundRobinLoadBalance
txlcn_leastactive=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNLeastActiveLoadBalance
txlcn_consistenthash=com.codingapi.txlcn.client.dubbo.spi.sleuth.loadbalance.TXLCNConsistentHashLoadBalance
\ No newline at end of file
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.springcloud.spi.sleuth;
import com.codingapi.txlcn.spi.sleuth.listener.SleuthParamListener;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.springcloud.spi.sleuth.ribbon.customizer;
import org.springframework.beans.factory.annotation.Autowired;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.springcloud.spi.sleuth.ribbon.loadbalance;
import com.codingapi.txlcn.spi.sleuth.listener.SleuthParamListener;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client;
import com.codingapi.txlcn.client.core.txc.resource.init.DefaultTxcSettingFactory;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client;
import com.codingapi.txlcn.client.config.TxClientConfig;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect;
/**
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect;
import com.codingapi.txlcn.client.aspect.weave.DTXResourceWeaver;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect;
import com.codingapi.txlcn.client.aspect.weave.DTXLogicWeaver;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect.interceptor;
import com.codingapi.txlcn.client.aspect.weave.DTXLogicWeaver;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect.interceptor;
import com.codingapi.txlcn.client.bean.DTXInfo;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect.interceptor;
import com.codingapi.txlcn.client.aspect.weave.DTXLogicWeaver;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect.weave;
import com.codingapi.txlcn.client.aspect.BusinessCallback;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspect.weave;
import com.codingapi.txlcn.client.bean.DTXLocal;
......
/*
* Copyright 2017-2019 CodingApi .
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.codingapi.txlcn.client.aspectlog;
import org.springframework.context.annotation.Bean;
......