Skip to content

Commit c04b9af

Browse files
committed
Optimize Runtime doc
1 parent d49e1a5 commit c04b9af

File tree

3 files changed

+73
-59
lines changed

3 files changed

+73
-59
lines changed

docs/instruction/03-runtime.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EventMesh Runtime
1+
# EventMesh Runtime Quick Start
22

33
The EventMesh Runtime is a stateful mesh node in an EventMesh cluster that is responsible for event transfer between the Source Connector and the Sink Connector, and can use Event Store as a storage queue for events.
44

@@ -10,11 +10,12 @@ The EventMesh Runtime is a stateful mesh node in an EventMesh cluster that is re
1010

1111
#### 1.1.1 Dependencies
1212

13-
```
14-
64-bit OS,we recommend Linux/Unix;
15-
64-bit JDK 1.8+;
16-
Gradle 7.0+, we recommend 7.0.*;
17-
```
13+
- 64-bit OS, we recommend Linux/Unix.
14+
15+
- 64-bit JDK 1.8 or JDK 11
16+
17+
- Gradle 7.0+, The recommended version can be found in the `gradle/wrapper/gradle-wrapper.properties` file.
18+
1819
#### 1.1.2 Download source code
1920

2021
Download and extract the source code of the latest release from [EventMesh download](https://eventmesh.apache.org/download). For example, with the current latest version, you will get `apache-eventmesh-1.9.0-source.tar.gz`.
@@ -23,16 +24,18 @@ Download and extract the source code of the latest release from [EventMesh downl
2324

2425
**1.1.3.1 Description of the project structure:**
2526

26-
- eventmesh-common : eventmesh public classes and methods module
27-
- eventmesh-connector-api : eventmesh connector plugin interface definition module
28-
- eventmesh-connector-plugin : eventmesh connector plugin module
27+
- eventmesh-common : EventMesh public classes and methods module
28+
- eventmesh-connector-api : EventMesh Connector plugin interface definition module
29+
- eventmesh-connector-plugin : EventMesh Connector plugin module
2930
- eventmesh-runtime : EventMesh Runtime module
30-
- eventmesh-sdk-java : eventmesh java client sdk
31-
- eventmesh-starter : eventmesh local startup and runtime project portal
32-
- eventmesh-spi : eventmesh SPI loader module
33-
34-
> Note: Plugin modules follow the SPI specification defined by eventmesh, custom SPI interfaces need to be marked with the annotation @EventMeshSPI.
35-
> Plugin instances need to be configured in the corresponding module under /main/resources/META-INF/eventmesh with a mapping file of the relevant interfaces to their implementation classes, with the name of the file being the full class name of the SPI interface.
31+
- eventmesh-sdk-java : EventMesh Java client SDK
32+
- eventmesh-starter : EventMesh Runtime local startup and project portal
33+
- eventmesh-spi : EventMesh SPI loader module
34+
35+
> Note: Plugin modules follow the SPI specification defined by eventmesh, custom SPI interfaces need to be marked with the annotation `@EventMeshSPI`.
36+
>
37+
> Plugin instances need to be configured in the corresponding module under `/main/resources/META-INF/eventmesh` with a mapping file of the relevant interfaces to their implementation classes, with the name of the file being the full class name of the SPI interface.
38+
>
3639
> The content of the file is the mapping from the plugin instance name to the plugin instance, see eventmesh-connector-rocketmq plugin module for details.
3740
3841
**1.1.3.2 Plugin Description**
@@ -55,7 +58,7 @@ There are two ways to install the plugin
5558

5659
***1.1.3.2.2 Using Plugins ***
5760

58-
EventMesh will load plugins in the dist/plugin directory by default, you can change the plugin directory with `-DeventMeshPluginDir=your_plugin_directory`. Examples of plugins to be used at runtime can be found in the
61+
EventMesh will load plugins in the `dist/plugin` directory by default, you can change the plugin directory with `-DeventMeshPluginDir=your_plugin_directory`. Examples of plugins to be used at runtime can be found in the
5962
`confPath` directory under `eventmesh.properties`. For example declare the use of the rocketmq plugin at runtime with the following settings.
6063

6164
```properties
@@ -84,11 +87,11 @@ Run org.apache.eventmesh.starter.
8487

8588
#### 1.1.1 Dependencies
8689

87-
```
88-
64-bit OS,we recommend Linux/Unix;
89-
64-bit JDK 1.8+;
90-
Gradle 7.0+, we recommend 7.0.*;
91-
```
90+
- 64-bit OS, we recommend Linux/Unix.
91+
92+
- 64-bit JDK 1.8 or JDK 11
93+
94+
- Gradle 7.0+, The current recommended version can be found in the `gradle/wrapper/gradle-wrapper.properties` file.
9295

9396
Gradle is the build automation tool used by Apache EventMesh. Please refer to the [offical guide](https://docs.gradle.org/current/userguide/installation.html) to install the latest release of Gradle.
9497

@@ -136,7 +139,8 @@ dependencies {
136139
```console
137140
gradle installPlugin
138141
```
139-
### 1.1.4 启动Runtime
142+
143+
### 1.1.4 启动 Runtime
140144

141145
Execute the `start.sh` script to start the EventMesh Runtime server.
142146

@@ -151,6 +155,7 @@ View the output log:
151155
```console
152156
tail -f logs/eventmesh.out
153157
```
158+
154159
![runtime_3](/images/install/runtime_3.png)
155160

156161
## 2 Remote deployment
@@ -199,13 +204,15 @@ View the output log:
199204
cd /root/apache-eventmesh-1.9.0/logs
200205
tail -f eventmesh.out
201206
```
207+
202208
![runtime_7](/images/install/runtime_7.png)
203209

204-
You can stop the run with the following command
210+
You can stop the run with the following command:
205211

206212
```console
207213
bash bin/stop.sh
208214
```
209215

210216
![runtime_8](/images/install/runtime_8.png)
211-
![runtime_9](/images/install/runtime_9.png)
217+
218+
![runtime_9](/images/install/runtime_9.png)

i18n/zh/docusaurus-plugin-content-docs/current/instruction/03-runtime.md

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Eventmesh-runtime 快速入门说明
1+
# Eventmesh Runtime 快速入门说明
22

33
EventMesh Runtime 是 EventMesh 集群中有状态的 Mesh 节点,负责 Source Connector 与 Sink Connector 之间的事件传输,并可以使用 Event Store 作为事件的存储队列。
44

@@ -10,11 +10,11 @@ EventMesh Runtime 是 EventMesh 集群中有状态的 Mesh 节点,负责 Sourc
1010

1111
#### 1.1.1 依赖
1212

13-
```
14-
建议使用64位操作系统,建议使用Linux / Unix;
15-
64位JDK 1.8+;
16-
Gradle至少为7.0, 推荐 7.0.*
17-
```
13+
- 建议使用 64 位操作系统,建议使用 Linux / Unix。
14+
15+
- 64 位 JDK 1.8 或 JDK 11
16+
17+
- Gradle 7.0+, 可于 `gradle/wrapper/gradle-wrapper.properties` 文件中查看推荐版本。
1818

1919
#### 1.1.2 下载源码
2020

@@ -24,25 +24,27 @@ Gradle至少为7.0, 推荐 7.0.*
2424

2525
**1.1.3.1 项目结构说明:**
2626

27-
- eventmesh-common : eventmesh公共类与方法模块
28-
- eventmesh-connector-api : eventmesh connector插件接口定义模块
29-
- eventmesh-connector-plugin : eventmesh connector插件模块
30-
- eventmesh-runtime : eventmesh运行时模块
31-
- eventmesh-sdk-java : eventmesh java客户端sdk
32-
- eventmesh-starter : eventmesh本地启动运行项目入口
33-
- eventmesh-spi : eventmesh SPI加载模块
27+
- eventmesh-common : EventMesh 公共类与方法模块
28+
- eventmesh-connector-api : EventMesh Connector 插件接口定义模块
29+
- eventmesh-connector-plugin : EventMesh Connector 插件模块
30+
- eventmesh-runtime : EventMesh 运行时模块
31+
- eventmesh-sdk-java : EventMesh Java 客户端 SDK
32+
- eventmesh-starter : EventMesh 本地启动运行项目入口
33+
- eventmesh-spi : EventMesh SPI 加载模块
3434

35-
> 注:插件模块遵循 eventmesh 定义的SPI规范, 自定义的SPI接口需要使用注解 @EventMeshSPI 标识.
36-
> 插件实例需要在对应模块中的 /main/resources/META-INF/eventmesh 下配置相关接口与实现类的映射文件,文件名为SPI接口全类名.
37-
> 文件内容为插件实例名到插件实例的映射, 具体可以参考 eventmesh-connector-rocketmq 插件模块
35+
> 注:插件模块遵循 EventMesh 定义的 SPI 规范,自定义的 SPI 接口需要使用注解 `@EventMeshSPI` 标识。
36+
>
37+
> 插件实例需要在对应模块中的 `/main/resources/META-INF/eventmesh` 下配置相关接口与实现类的映射文件,文件名为 SPI 接口全类名。
38+
>
39+
> 文件内容为插件实例名到插件实例的映射,具体可以参考 eventmesh-connector-rocketmq 插件模块。
3840
3941
**1.1.3.2 插件说明**
4042

4143
***1.1.3.2.1 安装插件***
4244

4345
有两种方式安装插件
4446

45-
- classpath加载:本地开发可以通过在 eventmesh-starter 模块 build.gradle 中进行声明,例如声明使用 rocketmq 插件
47+
- classpath 加载:本地开发可以通过在 eventmesh-starter 模块 build.gradle 中进行声明,例如声明使用 rocketmq 插件
4648

4749
```gradle
4850
implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq")
@@ -56,15 +58,15 @@ Gradle至少为7.0, 推荐 7.0.*
5658

5759
***1.1.3.2.2 使用插件***
5860

59-
EventMesh 会默认加载 dist/plugin 目录下的插件,可以通过`-DeventMeshPluginDir=your_plugin_directory`来改变插件目录。运行时需要使用的插件实例可以在
60-
`confPath`目录下面的`eventmesh.properties`中进行配置。例如通过以下设置声明在运行时使用rocketmq插件
61+
EventMesh 会默认加载 `dist/plugin` 目录下的插件,可以通过`-DeventMeshPluginDir=your_plugin_directory`来改变插件目录。运行时需要使用的插件实例可以在
62+
`confPath`目录下面的`eventmesh.properties`中进行配置。例如通过以下设置声明在运行时使用 rocketmq 插件
6163

6264
```properties
6365
#connector plugin
6466
eventMesh.connector.plugin.type=rocketmq
6567
```
6668

67-
**1.1.3.3 配置VM启动参数**
69+
**1.1.3.3 配置 VM 启动参数**
6870

6971
```properties
7072
-Dlog4j.configurationFile=eventmesh-runtime/conf/log4j2.xml
@@ -73,7 +75,7 @@ eventMesh.connector.plugin.type=rocketmq
7375
-DconfPath=eventmesh-runtime/conf
7476
```
7577

76-
> 注:如果操作系统为Windows, 可能需要将文件分隔符换成'\'
78+
> 注:如果操作系统为 Windows, 可能需要将文件分隔符换成'\'
7779
7880
**1.1.3.4 启动运行**
7981

@@ -85,11 +87,11 @@ eventMesh.connector.plugin.type=rocketmq
8587

8688
#### 1.2.1 依赖
8789

88-
```
89-
建议使用64位操作系统,建议使用Linux / Unix;
90-
64位JDK 1.8+;
91-
Gradle至少为7.0, 推荐 7.0.*
92-
```
90+
- 建议使用 64 位操作系统,建议使用 Linux / Unix。
91+
92+
- 64 位 JDK 1.8 或 JDK 11
93+
94+
- Gradle 7.0+, 可于 `gradle/wrapper/gradle-wrapper.properties` 文件中查看当前版本推荐的 Gradle 版本。
9395

9496
Gradle 是 Apache EventMesh 使用的构建自动化工具。请参考 [官方指南](https://docs.gradle.org/current/userguide/installation.html) 安装最新版本的 Gradle。
9597

@@ -119,39 +121,41 @@ vim conf/eventmesh.properties
119121

120122
#### 1.2.3 构建并加载插件
121123

122-
Apache EventMesh引入了 SPI 机制,使 EventMesh 能够在运行时发现并加载插件。有两种方式安装插件:
124+
Apache EventMesh 引入了 SPI 机制,使 EventMesh 能够在运行时发现并加载插件。有两种方式安装插件:
123125

124-
1. Gradle 依赖项: `eventmesh-starter/build.gradle` 中将插件声明为构建依赖项。
126+
1. Gradle 依赖项:在 `eventmesh-starter/build.gradle` 中将插件声明为构建依赖项。
125127

126128
```gradle
127129
dependencies {
128130
implementation project(":eventmesh-runtime")
129131
130-
// 示例: 加载 RocketMQ 插件
132+
// 示例:加载 RocketMQ 插件
131133
implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq")
132134
}
133135
```
134136

135-
2. 插件目录: EventMesh 会根据 `eventmesh.properties` 加载 `dist/plugin` 目录中的插件。Gradle 的 `installPlugin` 任务会构建插件并将其移动到 `dist/plugin` 目录中。
137+
2. 插件目录:EventMesh 会根据 `eventmesh.properties` 加载 `dist/plugin` 目录中的插件。Gradle 的 `installPlugin` 任务会构建插件并将其移动到 `dist/plugin` 目录中。
136138

137139
```console
138140
gradle installPlugin
139141
```
140142

141-
#### 1.2.4 启动Runtime
143+
#### 1.2.4 启动 Runtime
142144

143145
执行 `start.sh` 脚本启动 EventMesh Runtime 服务器。
144146

145147
```console
146148
bash bin/start.sh
147149
```
150+
148151
![runtime_4](/images/install/runtime_4.png)
149152

150153
查看输出日志:
151154

152155
```console
153156
tail -f logs/eventmesh.out
154157
```
158+
155159
![runtime_3](/images/install/runtime_3.png)
156160

157161
## 2 远程部署
@@ -166,7 +170,7 @@ Gradle至少为7.0, 推荐 7.0.*
166170

167171
### 2.2 下载
168172

169-
[EventMesh download](https://eventmesh.apache.org/download) 页面选择1.5.0版本的 Binary Distribution 进行下载, 您将获得`apache-eventmesh-1.9.0-bin.tar.gz`
173+
[EventMesh download](https://eventmesh.apache.org/download) 页面选择 1.5.0 版本的 Binary Distribution 进行下载您将获得`apache-eventmesh-1.9.0-bin.tar.gz`
170174

171175
```console
172176
# 解压
@@ -187,6 +191,7 @@ vim conf/eventmesh.properties
187191
```console
188192
bash bin/start.sh
189193
```
194+
190195
如果看到"EventMeshTCPServer[port=10000] started....",则说明设置成功。
191196

192197
![runtime_6](/images/install/runtime_6.png)
@@ -198,6 +203,7 @@ bash bin/start.sh
198203
cd /root/apache-eventmesh-1.9.0/logs
199204
tail -f eventmesh.out
200205
```
206+
201207
![runtime_7](/images/install/runtime_7.png)
202208

203209
停止:
@@ -207,4 +213,5 @@ bash bin/stop.sh
207213
```
208214

209215
![runtime_8](/images/install/runtime_8.png)
210-
![runtime_9](/images/install/runtime_9.png)
216+
217+
![runtime_9](/images/install/runtime_9.png)

i18n/zh/docusaurus-plugin-content-docs/current/instruction/05-demo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ TCP、HTTP 和 GRPC 示例都在`eventmesh-examples`模块下。
5050

5151
> 对于 HTTP,eventmesh-sdk-java 对异步事件实现了发送与订阅。
5252
>
53-
> 在Demo中,Java 类`LiteMessage``content`字段表示一个特殊的协议。因此,如果您要使用 eventmesh-sdk-java 的 http-client,则只需设计协议的内容并在同一时间提供消费者的应用程序。
53+
> 在 Demo 中,Java 类`LiteMessage``content`字段表示一个特殊的协议。因此,如果您要使用 eventmesh-sdk-java 的 http-client,则只需设计协议的内容并在同一时间提供消费者的应用程序。
5454
5555
### 2.1 异步事件
5656

@@ -133,7 +133,7 @@ TCP、HTTP 和 GRPC 示例都在`eventmesh-examples`模块下。
133133

134134
## 4. 使用 Shell 脚本运行 Demo
135135

136-
请参考[EventMesh Store](./01-store.md)[EventMesh Runtime](./03-runtime.md) 完成运行环境的部署
136+
请参考 [EventMesh Store](./01-store.md)[EventMesh Runtime](./03-runtime.md) 完成运行环境的部署
137137

138138
完成 store 和 runtime 的部署后,就可以在 eventmesh-examples 模块下运行我们的 demo 来体验 eventmesh 了:
139139

0 commit comments

Comments
 (0)