zhongjiajie commented on a change in pull request #590:
URL:
https://github.com/apache/dolphinscheduler-website/pull/590#discussion_r771091147
##########
File path: docs/en-us/dev/user_doc/architecture/cache.md
##########
@@ -0,0 +1,42 @@
+### Cache
+
+#### purpose
+
+Due to the master-server scheduling process, there will be a large number of
database read operations, such as `tenant`, `user`, `processDefinition`, etc.
On the one hand, it will put a lot of pressure on the DB, and on the other
hand, it will slow down the entire core scheduling process.
+
+Considering that this part of the business data is a scenario where more reads
and less writes are performed, a cache module is introduced to reduce the DB
read pressure and speed up the core scheduling process;
+
+#### Cache settings
+
+```
Review comment:
```suggestion
```yaml
```
##########
File path: docs/zh-cn/dev/user_doc/architecture/cache.md
##########
@@ -0,0 +1,42 @@
+### 缓存
+
+#### 缓存目的
+
+由于在master-server调度过程中,会产生大量的数据库读取操作,如tenant,user,processDefinition等,一方面对DB产生很大的读压力,另一方面则会使整个核心调度流程变得缓慢;
+
+考虑到这部分业务数据是读多写少的场景,故引入了缓存模块,以减少DB读压力,加快核心调度流程;
+
+#### 缓存设置
+
+```
Review comment:
```suggestion
```yaml
```
##########
File path: docs/zh-cn/dev/user_doc/architecture/cache.md
##########
@@ -0,0 +1,42 @@
+### 缓存
+
+#### 缓存目的
+
+由于在master-server调度过程中,会产生大量的数据库读取操作,如tenant,user,processDefinition等,一方面对DB产生很大的读压力,另一方面则会使整个核心调度流程变得缓慢;
+
+考虑到这部分业务数据是读多写少的场景,故引入了缓存模块,以减少DB读压力,加快核心调度流程;
+
+#### 缓存设置
+
+```
+spring:
+ cache:
+ # default enable cache, you can disable by `type: none`
+ type: none
+ cache-names:
+ - tenant
+ - user
+ - processDefinition
+ - processTaskRelation
+ - taskDefinition
+ caffeine:
+ spec: maximumSize=100,expireAfterWrite=300s,recordStats
+```
+
+缓存模块采用[spring-cache](https://spring.io/guides/gs/caching/
)机制,可直接在spring配置文件中配置是否开启缓存(默认none关闭), 缓存类型;
+
+目前采用[caffeine](https://github.com/ben-manes/caffeine
)进行缓存管理,可自由设置缓存相关配置,如缓存大小、过期时间等;
Review comment:
```suggestion
目前采用[caffeine](https://github.com/ben-manes/caffeine)进行缓存管理,可自由设置缓存相关配置,如缓存大小、过期时间等;
```
##########
File path: site_config/docsdev.js
##########
@@ -221,6 +221,10 @@ export default {
{
title: 'Load Balance',
link:
'/en-us/docs/dev/user_doc/architecture/load-balance.html',
+ },
+ {
Review comment:
keep the same indentation also above item?
##########
File path: docs/zh-cn/dev/user_doc/architecture/cache.md
##########
@@ -0,0 +1,42 @@
+### 缓存
+
+#### 缓存目的
+
+由于在master-server调度过程中,会产生大量的数据库读取操作,如tenant,user,processDefinition等,一方面对DB产生很大的读压力,另一方面则会使整个核心调度流程变得缓慢;
+
+考虑到这部分业务数据是读多写少的场景,故引入了缓存模块,以减少DB读压力,加快核心调度流程;
+
+#### 缓存设置
+
+```
+spring:
+ cache:
+ # default enable cache, you can disable by `type: none`
+ type: none
+ cache-names:
+ - tenant
+ - user
+ - processDefinition
+ - processTaskRelation
+ - taskDefinition
+ caffeine:
+ spec: maximumSize=100,expireAfterWrite=300s,recordStats
+```
+
+缓存模块采用[spring-cache](https://spring.io/guides/gs/caching/
)机制,可直接在spring配置文件中配置是否开启缓存(默认none关闭), 缓存类型;
+
+目前采用[caffeine](https://github.com/ben-manes/caffeine
)进行缓存管理,可自由设置缓存相关配置,如缓存大小、过期时间等;
+
+#### 缓存读取
+
+缓存采用spring-cache的注解,配置在相关的mapper层,可参考如:TenantMapper.
Review comment:
```suggestion
缓存采用spring-cache的注解,配置在相关的mapper层,可参考如:`TenantMapper`.
```
##########
File path: docs/zh-cn/dev/user_doc/architecture/cache.md
##########
@@ -0,0 +1,42 @@
+### 缓存
+
+#### 缓存目的
+
+由于在master-server调度过程中,会产生大量的数据库读取操作,如tenant,user,processDefinition等,一方面对DB产生很大的读压力,另一方面则会使整个核心调度流程变得缓慢;
+
+考虑到这部分业务数据是读多写少的场景,故引入了缓存模块,以减少DB读压力,加快核心调度流程;
+
+#### 缓存设置
+
+```
+spring:
+ cache:
+ # default enable cache, you can disable by `type: none`
+ type: none
+ cache-names:
+ - tenant
+ - user
+ - processDefinition
+ - processTaskRelation
+ - taskDefinition
+ caffeine:
+ spec: maximumSize=100,expireAfterWrite=300s,recordStats
+```
+
+缓存模块采用[spring-cache](https://spring.io/guides/gs/caching/
)机制,可直接在spring配置文件中配置是否开启缓存(默认none关闭), 缓存类型;
+
+目前采用[caffeine](https://github.com/ben-manes/caffeine
)进行缓存管理,可自由设置缓存相关配置,如缓存大小、过期时间等;
+
+#### 缓存读取
+
+缓存采用spring-cache的注解,配置在相关的mapper层,可参考如:TenantMapper.
+
+#### 缓存更新
+
+业务数据的更新来自于api-server, 而缓存端在master-server,
故需要对api-server的数据更新做监听(aspect切面拦截@CacheEvict),当需要进行缓存驱逐时会通知master-server,master-server接收到cacheEvictCommand后进行缓存驱逐;
Review comment:
```suggestion
业务数据的更新来自于api-server, 而缓存端在master-server,
故需要对api-server的数据更新做监听(aspect切面拦截`@CacheEvict`),当需要进行缓存驱逐时会通知master-server,master-server接收到cacheEvictCommand后进行缓存驱逐;
```
##########
File path: docs/zh-cn/dev/user_doc/architecture/cache.md
##########
@@ -0,0 +1,42 @@
+### 缓存
+
+#### 缓存目的
+
+由于在master-server调度过程中,会产生大量的数据库读取操作,如tenant,user,processDefinition等,一方面对DB产生很大的读压力,另一方面则会使整个核心调度流程变得缓慢;
+
+考虑到这部分业务数据是读多写少的场景,故引入了缓存模块,以减少DB读压力,加快核心调度流程;
+
+#### 缓存设置
+
+```
+spring:
+ cache:
+ # default enable cache, you can disable by `type: none`
+ type: none
+ cache-names:
+ - tenant
+ - user
+ - processDefinition
+ - processTaskRelation
+ - taskDefinition
+ caffeine:
+ spec: maximumSize=100,expireAfterWrite=300s,recordStats
+```
+
+缓存模块采用[spring-cache](https://spring.io/guides/gs/caching/
)机制,可直接在spring配置文件中配置是否开启缓存(默认none关闭), 缓存类型;
Review comment:
```suggestion
缓存模块采用[spring-cache](https://spring.io/guides/gs/caching/)机制,可直接在spring配置文件中配置是否开启缓存(默认`none`关闭),
缓存类型;
```
##########
File path: site_config/docsdev.js
##########
@@ -221,6 +221,10 @@ export default {
{
title: 'Load Balance',
link:
'/en-us/docs/dev/user_doc/architecture/load-balance.html',
+ },
+ {
Review comment:
Same as zh doc
##########
File path: docs/en-us/dev/user_doc/architecture/cache.md
##########
@@ -0,0 +1,42 @@
+### Cache
+
+#### purpose
Review comment:
```suggestion
#### Purpose
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]