A low-code application replication method based on SaaS multi-tenant
By exporting and importing resource information of low-code applications in a low-code system and creating an independent database connection pool in a SaaS multi-tenant environment, the problem of low-code application replication in the existing technology that requires R&D personnel to participate is solved, and efficient multi-tenant low-code application deployment is achieved.
Patent Information
- Application Number
- CN202411131999.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-08-19
AI Technical Summary
When the existing low-code system replicates low-code applications in a multi-tenant environment, R&D personnel need to participate in the replication of the library table and the mapping configuration between tenants and libraries, resulting in a large amount of workload for developers and unable to support large-scale tenants to launch complex low-code applications.
A low-code application based on SaaS multi-tenants replication method is adopted, including exporting all resource information of low-code applications, importing and creating an independent database connection pool, managing tenant database connections in a dynamic data source collection, realizing tenant isolation, and avoiding repeated creation of database connections through custom routing policies.
It realizes batch replication of low-code applications to multiple tenants in the cloud computing environment, avoids the intervention of R&D personnel, reduces the data initialization of application deployment, and greatly improves the deployment efficiency of complex low-code applications.
Smart Images

Figure CN118656086B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cloud computing, and specifically relates to a low-code application replication method based on SaaS multi-tenants. Background Art
[0002] The concept of "multi-tenancy" is a software technology architecture. In cloud computing, the use of multi-tenant technology allows multiple tenants to share software and hardware resources, improve resource utilization, reduce the average infrastructure and management costs allocated to a single tenant, and at the same time achieve isolation of data, performance, and behavior between tenants.
[0003] Low-code applications include application resources and replication of application service nodes. Application resources include: database tables, low-code data models, SQL data sets, form definitions, process definitions, and data dictionaries. Application service nodes include: Docker (a virtualization technology based on the operating system level that packages software and its dependencies into containers) containers running on k8s (Kubernetes, an open source platform for managing containerized applications on multiple hosts in a cloud platform), and Springboot (a simplified new framework based on the Spring framework) projects running low-code engines in Docker.
[0004] The existing low-code system has the following two solutions in the multi-tenant system:
[0005] 1. Use database-level isolation, that is, one tenant uses one database independently;
[0006] Tenant 1 copies application A, creates an independent database 1 for tenant 1, imports the low-code resources required by application A, and maintains the mapping relationship between tenant 1 and database 1 in the configuration of the low-code service;
[0007] Tenant 2 copies application A, creates an independent database 2 for tenant 2, imports the low-code resources required by application A, and maintains the mapping relationship between tenant 2 and database 2 in the configuration of the low-code service;
[0008] When a user of tenant 1 accesses application A, the low-code backend service returns the data request using the connection of database 1;
[0009] When the user of Tenant 2 accesses Application A, the low-code backend service will return the data request using the connection of Database 2.
[0010] 2. Use tenant isolation by tenant ID field, that is, add a field for distinguishing tenants in each table to identify which tenant each piece of data belongs to. When querying, each statement adds this field as a filter condition;
[0011] Different from the library-level isolation method, Tenant 1 and Tenant 2 only import the low-code resources required by Application A respectively. The business database of Application A is created at the beginning. No matter which tenant's user accesses Application A, the low-code backend service will only query in one database and return the data of the corresponding tenant.
[0012] Regardless of which solution is adopted, under the SaaS (Software-as-a-Service) platform, the low-code backend service must be shared by all tenants.
[0013] The above existing solutions have the following defects:
[0014] For solution 1, library-level isolation, developers need to operate the database to copy the library, and the backend service needs to associate tenants with the library.
[0015] Of course, if each tenant, the low-code backend service is also deployed independently, the above solution uses automated deployment tools. Although it can avoid the intervention of R&D personnel, in a cloud computing environment, multiple tenants share the environment and the low-code backend service is shared. It is impossible for each tenant to independently deploy a low-code engine service.
[0016] That is, the defects of Solution 1 include that the replication of low-code applications between multiple tenants requires R&D personnel to participate in replicating library tables, and R&D personnel need to configure the mapping relationship between tenants and libraries.
[0017] For Solution 2, multi-tenant, low-code application A shares a business database. Although this avoids the problem of requiring R&D personnel to participate in Solution 1, it will have the following problems:
[0018] 1. Importing new tenant initialization data into business table A may cause primary key conflicts with existing tenant data;
[0019] 2. The primary key is randomly generated, which causes the data in the associated table of application A to be out of sync, and the associated fields of other tables cannot be known;
[0020] 3. The primary key is randomly generated. There may be some forms where the initialization data id is hard-coded, resulting in form logic anomalies;
[0021] 4. When the amount of data increases in the later stage, it is still necessary to adopt the database and table sharding technology.
[0022] Whether it is Option 1 or Option 2, launching low-code applications on new tenants will cause a huge workload for developers, and it is impossible to support a large number of tenants to launch complex low-code applications on the SaaS platform at the same time. Summary of the invention
[0023] In order to solve the shortcomings of the existing technology, avoid the intervention of R&D personnel, and improve the efficiency of complex low-code application deployment, the present invention adopts the following technical solutions:
[0024] A low-code application replication method based on SaaS multi-tenants includes the following steps:
[0025] Step S1: Export the low-code application, which contains all resource information configured by the application;
[0026] Step S2: The tenant imports the low-code application;
[0027] Step S3: Create a tenant database and database connection pool; determine whether there is connection information of the current tenant's database connection pool DataSource_{tenantId} in the tenant low-code library s_datasource table. If so, establish a database connection based on the connection information of the database connection pool DataSource_{tenantId}; otherwise, execute CREATEDATABASE lowcode_{tenantId} to create an independent business library for the tenant. The library name is lowcode concatenated with the current tenant id, and the business library connection information is stored in the low-code library (main library). Based on the business library connection information, the tenant's database connection pool DataSource_{tenantId} is instantiated and added to the dynamic data source set DynamicDataSource. Establish a database connection based on the connection information of the database connection pool DataSource_{tenantId};
[0028] Step S4: The low-code application is executed in the tenant's independent business library and is isolated based on the tenant.
[0029] Furthermore, in step S3, the dynamic data source set uses expiringMap to set an expiration time. For the database connection pool DataSource_{tenantId} of the expired and unused tenant, the connection pool is closed to release the tenant's database connection, and the database connection pool DataSource_{tenantId} is removed from the dynamic data source set. The use of the data source for each tenant's independent business library is somewhat different from other low-code platforms. Considering the effective use of resources, the present invention uses expiringMap to close the database connection pool that has not been used for more than 30 minutes to reduce the pressure on the service and database, and prevent some long-term unused tenants from occupying the database connection and causing waste of server resources.
[0030] Furthermore, in step S1, the encrypted exported resource information includes object information related to each module of the low-code application; in step S2, the tenant decrypts and imports object information related to each module of the low-code application; in step S4, objects related to each module of the low-code application are executed in the tenant's independent business library, and the object information is stored in the tenant's low-code library and isolated based on the tenant.
[0031] Furthermore, the object information related to each module includes dto objects related to the data model module. The exported data model object will be bound to the database connection pool datasouce of the template tenant and erased. The data model dto object imported by the tenant and the sql data set dto object are bound to the tenant data source id of the database connection pool DataSource_{tenantId} and stored in the low-code library; wherein, the imported data model dto object determines whether the database connection pool dataSource_1 has been instantiated in the dynamic data source set DynamicDataSource, because dataSource_1 does not exist if it exceeds 30 minutes or is obtained for the first time. If the database connection pool dataSource_1 does not exist, the connection information of the database connection pool dataSouce_1 of the s_datasource table of the tenant low-code library is loaded, instantiated and added to the dynamic data source set DynamicDataSource; otherwise, the tenant's database connection pool datasource_1 is obtained from the dynamic data source set DynamicDataSource, the data model dto object reversely generates DDL (Data Definition Language) statements, and uses the database connection of the database connection pool datasource_1 to execute, the data model dto object is stored in the low-code library, and isolated using the tenant identification id.
[0032] Furthermore, the object information related to each module also includes the dto object of the sql dataset module. The exported sql dataset dto object will be bound to the database connection pool datasouce of the template tenant and erased. The sql dataset dto object imported by the tenant will be bound to the tenant data source id of the database connection pool DataSource_{tenantId} and stored in the low-code library.
[0033] Furthermore, the exported module-related object information also includes the dto object of the form definition module, the dto object of the process definition module, the dto object of the dictionary module, the dto object of the global variable module, the dto object of the groovy script module, and the dto object of the api data set module; when the tenant is imported, the object is inserted into or overwritten the tenant's low-code library and isolated based on the tenant identity.
[0034] Furthermore, an interceptor is constructed to intercept the data model module and / or sql data set module, and switch the database connection of the corresponding tenant according to the current tenant information. When the interceptor intercepts all modules of the low-code application and switches the database connection of the corresponding tenant according to the current tenant information, library-level isolation of application resources can be achieved.
[0035] Furthermore, the low-code service is deployed in a cluster. To avoid repeated creation of dataSouce_1 by multiple low-code services during cluster deployment, the present invention sets the relevant interface prefixes of the data model and sql data set module / dataModule / ** and / sqlData / **, where / ** represents the content omitted after the interface prefix. A custom routing strategy is set at the gateway to obtain the tenant identification ID from the current login session, perform hash routing, and route the tenant's low-code data request to the corresponding low-code server 1, thereby avoiding repeated creation of dataSource_1 by low-code server 2, low-code server 3, etc., and other requests are subjected to normal load balancing.
[0036] Furthermore, in the step S1, the initialization SQL script corresponding to the low-code application is also exported; based on the application identifier app_id field, the resource information library table involved in the low-code library of the low-code application to be exported is selected as the initialization data table for export, and the initialization SQL script of the low-code application is constructed based on the initialization data table; in the step S2, the initialization SQL script corresponding to the low-code application is also imported.
[0037] Furthermore, the resource information library table is selected from all database tables involved in the data model under the low-code application. During the export process, the resource information library table is looped for paging, and an initialization SQL script is constructed based on the column information of the data model.
[0038] The advantages and beneficial effects of the present invention are:
[0039] A low-code application of the present invention is based on a replication method between SaaS multi-tenants. In a cloud computing environment, it can enable low-code applications to be batch-copied to multiple tenants at the same time, avoiding the intervention of R&D personnel, reducing the data initialization work of application deployment, and greatly improving the deployment efficiency of complex low-code applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flow chart of a method in an embodiment of the present invention.
[0041] Figure 2 It is a schematic diagram of the overall service cluster deployment structure in an embodiment of the present invention.
[0042] Figure 3 It is a schematic diagram of the low-code service cluster deployment structure in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0044] A low-code application includes modules such as application information, data model, form definition, process definition, dictionary, global variables, groovy script, api interface information, etc. The app_id in the application information runs through all modules. Correspondingly, the data model database table, form definition database table, process definition database table, dictionary table, global variable table, groovy script table, sql data set table, and api interface information table all have an app_id field added to identify the application to which the low-code resource belongs. The corresponding database is divided into a low-code library and a business library. The low-code library is a library table used to store low-code application resource information, and the business library is a library table used to store data generated by low-code applications (most complex systems require certain initialization data before they can go online).
[0045] like Figure 1 As shown in the figure, a replication method between low-code applications based on SaaS multi-tenants is shown. In the SaaS environment, the configuration information storage database (i.e., the main database) of the low-code application is shared by all tenants, and the resource information of the application is stored. Through the field isolation of the tenants, the main database contains: data model related tables, form definition related tables, process definition related tables, SQL and API data set related tables, dictionary tables, global variables, etc. The specific replication method includes the following steps:
[0046] Step S1: Export the low-code application and its corresponding initialization SQL script, including the object information of each module of the low-code application. Through the back-end API interface, export the application A resources to generate a .zip compressed package, which contains all the resources of the current application A configuration information and the initialization SQL script of the application. Upload the compressed package to the file server, which specifically includes the following steps:
[0047] Step S1.1: Based on the application identifier app_id field, select the resource information library table involved in the low-code library as the initialization data table for export;
[0048] In an embodiment of the present invention, the low-code application to be exported is selected on the template tenant low-code application page. A pop-up window will prompt the user to select table as the import table for the data that needs to be initialized (select from all database tables involved in the data model under the currently selected application app_id), and call the back-end export interface parameters to pass in app_id and the selected table.
[0049] Step S1.2: Obtain relevant object information of each module of the low-code application and encrypt and export it;
[0050] In the embodiment of the present invention, the busObjectService (data model business layer) list(appId) method is called through exportResource to obtain the data model related dto object, which is encrypted with base64 and stored in a compressed package (the data model dto object contains information about all database tables of the business, as well as association information between tables);
[0051] Continue to call the formService (form business layer) list(appId) method through exportResource to obtain the dto object related to the form definition, encrypt it with base64 and save it in a compressed package (the form definition dto object contains all the information required by the form parser to generate the corresponding page, as well as the binding relationship between the form component and the data model);
[0052] Continue to call the list(appId) method of workflowService (process business layer) through exportResource to obtain the dto object related to the process definition and the bpmn2.0.xml process definition of activiti, encrypt them with base64 and store them in a compressed package (the process definition dto object is a custom process engine framework, which expands the process definition information outside the activiti process engine framework, and bpmn2.0.xml is the native process definition information of the activiti open source process engine);
[0053] Continue to call the list(appId) method of dictService (dictionary business layer) through exportResource to obtain the dto object of the dictionary table, encrypt it with base64 and store it in a compressed package;
[0054] Continue to call the list(appId) method of globeVarService (global variable business layer) through exportResource to obtain the dto object of the dictionary table, perform base64 encryption and store it in a compressed package;
[0055] Continue to call the list(appId) method of groovyInfoScriptService (script business layer) through exportResource to obtain the dto object of the groovy script information, encrypt it with base64 and store it in a compressed package;
[0056] Continue to call the list(appId) method of sqlInfoService (sql business layer) through exportResource to obtain the dto object of the sql data set information, encrypt it with base64 and store it in a compressed package;
[0057] Continue to call the list(appId) method of apiInfoService (api business layer) through exportResource to obtain the dto object of the api data set information, encrypt it with base64 and store it in a compressed package;
[0058] Step S1.3: Build the initialization SQL script of the low-code application based on the initialization data table;
[0059] In the embodiment of the present invention, sqlTemplateService is continuously called through exportResource, the data model and the table in step 1 are passed in, the table is looped, the data in all tables are queried by paging 500 items (to prevent memory overflow of large tables), and the initialization sql script of insert into table (column1....)values ( ....) is assembled according to the column information described in the data model, and stored in a compressed package;
[0060] Step S2: The tenant imports the low-code application and its corresponding initialization SQL script; which includes decrypting and importing the relevant object information of each module of the low-code application;
[0061] In the embodiment of the present invention, when the implementation personnel copies application A to the new tenant through the background management system, the backend code pulls the compressed package from the file service and decompresses it. Specifically, the zip compressed package of the selected low-code application is downloaded through the browser, and the enterprise administrator account of tenant 1 (or multiple enterprise accounts, directly switch to tenant 1) is logged in. When a new low-code application is created, the existing compressed package is selected for import. The compressed package is passed to the background import interface to enter resourceImportService.importResource to extract the resources in the compressed package, and the base64 is reversed to obtain the dto objects of each resource. Each dto object performs the corresponding import method respectively;
[0062] Step S3: Create a tenant database and database connection pool; determine whether there is connection information of the current tenant's database connection pool DataSource_{tenantId} in the tenant low-code library s_datasource table. If so, establish a database connection based on the connection information of the database connection pool DataSource_{tenantId}; otherwise, execute CREATEDATABASE lowcode_{tenantId} to create an independent business library for the tenant. The library name is lowcode concatenated with the current tenant id, and the business library connection information is stored in the low-code library (main library). Based on the business library connection information, the tenant's database connection pool DataSource_{tenantId} is instantiated and added to the DynamicDataSource dynamic data source collection. Establish a database connection based on the connection information of the database connection pool DataSource_{tenantId};
[0063] The dynamic data source set uses expiringMap to set an expiration time. For the database connection pool DataSource_{tenantId} of the expired and unused tenant, the connection pool is closed to release the tenant's database connection, and the database connection pool DataSource_{tenantId} is removed from the dynamic data source set. The use of the data source for each tenant's independent business library is somewhat different from other low-code platforms. Considering the effective use of resources, the present invention uses expiringMap to close the database connection pool that has not been used for more than 30 minutes to reduce the pressure on the service and database, and prevent some long-term unused tenants from occupying the database connection and causing waste of server resources;
[0064] In an embodiment of the present invention, a database of tenant 1 is created, and a database connection pool is created. It is determined whether the connection information of dataSource_1 exists in the s_datasource table of the low-code library. If not, sql CREATEDATABASE lowcode_1 is executed to create tenant 1's business library lowcode_1 in the database. If it is tenant 2, all _1s in the current step will become _2. According to the database connection information of tenant 1, the dataSouce_1 database connection pool is instantiated and added to the DynamicDataSource dynamic data source collection. The dynamic data source collection uses expiringMap, sets the expiration time to 30 minutes, and customizes the monitoring of expiration events. When the tenant dataSource_1 is not used for more than 30 minutes, the datasouce_1.close method is called to close the connection in the connection pool, release the database connection of tenant 1, and remove dataSource_1 from the dynamic data source. When tenant 1 uses a low-code application, it will first determine whether dataSource_1 exists in the DynamicDataSource. If not, a dataSource_1 connection pool is created and then used.
[0065] Step S4: The related objects of each module of the low-code application are executed in the tenant's independent business library, and the object information is stored in the tenant's low-code library and isolated based on the tenant.
[0066] The DDL statements generated by the data model are executed in the independent lowcode_1 business database, and the initialization SQL script of the application enters the independent tenant database lowcode_1;
[0067] The data model information dto is stored in the low-code library and isolated using the id of tenant 1; the busObjectService.importResource method is called to pass in the data model dto object to determine whether DynamicDataSource has instantiated the dataSource_1 connection pool, because dataSource_1 does not exist if it has been more than 30 minutes or is obtained for the first time. If it does not exist, load the s_datasource table dataSouce_1 connection information, instantiate and add it to DynamicDataSource; obtain tenant 1's connection datasource_1 from DynamicDataSource, reverse generate DDL statements from the data model dto, use the database connection of datasource_1 to execute DDL, and store the data model dto in the low-code library and isolate it using the tenant id.
[0068] Call the formService.importResource method to pass in the dto object related to the form definition. The form definition dto object is inserted into / overwrites the low-code library form definition related table and isolated using the id of tenant 1 (the overwriting scenario is a secondary import).
[0069] Call the workflowService.importResource method to pass in the dto object related to the process definition. The process definition dto object is inserted into / overwrites the low-code library process definition related table and is isolated using the id of tenant 1 (there is a problem of secondary import in the case of overwriting, and the process version number is automatically increased by +1 to prevent affecting the old process in use);
[0070] Call the dictService.importResource method to pass in the dictionary's dto object. The dictionary dto object is inserted into / overwrites the low-code library dictionary-related table and isolated using the id of tenant 1 (the overwriting scenario is a secondary import).
[0071] Call the globeVarService.importResource method to pass in the dto object of the global variable. The global variable dto object is inserted into / overwrites the low-code library global variable table and isolated using the id of tenant 1; (the overwriting scenario is a secondary import);
[0072] Call the groovyInfoScriptService.importResource method to pass in the script information dto object. The script information dto object is inserted into / overwrites the low-code library groovy script table and isolated using the id of tenant 1 (the overwriting scenario is during secondary import).
[0073] Call the sqlInfoService.importResource method to pass in the dto object of the sql dataset information. The sql dataset dto object is inserted into / overwrites the low-code library sql-related table and isolated using the id of tenant 1 (the overwriting scenario is during secondary import).
[0074] Call the apiInfoService.importResource method to pass in the dto object of the api data set information. The api data set dto object is inserted into / overwrites the low-code library api-related table and isolated using the id of tenant 1 (the overwriting scenario is during secondary import).
[0075] The low-code application of tenant 1 is imported. Tenant 1 can modify the application at will without affecting the use of other tenants. Similarly, the customized application of tenant 1 can be exported and imported into other new tenants.
[0076] The data model and sql dataset dto object exported in step S1.2 will be bound to the database connection pool datasouce of the template tenant and erased. In step S4, the data model and sql dataset dto object will be bound to the data source id of the database connection pool DataSource_{tenantId} and stored in the low-code library (main library).
[0077] The customized mybatis sql interceptor only intercepts data models and sql data set related modules, and switches to the database connection of the corresponding tenant according to the tenant id in the current login information context in the interceptor; the resource form definition, process definition, etc. in the compressed package do not switch the database connection through the sql interceptor, but are normally saved to the main library and isolated using the tenant id; the saving and loading of form definition, process definition and other resources are still processed using the database connection of the main library; the present invention also supports library-level isolation of application resources, and only requires the scope of the sql interceptor to be expanded to all modules.
[0078] In the embodiment of the present invention, the docker + k8s deployment method is adopted, and each service is deployed as follows Figure 2 As shown in the figure, tenant 1, tenant 2, and tenant 3 are connected to the authentication server, user server, business server, and low-code server through the gateway respectively. The backend low-code service is deployed in a cluster, such as Figure 3 As shown, in order to avoid multiple low-code services repeatedly creating dataSouce_1 when the cluster is deployed, the present invention prefixes the data model and sql data set related interfaces / dataModule / ** and / sqlData / **, / ** represents the content omitted after the interface prefix, and customizes the routing strategy (such as hash routing strategy) in the gateway to obtain the tenant id from the current login session and perform hash routing, so that the low-code data request of tenant 1 will only be routed to low-code server 1, thereby avoiding low-code server 2, low-code server 3,..., repeatedly creating dataSource_1, and other requests are subjected to normal load balancing.
[0079] For example: 5 tenants 1, 2, 3, 4, 5 request low-code resources, render forms, request dictionaries, load applications, and other interfaces for load balancing, which are shared by low-code server 1, low-code server 2, and low-code server 3.
[0080] When requesting / dataModule / ** and / sqlData / ** related interfaces, tenants 1 and 4 will only be routed to low-code server 1, tenants 2 and 5 will be routed to low-code server 2, and tenant 3 will be routed to low-code server 3.
[0081] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A low-code application replication method based on SaaS multi-tenant, characterized in that The steps include: Step S1: Export the low-code application, which includes resource information configured by the application; the exported resource information includes object information related to each module of the low-code application; Step S2: The tenant imports the low-code application; The tenant imports the relevant object information of each module of the low-code application; Step S3: Create a tenant database and database connection pool; determine whether the connection information of the current tenant's database connection pool exists in the tenant's low-code library. If so, establish a database connection based on the connection information of the database connection pool; otherwise, create an independent business library for the tenant, instantiate the tenant's database connection pool based on the business library connection information, and add it to the dynamic data source collection, and establish a database connection based on the connection information of the database connection pool; the dynamic data source collection has an expiration time. For the database connection pool of the tenant that has expired and is not used, close the connection pool to release the tenant's database connection, and remove the database connection pool from the dynamic data source collection; The object information related to each module includes the data model module object. The data model object imported by the tenant is bound to the database connection pool tenant with the sql data set object and stored in the low-code library; among them, the imported data model object determines whether the database connection pool has been instantiated in the dynamic data source set. If the database connection pool does not exist, the connection information of the database connection pool of the tenant's low-code library is loaded, instantiated and added to the dynamic data source set; otherwise, the tenant's database connection pool is obtained from the dynamic data source set, the data model object reversely generates DDL statements, and uses the database connection of the database connection pool to execute, the data model object is stored in the low-code library, and isolated using the tenant identifier; Step S4: The low-code application is executed in the tenant's independent business library and isolated based on the tenant; the related objects of each module of the low-code application are executed in the tenant's independent business library, and the object information is stored in the tenant's low-code library and isolated based on the tenant.
2. According to claim 1, a low-code application replication method based on SaaS multi-tenants is characterized by: The object information related to each module also includes the sql dataset module object. The sql dataset object imported by the tenant is bound to the database connection pool tenant and stored in the low-code library.
3. According to claim 1, a low-code application replication method based on SaaS multi-tenants is characterized by: The module-related object information also includes form definition module objects, process definition module objects, dictionary module objects, global variable module objects, script module objects, and interface data set module objects; when the tenant is imported, the objects are inserted into or overwritten the tenant low-code library and isolated based on the tenant identity.
4. According to claim 1, a low-code application replication method based on SaaS multi-tenants is characterized in that: Build an interceptor to intercept the modules that export low-code applications, and switch the database connection of the corresponding tenant based on the current tenant information.
5. According to claim 1, a low-code application replication method based on SaaS multi-tenants is characterized in that: The low-code service is deployed in a cluster. For the relevant interfaces of the modules of the low-code application, the routing policy is set at the gateway, the tenant ID is obtained from the session, hash routing is performed, and the tenant's low-code data request is routed to the corresponding low-code service.
6. According to claim 1, a low-code application replication method based on SaaS multi-tenants is characterized by: In the step S1, an initialization query script corresponding to the low-code application is also exported; Based on the application identifier, select the resource information library table involved in the low-code library of the low-code application to be exported as the initialization data table, and build the initialization query script of the low-code application based on the initialization data table; In step S2, the initialization query script corresponding to the low-code application is also imported.
7. According to claim 6, a low-code application replication method based on SaaS multi-tenants is characterized by: The resource information library table is selected from all database tables involved in the data model under the low-code application. During the export process, the resource information library table is looped for paging, and an initialization query script is constructed based on the column information of the data model.
Citation Information
Patent Citations
Multi-tenant data isolation method and system for traditional application
CN116257506A