|
| 1 | +Orchestrator Architecture Design |
| 2 | +------------------------- |
| 3 | +Orchestrator:The orchestration module provides interface services such as adding, deleting, modifying, querying, importing and exporting orchestrated under the project, and serves as a unified input for each orchestration implementation (such as workflow). Connect to the project service upward, and connect to the specific orchestration implementation (such as workflow service) downward. |
| 4 | + |
| 5 | +### 1 business architecture |
| 6 | +User use function point: |
| 7 | + |
| 8 | + |
| 9 | +|Component name | First-level module | Second-level module | Function point | |
| 10 | +|---------------------|------------------|-----------------|-----------------| |
| 11 | +| DataSphereStudio | Orchestration Mode | New Orchestration Mode | Create a New Orchestration | |
| 12 | +| | | Edit Arrangement Mode | Edit Arranged Field Information | |
| 13 | +| | | Delete Arrangement Mode | Delete Arrangement | |
| 14 | +| | | Open Arrangement Mode | Open Arrangement to perform drag-and-drop development of choreography nodes | |
| 15 | +| | | View the list of orchestration versions | View the historical versions of the orchestration mode, you can open and view a version, or roll back a version | |
| 16 | +| | | Orchestration mode rollback | Roll back to a historical version of the orchestration (a version will be added after the orchestration is released) | |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +### 一、Orchestrator Architecture: |
| 21 | + |
| 22 | + |
| 23 | +### 二、Orchestrator module design: |
| 24 | +Second-level module core class introduction: |
| 25 | + |
| 26 | +**dss-orchestrator-core** |
| 27 | + |
| 28 | +The core module of Orchestrator defines top-level interfaces such as DSSOrchestrator, DSSOrchestratorContext, and DSSOrchestratorPlugin. |
| 29 | + |
| 30 | +| Core top-level interface/class | Core functionality | |
| 31 | +|---------------------------|------------------------------| |
| 32 | +| DSSOrchestrator | Defines the method of obtaining the properties of the orchestration, such as obtaining the editorial ranking, associated appconn, context information, etc. | |
| 33 | +| DSSOrchestratorContext | Defines the context information of the orchestrator, and provides methods such as obtaining the orchestration plug-in class | |
| 34 | +| DSSOrchestratorPlugin | The top-level interface for orchestrating plugins, defines the init method, and the subclass contains the imported and exported plugin implementation classes | |
| 35 | +| DSSOrchestratorRelation |Defines the method of obtaining the associated properties of the orchestration, such as obtaining the orchestration mode, and obtaining the appconn associated with the orchestration | |
| 36 | + |
| 37 | +**dss-orchestrator-db** |
| 38 | + |
| 39 | +Defines the unified entry of the dao layer method of orchestration. |
| 40 | + |
| 41 | +**dss-orchestrator-conversion-standard** |
| 42 | + |
| 43 | +Defines the interface specification for orchestration and conversion to third-party systems, including top-level interfaces such as ConversionOperation, ConversionRequestRef, and ConversionService. |
| 44 | +The core module of Orchestrator defines top-level interfaces such as DSSOrchestrator, DSSOrchestratorContext, and DSSOrchestratorPlugin. |
| 45 | + |
| 46 | +| Core Interface/Class | Core Function | |
| 47 | +|--------------------- |------------------------------------------| |
| 48 | +| ConversionOperation | Defines the conversion core convert method, the input parameter is ConversionRequestRef, and returns ResponseRef | |
| 49 | +| DSSToRelConversionRequestRef | Defines the basic parameters of the conversion request, such as userName, workspace, dssProject and other information | |
| 50 | +| ConversionIntegrationStandard | The following core methods are defined: getDSSToRelConversionService (used to support the orchestration of DSS and convert it to the workflow of the scheduling system) | |
| 51 | +| ConversionService | Defines methods for getting labels and getting ConversionIntegrationStandard | |
| 52 | + |
| 53 | + |
| 54 | +**dss-orchestrator-loader** |
| 55 | + |
| 56 | +Used to load orchestration-related appconn, such as workflow-appconn, and load subclasses of DSSOrchestratorPlugin, such as ExportDSSOrchestratorPlugin. |
| 57 | + |
| 58 | +| Core Interface/Class | Core Function | |
| 59 | +|--------------------- |---------------------------------------------| |
| 60 | +| OrchestratorManager | The getOrCreateOrchestrator method is defined to load the appconn associated with the orchestrator, which will be cached after the first load to avoid repeated loading | |
| 61 | +| LinkedAppConnResolver | Defines the interface for obtaining appconn according to the user | |
| 62 | +| SpringDSSOrchestratorContext | The initialization method of the class will load all subclasses of DSSOrchestratorPlugin and cache them in memory | |
| 63 | + |
| 64 | +**dss-framework-orchestrator-server** |
| 65 | + |
| 66 | +The Orchestrator framework service provides interfaces such as adding, deleting, modifying, checking, and rolling back the orchestration front-end, as well as rpc services such as orchestration import and export. |
| 67 | + |
| 68 | +**dss-framework-orchestraotr-publish** |
| 69 | + |
| 70 | +Provides publishing-related plug-ins, such as arranging import and export implementation classes, arranging compressed package generation, and parsing implementation classes. |
| 71 | + |
| 72 | +| Core Interface/Class | Core Function | |
| 73 | +|--------------------- |---------------------------------------------| |
| 74 | +| ExportDSSOrchestratorPlugin | Defines the orchestration export interface | |
| 75 | +| ImportDSSOrchestratorPlugin | The orchestration import interface is defined | |
| 76 | +| MetaWriter | Provides the function of outputting the arranged table field information to the metadata file in a specific format| |
| 77 | +| MetaReader | Provides the function of parsing the arranged metadata file to generate table field content| |
| 78 | + |
| 79 | +#### Create an orchestration sequence diagram (delete and edit operations are similar): |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +#### Import and arrange sequence diagrams (export operations are similar): |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | +### Data Structure/Storage Design |
| 88 | +orchestrator information sheet: |
| 89 | +```roomsql |
| 90 | +CREATE TABLE `dss_orchestrator_info` ( |
| 91 | +`id` bigint(20) NOT NULL AUTO_INCREMENT, |
| 92 | +`name` varchar(255) NOT NULL COMMENT 'orchestrator name', |
| 93 | +`type` varchar(255) NOT NULL COMMENT 'orchestrator type,E.g:workflow', |
| 94 | +`desc` varchar(1024) DEFAULT NULL COMMENT 'description', |
| 95 | +`creator` varchar(100) NOT NULL COMMENT 'creator', |
| 96 | +`create_time` datetime DEFAULT NULL COMMENT 'create time', |
| 97 | +`project_id` bigint(20) DEFAULT NULL COMMENT 'project id', |
| 98 | +`uses` varchar(500) DEFAULT NULL COMMNET 'uses', |
| 99 | +`appconn_name` varchar(1024) NOT NULL COMMENT 'Orchestrate the associated appconn,E.g:workflow', |
| 100 | +`uuid` varchar(180) NOT NULL COMMENT 'uuid', |
| 101 | +`secondary_type` varchar(500) DEFAULT NULL COMMENT 'Orchestrate of the second type,E.g:workflow-DAG', |
| 102 | +`is_published` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Is it published', |
| 103 | +`workspace_id` int(11) DEFAULT NULL COMMENT 'workspace id', |
| 104 | +`orchestrator_mode` varchar(100) DEFAULT NULL COMMENT 'orchestrator mode,The value obtained is dic_key(parent_key=p_arrangement_mode) in dss_dictionary', |
| 105 | +`orchestrator_way` varchar(256) DEFAULT NULL COMMENT 'orchestrator way', |
| 106 | +`orchestrator_level` varchar(32) DEFAULT NULL COMMENT 'orchestrator level', |
| 107 | +`update_user` varchar(100) DEFAULT NULL COMMENT 'update user', |
| 108 | +`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update time', |
| 109 | +PRIMARY KEY (`id`) USING BTREE, |
| 110 | +UNIQUE KEY `unique_idx_uuid` (`uuid`) |
| 111 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; |
| 112 | +``` |
| 113 | + |
| 114 | +orchestrator version information table: |
| 115 | +```roomsql |
| 116 | +CREATE TABLE `dss_orchestrator_version_info` ( |
| 117 | + `id` bigint(20) NOT NULL AUTO_INCREMENT, |
| 118 | + `orchestrator_id` bigint(20) NOT NULL COMMENT 'associated orchestration id', |
| 119 | + `app_id` bigint(20) DEFAULT NULL COMMENT 'The id of the orchestration implementation, such as flowId', |
| 120 | + `source` varchar(255) DEFAULT NULL COMMENT 'source', |
| 121 | + `version` varchar(255) DEFAULT NULL COMMENT 'verison', |
| 122 | + `comment` varchar(255) DEFAULT NULL COMMENT 'description', |
| 123 | + `update_time` datetime DEFAULT NULL COMMENT 'update time', |
| 124 | + `updater` varchar(32) DEFAULT NULL COMMENT 'updater', |
| 125 | + `project_id` bigint(20) DEFAULT NULL COMMENT 'project id', |
| 126 | + `content` varchar(255) DEFAULT NULL COMMENT '', |
| 127 | + `context_id` varchar(200) DEFAULT NULL COMMENT 'context id', |
| 128 | + `valid_flag` INT(1) DEFAULT '1' COMMENT 'Version valid flag, 0: invalid; 1: valid', |
| 129 | + PRIMARY KEY (`id`) USING BTREE |
| 130 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; |
| 131 | +``` |
| 132 | + |
| 133 | +And the scheduling system orchestration association table: |
| 134 | +```roomsql |
| 135 | +CREATE TABLE `dss_orchestrator_ref_orchestration_relation` ( |
| 136 | + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'primary key ID', |
| 137 | + `orchestrator_id` bigint(20) NOT NULL COMMENT 'The orchestration mode id of dss', |
| 138 | + `ref_project_id` bigint(20) DEFAULT NULL COMMENT 'The project ID associated with the scheduling system', |
| 139 | + `ref_orchestration_id` int(11) DEFAULT NULL COMMENT 'The id of the scheduling system workflow (the orchestrationId returned by calling the OrchestrationOperation service of SchedulerAppConn)', |
| 140 | + PRIMARY KEY (`id`) |
| 141 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT; |
| 142 | +``` |
| 143 | + |
| 144 | +### 5.interface design |
| 145 | + |
| 146 | + |
| 147 | +### 6.non-functional design |
| 148 | +#### 6.1 Safety |
| 149 | +Using the special ID in the cookie, GateWay needs to use a special decryption algorithm to identify it. |
| 150 | +#### 6.2 Performance |
| 151 | +can meet performance requirements. |
| 152 | +#### 6.3 Capacity |
| 153 | +not involving |
| 154 | +#### 6.4 High Availability |
| 155 | +Deployable Multi-Active |
| 156 | + |
0 commit comments