Skip to content

Commit

Permalink
upload 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
changmingxie committed Jul 11, 2022
1 parent 789d4b7 commit a083718
Show file tree
Hide file tree
Showing 627 changed files with 55,705 additions and 20,690 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Try: 尝试执行业务

完成所有业务检查(一致性)
Expand All @@ -21,7 +20,6 @@ Cancel: 取消执行业务

Cancel操作满足幂等性


快速开始:

https://github.com/changmingxie/tcc-transaction/wiki/2-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B
Expand All @@ -30,7 +28,6 @@ https://github.com/changmingxie/tcc-transaction/wiki/2-%E5%BF%AB%E9%80%9F%E5%BC%

https://github.com/changmingxie/tcc-transaction/wiki/3-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98


讨论群:

钉钉扫码入群
Expand Down
68 changes: 68 additions & 0 deletions design.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
A. business transaction flow:
TCC->TransactionManager->Transaction->TransactionRepository.crud--->TransactionStore--->TransactionStorage.crud
JDBCTransactionStorage-->TCC_TRANSACTION_STORE
RedisTransactionStorage-->HASH
RocksDbTransactionStorage-->KV
RemotingTransactionStorage-->RemotingCommand---->RemotingCommand-->TransactionStore-->TransactionStorage
JDBCTransactionStorage
RedisTransactionStorage
RocksDbTransactionStorage
--------------------------------------------------------------------------------------------------------------------
B. transaction recovery flow:
1. check if TransactionStorage support recovery, if true then:
2. find the transactions need recovery: Recovery->TransactionRepository->findSince->TransactionStorage->TransactionStore->Transaction
3. do the recovery: Transaction.commit/rollback->TransactionRepository.crud

--------------------------------------------------------------------------------------------------------------------
C. Sever Side(only for Server Mode)
1. Business transaction process flow:RemotingCommand->TransactionStore->TransactionStorage->JDBC/Redis/RocksDb
2. Recovery flow: find the transactions need recovery:
2.1 RecoveryJob scheduled scan the TransactionStores need recovery(for long time do not updated)
2.2 for each TransactionStore,
2.2.1 if it is root transaction, obtain its xid,
2.2.2 else if it is branch transaction, then try find out its root transaction, change the branch transaction status according to the root transaction status, and then obtain its xid
2.3 callback the business applications with the xids
2.4 the business applications received the xids find out Transactons by xids
2.5 the business applications do the recovery process

D. Other
1. remove the degrade support
2. remove the branch transaction recovery by find root transaction support



-------------------------
TransactionStoreRecovery->TransactionStorage
->RecoveryExecutor
-------------------------

1.
AppConfig->Storage
->RecoveryConfig
->NettyClientConfig
->TccClientConfig
2.
AppConfig->Storage
->RecoveryConfig
->NettyClientConfig
->TccServerConfig
------------------------
--------plan--------
1. Client Auto Reconnect(V)
2. Client Auto Register(V)
3. Server Auto deregister(V)
4. Server Cluster Recovery(V)
5. Server concurrent recovery(V)
6. server cluster(V)(nacos,ZK)
7. startup shell script(X)
8. server dashboard(X)
9. Config file(X)
10. nacos/zk manual offline support(X)
11. support feign rpc & add feign sample(X)

-------

https://blog.csdn.net/weixin_40910372/article/details/104800143



Binary file added doc/images/login.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/tcc-task-manage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/tcc-transaction-manage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/welcome.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions doc/tcc-transaction-dashboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 本地启动

## 1 启动服务tcc-transaction-server

## 2 启动服务tcc-transaction-dashboard

## 3 页面效果

### 访问地址

```
http://localhost:8888/tcc-transaction-dashboard
```

### 登录功能

#### 登录页

默认用户: admin 密码:123456
![登录页面](./images/login.jpg)

#### 首页

![首页](./images/welcome.jpg)

### 事件管理

![tcc事件管理](./images/tcc-transaction-manage.jpg)

### 任务管理

![tcc任务管理](./images/tcc-task-manage.jpg)


10 changes: 7 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<properties>

<java.version>1.8</java.version>
<revision>1.8.1</revision>
<revision>2.0.0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
Expand All @@ -36,11 +36,15 @@
<module>tcc-transaction-core</module>
<module>tcc-transaction-spring</module>
<module>tcc-transaction-dashboard</module>
<module>tcc-transaction-server</module>
<module>tcc-transaction-dubbo</module>
<module>tcc-transaction-bom</module>
<module>tcc-transaction-ha</module>
<module>tcc-transaction-unit-test</module>
<module>tcc-transaction-tutorial-sample</module>
<module>tcc-transaction-spring-boot-starter</module>
<module>tcc-transaction-distribution</module>
<module>tcc-transaction-http</module>
<module>tcc-transaction-grpc</module>
</modules>

<build>
Expand Down Expand Up @@ -112,4 +116,4 @@
</build>


</project>
</project>
2 changes: 2 additions & 0 deletions tcc-transaction-admin-web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

dist
2 changes: 1 addition & 1 deletion tcc-transaction-admin-web/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function getClientEnvironment(publicUrl) {
}, {}),
};

return { raw, stringified };
return {raw, stringified};
}

module.exports = getClientEnvironment;
6 changes: 3 additions & 3 deletions tcc-transaction-admin-web/config/getHttpsConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const paths = require('./paths');

// Ensure the certificate and key provided are valid and if not
// throw an easy to debug error
function validateKeyAndCerts({ cert, key, keyFile, crtFile }) {
function validateKeyAndCerts({cert, key, keyFile, crtFile}) {
let encrypted;
try {
// publicEncrypt will throw an error with an invalid cert
Expand Down Expand Up @@ -46,7 +46,7 @@ function readEnvFile(file, type) {
// Get the https config
// Return cert files if provided in env, otherwise just true or false
function getHttpsConfig() {
const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env;
const {SSL_CRT_FILE, SSL_KEY_FILE, HTTPS} = process.env;
const isHttps = HTTPS === 'true';

if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) {
Expand All @@ -57,7 +57,7 @@ function getHttpsConfig() {
key: readEnvFile(keyFile, 'SSL_KEY_FILE'),
};

validateKeyAndCerts({ ...config, keyFile, crtFile });
validateKeyAndCerts({...config, keyFile, crtFile});
return config;
}
return isHttps;
Expand Down
2 changes: 1 addition & 1 deletion tcc-transaction-admin-web/config/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function getAdditionalModulePaths(options = {}) {
throw new Error(
chalk.red.bold(
"Your project's `baseUrl` can only be set to `src` or `node_modules`." +
' Create React App does not support other values at this time.'
' Create React App does not support other values at this time.'
)
);
}
Expand Down
1 change: 0 additions & 1 deletion tcc-transaction-admin-web/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,4 @@ module.exports = {
};



module.exports.moduleFileExtensions = moduleFileExtensions;
2 changes: 1 addition & 1 deletion tcc-transaction-admin-web/config/pnpTs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { resolveModuleName } = require('ts-pnp');
const {resolveModuleName} = require('ts-pnp');

exports.resolveModuleName = (
typescript,
Expand Down
Loading

0 comments on commit a083718

Please sign in to comment.