Skip to content

Commit

Permalink
Merge pull request #38 from WeDataSphere/dev-0.2.0-docs-appconn
Browse files Browse the repository at this point in the history
Update English StreamisAppConnDesignDocument
  • Loading branch information
Davidhua1996 authored Jul 4, 2022
2 parents ffb3ffe + 50beefd commit 97b9e59
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 107 deletions.
2 changes: 1 addition & 1 deletion README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Dimension节点、Transform节点、Sink节点 和 [Visualis](https://github.com
| 依赖的应用工具 | 描述 | Streamis 兼容版本 |
|--------------|---------------------------------------------------------------|--------------|
| [DataSphereStudio](https://github.com/WeBankFinTech/DataSphereStudio) | 数据应用开发管理集成框架。以工作流式的图形化拖拽开发体验,将满足从数据交换、脱敏清洗、分析挖掘、质量检测、可视化展现、定时调度到数据输出应用等,数据应用开发全流程场景需求。 | >= DSS1.1.0(已发布)|
| [Linkis](https://github.com/apache/incubator-linkis) | 计算中间件 Apache Linkis,通过提供 REST/WebSocket/JDBC/SDK 等标准接口,上层应用可以方便地连接访问 MySQL/Spark/Hive/Presto/Flink 等底层引擎。 | >= Linkis1.1.1(已发布) |
| [Linkis](https://github.com/apache/incubator-linkis) | 计算中间件 Apache Linkis,通过提供 REST/WebSocket/JDBC/SDK 等标准接口,上层应用可以方便地连接访问 MySQL/Spark/Hive/Presto/Flink 等底层引擎。 | >= Linkis1.1.1(已发布),部分功能需要Linkis 1.1.2支持 |

----

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ The Dimension node, Transform node, Sink node and [Visualis](https://github.com/

       Supports multi-version management, full life cycle management, monitoring alarm, checkpoint and savepoint management capabilities of streaming jobs.

![prod center](docs/images/homePage_en.png)
![prod center](docs/images/stream_product_center.png)

       Running information page:

![Running information](docs/images/statusDetail_en.png)
![Running information](docs/images/stream_job_detail.png)

       Configurations page:

![Configurations](docs/images/config_en.png)
![Configurations](docs/images/stream_job_config_1.png)
![Configurations](docs/images/stream_job_config_2.png)

       For more features, please refer to: [User Manual](docs/en_US/userManual/StreamisUserManual.md).

Expand All @@ -54,7 +55,7 @@ The Dimension node, Transform node, Sink node and [Visualis](https://github.com/
| Depended Component | Description | Streamis compatibility |
| -------------- | -------------------------------------------------------------- | --------------|
| [DataSphereStudio](https://github.com/WeBankFinTech/DataSphereStudio) | Data application development management framework. With a unified UI, the workflow-like graphical drag-and-drop development experience meets the entire lifecycle of data application development from data import, desensitization cleaning, data analysis, data mining, quality inspection, visualization, scheduling to data output applications, etc. | >= DSS1.1.0 (Released) |
| [Linkis](https://github.com/apache/incubator-linkis) | Apache Linkis, builds a layer of computation middleware, by using standard interfaces such as REST/WS/JDBC provided by Linkis, the upper applications can easily access the underlying engines such as MySQL/Spark/Hive/Presto/Flink, etc. | &gt= Linkis1.1.1 (Released) |
| [Linkis](https://github.com/apache/incubator-linkis) | Apache Linkis, builds a layer of computation middleware, by using standard interfaces such as REST/WS/JDBC provided by Linkis, the upper applications can easily access the underlying engines such as MySQL/Spark/Hive/Presto/Flink, etc. | >= Linkis1.1.1 (Released),some functions need to be supported by linkis 1.1.2 |

## Demo Trial environment

Expand Down
54 changes: 0 additions & 54 deletions docs/en_US/0.2.0/FlinkEnginePluginCompileDocument.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/en_US/0.2.0/StreamisDeployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ After the compilation is successful, the installation package will be generated
- JDK (above 1.8.0_141), [How to install JDK](https://www.runoob.com/java/java-environment-setup.html)

### 3.2 Linkis and DSS environments
- The execution of Streamis depends on Linkis, and it needs to be version 1.1.1 and above, so you need to install Linkis above 1.1.1 and ensure that the Flink engine can be used normally. Specifically, you can create a new and edit a flinksql script on Scriptis
- The execution of Streamis depends on Linkis, and it needs to be version 1.1.1 and above, so you need to install Linkis above 1.1.1 and ensure that the Flink engine can be used normally.Some functions need to be supported by linkis-1.1.2.
- Datasphere studio (> =1.1.0), the development and debugging of streaming jobs depend on DSS scriptis, and the streaming production center needs to be embedded in the DSS engineering framework system, so it depends on * * dss-1.1.0 * * and above.

Before the formal installation of streamis, please install linkis1.1.1 and dss1.1.0 or above, and ensure that the linkis Flink engine and DSS can be used normally. For the installation of DSS and linkis, please refer to the [dss & linkis one click installation and deployment document](https://github.com/WeBankFinTech/DataSphereStudio-Doc/blob/main/zh_CN/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2/DSS%E5%8D%95%E6%9C%BA%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3.md).
Before the formal installation of streamis, please install linkis-1.1.1 and dss-1.1.0 or above, and ensure that the linkis Flink engine and DSS can be used normally. For the installation of DSS and linkis, please refer to the [dss & linkis one click installation and deployment document](https://github.com/WeBankFinTech/DataSphereStudio-Doc/blob/main/zh_CN/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2/DSS%E5%8D%95%E6%9C%BA%E9%83%A8%E7%BD%B2%E6%96%87%E6%A1%A3.md).

How to verify that DSS and linkis are basically available? You can create a flinksql script on DSS scriptis and execute it. If flinksql can execute correctly and return the result set, it means that the DSS and linkis environments are available.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Streamis access AppConn

## Overall flow chart
![Streamis access DSS](../../images/zh_CN/streamis_appconn.png)
![Streamis access DSS](../../../images/streamis_appconn_en.png)

## DSS project APPCONN plug-in streamis-appconn

### The configuration table
Configure the following three tables:dss_appconn、dss_workspace_menu_appconn、dss_appconn_instance,appconn_name for realTimeJobCenter is appconn accessed by the graphical interface,appconn_name for streamis is appconn accessed by the API,The StreamisAppConn object is instantiated based on the configuration information in the table when DSS is started
Configure the following four tables:dss_workspace_dictionarydss_appconn、dss_workspace_menu_appconn、dss_appconn_instance,appconn_name for realTimeJobCenter is appconn accessed by the graphical interface,appconn_name for streamis is appconn accessed by the API,The StreamisAppConn object is instantiated based on the configuration information in the table when DSS is started.Appconn in the following SQL_ INSTALL_ IP and appconn_ INSTALL_ When executing DSS installation script for automatic installation, port will enter through interactive commands.
```roomsql
delete from `dss_workspace_dictionary` WHERE `appconn_name` = 'streamis';
INSERT INTO `dss_workspace_dictionary` ( `workspace_id`, `parent_key`, `dic_name`, `dic_name_en`, `dic_key`, `dic_value`, `dic_value_en`, `title`, `title_en`, `url`, `url_type`,`icon`, `order_num`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, appconn_name)
VALUES ('0','p_develop_process','流式生产中心','Streamis Product Center','pdp_streamis_product_center','streamis_prod',NULL,NULL,NULL,
'http://APPCONN_INSTALL_IP:APPCONN_INSTALL_PORT/#/realtimeJobCenter?projectName=${projectName}&workspaceName=${workspaceName}','0','kaifa-icon','1','工程开发流程-流式生产中心','SYSTEM','2020-12-28 17:32:35',NULL,'2022-06-30 17:49:02','streamis');
select @old_dss_appconn_id:=id from `dss_appconn` where `appconn_name` = 'streamis';
delete from `dss_workspace_menu_appconn` WHERE `appconn_id` = @old_dss_appconn_id;
Expand Down Expand Up @@ -37,11 +43,11 @@ VALUES(@jobcenter_dss_appconn_id, 1, 'StreamSQL development', 'StreamSQL开发',
INSERT INTO dss_appconn_instance
(appconn_id, label, url, enhance_json, homepage_uri)
VALUES(@dss_appconn_id, 'DEV', 'http://Streamis_INSTALL_IP:Streamis_INSTALL_PORT/', '', 'http://Streamis_INSTALL_IP:Streamis_INSTALL_PORT/#/realTimeJobCenter');
VALUES(@dss_appconn_id, 'DEV', 'http://APPCONN_INSTALL_IP:APPCONN_INSTALL_PORT/', '', 'http://APPCONN_INSTALL_IP:APPCONN_INSTALL_PORT/#/realTimeJobCenter');
INSERT INTO dss_appconn_instance
(appconn_id, label, url, enhance_json, homepage_uri)
VALUES(@jobcenter_dss_appconn_id, 'DEV', 'http://Streamis_INSTALL_IP:Streamis_INSTALL_PORT/#/realTimeJobCenter', NULL, NULL);
VALUES(@jobcenter_dss_appconn_id, 'DEV', 'http://APPCONN_INSTALL_IP:APPCONN_INSTALL_PORT/#/realTimeJobCenter', NULL, NULL);
```

### Concrete implementation description
Expand All @@ -55,7 +61,7 @@ To create a StreamisProjectService by rewriting the methods in StreamisStructure

## API
1 API name: query project
- API path:GET/streamis/project/searchProject
- API path:GET /streamis/project/searchProject
- Request parameters

|Parameter name |Whether it is necessary |Example |remarks |
Expand All @@ -73,7 +79,7 @@ To create a StreamisProjectService by rewriting the methods in StreamisStructure
|- projectId |number |yes |

2 API name:create project
- API path:GET/streamis/project/createProject
- API path:POST /streamis/project/createProject
- Request parameters

|Parameter name |Whether it is necessary |Example |remarks |
Expand All @@ -96,7 +102,7 @@ To create a StreamisProjectService by rewriting the methods in StreamisStructure
|- projectName |string |no |

3 API name:update project
- API path:GET/streamis/project/updateProject
- API path:PUT /streamis/project/updateProject
- Request parameters

|Parameter name |Whether it is necessary |Example |remarks |
Expand All @@ -118,7 +124,7 @@ To create a StreamisProjectService by rewriting the methods in StreamisStructure
|data |object |no |

4 API name:delete project
- API path:GET/streamis/project/deleteProject
- API path:DELETE /streamis/project/deleteProject
- Request parameters

|Parameter name |Whether it is necessary |Example |remarks |
Expand Down Expand Up @@ -170,40 +176,3 @@ ALTER TABLE `linkis_stream_project` ADD is_deleted tinyint unsigned DEFAULT 0;
- The creation operation will insert the project information (projectName、workspaceId) in the request parameters into the project table linkis_stream_project and auto increment the generated ID, associate the user in the permission information data (releaseUsers、editUsers、accessUsers) in the request parameters with the generated ID of the project table, and insert the table linkis_stream_project_privilege, the status value returned from the successful creation operation is 0, and the project table generation ID will be returned as the value of projectId;
- The modification operation will update the request information data to the table linkis_stream_project and linkis_stream_project_privilege, the status value returned successfully is 0;
- In the delete operation, the is_deleted field of the table linkis_stream_project will be marked as 1 according to the projectId. The relevant data in the table linkis_stream_project_privilege will be deleted, the status value returned successfully is 0.

# Authentication

## Authentication flow chart
![Streamis project authentication operation](../../images/zh_CN/streamis_project_privilege.png)

### edit privilege API:

|RequestMethod |API path |name |
|------|----------------------------------------------------------|-----------------|
|POST |/streamis/streamProjectManager/project/files/upload |Project resource file - Import |
|GET |/streamis/streamProjectManager/project/files/delete |Delete all versions of the file under the project |
|GET |/streamis/streamProjectManager/project/files/version/delete |Delete version file |
|GET |/streamis/streamProjectManager/project/files/download |Task details - Download |
|POST |/streamis/streamJobManager/job/upload |Upload file |
|POST |/streamis/streamJobManager/job/execute |start-up |
|GET |/streamis/streamJobManager/job/stop |stop |
|PUT |/streamis/streamJobManager/job//snapshot/{jobId:\w+} |Snapshot generation |
|GET |/streamis/streamJobManager/config/json/{jobId:\w+} |Configuration - save |
|POST |/streamis/streamJobManager/job/bulk/execution |Batch start |
|POST |/streamis/streamJobManager/job/bulk/pause |Batch stop |


### access privilege API:

|RequestMethod |API path |name |
|------|----------------------------------------------------------|-------------|
|GET |streamis/streamJobManager/job/list |Query the jobs that the current user can view |
|GET |/streamis/streamProjectManager/project/files/list |prokect resource document |
|GET |/streamis/streamProjectManager/project/files/version/list |Obtain all versions of the file under the project |
|GET |/streamis/streamJobManager/job/version |Query job version |
|GET |/streamis/streamJobManager/job/execute/history |Job execution history |
|GET |/streamis/streamJobManager/job/progress |Get the latest task status of the current version of the job |
|GET |/streamis/streamJobManager/job/jobContent |Task details |
|GET |/streamis/streamJobManager/job/logs |Get log |
|POST |/streamis/streamJobManager/config/json/{jobId:\w+} |Get task configuration |
|GET |/streamis/streamJobManager/config/view |Query the current job configuration information |
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Authentication

## Authentication flow chart
In Streamis, the module that needs authentication does not rely on the Streamis project server module. The rest interface is called to handle authentication.

![Streamis project authentication operation](../../../images/streamis_project_privilege_en.png)

## Specific implementation instructions
Get the set of all permissions according to the current user name and item id/ name. If the permission set contains RELEASE permission, you have the permission to publish / edit / view; if the permission set contains EDIT permission, you have the permission to edit / view; if the permission set contains ACCESS permission, you have the permission to view;
Permission inclusion relationship: RELEASE permission includes EDIT permission and ACCESS permission; edit permission includes ACCESS permission.

### edit privilege API:

|RequestMethod |API path |name |
|------|----------------------------------------------------------|-----------------|
|POST |/streamis/streamProjectManager/project/files/upload |Project resource file - Import |
|GET |/streamis/streamProjectManager/project/files/delete |Delete all versions of the file under the project |
|GET |/streamis/streamProjectManager/project/files/version/delete |Delete version file |
|GET |/streamis/streamProjectManager/project/files/download |Task details - Download |
|POST |streamis/streamJobManager/job/createOrUpdate |create or Update streamis-job|
|POST |/streamis/streamJobManager/job/upload |Upload file |
|POST |/streamis/streamJobManager/job/execute |start-up |
|GET |/streamis/streamJobManager/job/stop |stop |
|PUT |/streamis/streamJobManager/job//snapshot/{jobId:\w+} |Snapshot generation |
|GET |/streamis/streamJobManager/config/json/{jobId:\w+} |Configuration - save |
|POST |/streamis/streamJobManager/job/bulk/execution |Batch start |
|POST |/streamis/streamJobManager/job/bulk/pause |Batch stop |


### access privilege API:

|RequestMethod |API path |name |
|------|----------------------------------------------------------|-------------|
|GET |streamis/streamJobManager/job/list |Query the jobs that the current user can view |
|GET |/streamis/streamProjectManager/project/files/list |prokect resource document |
|GET |/streamis/streamProjectManager/project/files/version/list |Obtain all versions of the file under the project |
|GET |/streamis/streamJobManager/job/version |Query job version |
|GET |/streamis/streamJobManager/job/execute/history |Job execution history |
|GET |/streamis/streamJobManager/job/progress |Get the latest task status of the current version of the job |
|GET |/streamis/streamJobManager/job/jobContent |Task details |
|GET |/streamis/streamJobManager/job/logs |Get log |
|POST |/streamis/streamJobManager/config/json/{jobId:\w+} |Get task configuration |
|GET |/streamis/streamJobManager/config/view |Query the current job configuration information |
Binary file added docs/images/streamis_appconn_en.png
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 docs/images/streamis_project_privilege_en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 97b9e59

Please sign in to comment.