Skip to content

Commit 806c55b

Browse files
committed
add readme material
1 parent 711e544 commit 806c55b

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed
177 KB
Loading
903 KB
Loading
1.21 MB
Loading

springboot-seata-at-sample/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BASE柔性事务AT模式之Seata分布式事务框架
22

3-
### 1.什么是BASE柔性事务?
3+
### .什么是BASE柔性事务?
44

55
##### 如果将实现了ACID的事务要素的称为刚性事务的话(如数据库的分布式事务XA协议),那么基于BASE事务要素的事务则称为柔性事务。
66
> BASE是基于可用、柔性状态和最终一致性这三个要素
@@ -29,13 +29,13 @@
2929
3030
------------
3131

32-
### 2.柔性事务的AT模式定义
32+
### .柔性事务的AT模式定义
3333
##### AT模式就是两阶段提交,自动生成反向SQL
3434
<img src="https://raw.githubusercontent.com/ipipman/JavaSpringBootSamples/master/ReadmeMaterial/641607656083_.pic_hd.jpg" width = "600" height = "230" alt="图片名称" align=center />
3535

3636
------------
3737

38-
### 3.Seata柔性事务框架
38+
### .Seata柔性事务框架
3939
Seata是阿里开源的分布式框架,目前在分布式事务领域中应用最为广泛。
4040
Seata AT 事务模型包含了:TM(事务管理器),RM(资源管理器)和TC(事务协调器)。
4141
> - TC是一个独立部署的服务,TM和RM以jar包的方式同业务应用一同部署,它们同TC建立长连接,在整个事务生命周期内,保持远程通信。
@@ -55,7 +55,7 @@ Seata AT 事务模型包含了:TM(事务管理器),RM(资源管理器
5555

5656
------------
5757

58-
##### Seata-AT原理
58+
##### Seata-AT模式原理
5959

6060
###### 1.Seata-AT的两阶段
6161

@@ -77,12 +77,12 @@ Seata-AT通过全局锁的方式,实现读写隔离
7777
7878
------------
7979

80-
### 4.Seata-AT实战
80+
### .Seata-AT模式实战
8181

8282
##### 1.实现一个交易业务(Bussiness),需要库存服务(Stroage)、订单服务(Order)和用户服务(Account)
8383
<img src="https://raw.githubusercontent.com/ipipman/JavaSpringBootSamples/master/ReadmeMaterial/681607659883_.pic.jpg" width = "600" height = "320" alt="图片名称" align=center />
8484

85-
###### 在SprintBoot下运行,本文并没有使用RPC的方式,而是在HTTP请求头中透传XID的方式实现的,代码如下:
85+
###### 在SpringBoot下运行,本文并没有使用RPC的方式,而是在HTTP请求头中传递XID的方式实现的,代码如下:
8686
> - seata-at-account-service
8787
> - seata-at-bussiness-service
8888
> - seata-at-stroage-service
@@ -152,7 +152,7 @@ CREATE TABLE `undo_log` (
152152
------------
153153

154154

155-
##### 3.安装Seata
155+
##### 3.安装Seata Server
156156
- 下载Seata
157157
> wget https://github.com/seata/seata/releases/download/v1.0.0/seata-server-1.0.0.zip
158158
@@ -187,11 +187,11 @@ store {
187187
}
188188
}
189189
```
190-
- 启动Seata
190+
- 启动Seata Server
191191
> sh ./bin/seata-server.sh
192192
193193

194-
##### 4.启动四个SpringBoot项目,注意数据库和Seata服务的IP与端口配置,进行测试
194+
##### 4.启动四个SpringBoot项目,注意项目中application.properties里相关数据库和Seata服务的IP与端口配置,开始测试
195195

196196
> 测试事务提交成功场景:curl -X POST http://127.0.0.1:8084/api/business/purchase/commit
197197
>
@@ -201,6 +201,6 @@ store {
201201
------------
202202

203203

204-
### 5.柔性事务中TCC、AT、SAGA模式总结
204+
### .柔性事务中TCC、AT、SAGA模式总结
205205

206206
![https://raw.githubusercontent.com/ipipman/JavaKnowledge/master/XT/Base%E6%9F%94%E6%80%A7%E4%BA%8B%E5%8A%A1.png](https://raw.githubusercontent.com/ipipman/JavaKnowledge/master/XT/Base%E6%9F%94%E6%80%A7%E4%BA%8B%E5%8A%A1.png "https://raw.githubusercontent.com/ipipman/JavaKnowledge/master/XT/Base%E6%9F%94%E6%80%A7%E4%BA%8B%E5%8A%A1.png")

springboot-seata-tcc-sample/src/main/resources/provider/seata-tcc.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
43
xmlns="http://www.springframework.org/schema/beans"
54
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"

0 commit comments

Comments
 (0)