Hot update design method for integrating external api on ipaas platform
Patent Information
- Application Number
- CN202410689240.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
[0004]1、发布过程中需要中断服务,影响用户的正常使用
[0020] First, use a custom class loader instead of restarting the container to load the newly compiled expansion package, limit the scope of replacement to the fixed package path and specified function methods, and use a new loader to replace the previous one each time it is refreshed. With the implementation of a custom loader, the garbage collector automatically recycles the old class loader, thus lifting the restrictions on the class loader cache and avoiding the inability to load new implementation class objects, thereby enabling the release and integration of external APIs without stopping the service. Update plan.
Smart Images

Figure FT_1
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hot update technology, and in particular to a hot update design method for integrating an external API into an IPaaS platform. Background Art
[0002] IPaaS refers to Integration Platform as a Service, which Gartner defines as "a set of cloud services that facilitate the development, execution and governance of integration flows connected to any local and cloud-based processes, services, applications and data, whether in independent or cross-organizational contexts."
[0003] The current IPaaS platform integrates external APIs by adding code, building deployment packages, stopping services, replacing deployment packages, and releasing new services to add external connectors. This implementation method has many defects:
[0004] 1. The service needs to be interrupted during the release process, affecting the normal use of users
[0005] 2. When customers raise new access requirements, new connectors cannot be quickly launched
[0006] 3. If the API of the dependent party changes, it cannot be updated in time and the response is slow
[0007] 4. The development cost is high, the code duplication rate is high, and a connector needs to write more repeated logic. Summary of the invention
[0008] The purpose of the present invention is to provide an IPaaS platform integrated external API hot update design method to solve the problems raised in the above background technology.
[0009] In order to solve the above technical problems, the present invention provides the following technical solutions: a design method for hot update of external API integrated with ipaas platform, characterized by comprising: abstracting all external API calls of ipaas platform into a unified function, adopting template method mode, decomposing the whole calling process into multiple fixed steps, and dividing the implementation of ipaas platform into two parts: basic capability and extended capability. The basic capability provides a core fixed process, and the extended capability is similar to a plug-in, providing specific implementation of different API calls. The extended capability link includes but is not limited to the following steps:
[0010] S1: Add API URL, authentication credentials, parameter mapping rule configuration, and input and output parameter processing logic to complete the development of a connector;
[0011] S2: The custom class loader is entered from the ipaas platform. The custom class loader loads the extension package from the specified location and limits the scope of replacement to the fixed package path and the specified function method.
[0012] S3: When updating, use a new custom class loader to load the API call object and replace the previous custom class loader to complete the hot update;
[0013] S4: The garbage collector automatically recycles old class loaders, removing restrictions on class loader cache;
[0014] Preferably, the basic capabilities include functions such as interface authorization login, saving user authentication credentials, refreshing authentication credentials, etc., and the above functions all use public methods.
[0015] Preferably, the ipaas platform and other callers add external dependency packages, and the specific implementation of the api call process is provided by the external dependency packages.
[0016] Preferably, the ipaas platform uses a template method mode to standardize the calling method, uniformly stipulates the way of obtaining configuration items, and guides the loading of different connectors through configuration files.
[0017] Preferably, after replacing the extension package, the ipaas platform will call a specified refresh interface to implement the deployment of the extension capability.
[0018] Preferably, in step S2, when the external dependency API changes, the custom class loader specifies the implementation method to achieve the purpose of synchronous update.
[0019] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0020] First, use a custom class loader to load the newly compiled extension package instead of restarting the container, limit the scope of replacement to the fixed package path and specified functional methods, and use the new loader to replace the implementation of the previous custom loader each time the refresh is performed. The garbage collector automatically recycles the old class loader, thereby removing the restrictions on the class loader cache and avoiding the inability to load new implementation class objects, thereby realizing the release and update solution of the integrated external API without stopping the service.
[0021] Second, a unified method is used for the preservation and refresh of authorized login and authentication credentials. General logic is combined with personalized configuration to adapt to different needs. The templated coding mode only needs to fill in the differentiated method implementation and configuration to complete the connector development, thus achieving low-cost and rapid integration of external APIs. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Example 1
[0025] See also Figure 1 , a design method for hot update of external API integrated into an ipaas platform, including: abstracting all external API calls of the ipaas platform into a unified function, using a template method mode, decomposing the entire call process into multiple fixed steps, and dividing the implementation of the ipaas platform into two parts: basic capabilities and extended capabilities. The basic capabilities provide a core fixed process, and the extended capabilities are similar to plug-ins, providing specific implementations of different API calls. The extended capabilities link includes but is not limited to the following steps: adding API URLs, authentication credentials, parameter mapping rule configurations, and adding input and output parameter processing logic to complete the development of a connector; the ipaas platform enters a custom class loader, and the custom class loader loads the extension package from a specified location, limiting the scope of replacement to a fixed package path and a specified function method; when updating, a new custom class loader is used to load the API call object and replace the previous custom class loader to complete the hot update; the garbage collector automatically recycles the old class loader to remove the restrictions on the class loader cache; the basic capabilities include functions such as interface authorization login, saving user authentication credentials, and refreshing authentication credentials, and the above functions all use public methods.
[0026] Specifically, the extension class loader is responsible for loading the extension class library of the Java virtual machine. These class libraries are generally located in the JAVA_HOME / jre / lib / ext directory. Public methods are methods that can be used by Python's advanced data type variables (list / tuple / dictionary / string), etc. Authorization login and saving and refreshing of authentication credentials use a unified method. General logic is combined with personalized configuration to achieve adaptation to different needs. The templated coding mode only needs to fill in the differentiated method implementation and configuration to complete the connector development.
[0027] Example 2
[0028] See also Figure 1The ipaas platform and other callers add external dependency packages, and the specific implementation of the api calling process is provided by the external dependency package. The ipaas platform uses the template method mode to standardize the calling method, uniformly stipulates the way to obtain configuration items, and guides the loading of different connectors through configuration files. After the ipaas platform replaces the extension package, it will call the specified refresh interface to implement the deployment of the extension capability. When the external dependency api changes, the custom class loader specifies the method implementation to achieve the purpose of synchronous update.
[0029] Specifically, a custom class loader is used to load the newly compiled extension package instead of restarting the container, and the scope of replacement is limited to the fixed package path and specified functional methods. Each refresh uses a new loader to replace the old implementation, and the garbage collector automatically recycles the old class loader, thereby removing the restrictions on the class loader cache and avoiding the inability to load new implementation class objects. There will be no instantaneous service unavailability during the update process, and the release and update solution of the integrated external API can be implemented without stopping the service.
[0030] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0031] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A design method for hot update of external API integrated into an ipaas platform, characterized in that: include: Abstract all external API calls of the IPaaS platform into a unified function, use the template method mode, decompose the entire calling process into multiple fixed steps, and divide the implementation of the IPaaS platform into two parts: basic capabilities and extended capabilities. The basic capabilities provide core fixed processes, and the extended capabilities are similar to plug-ins, providing specific implementations of different API calls. The extended capabilities link includes but is not limited to the following steps: S1: Add API URL, authentication credentials, parameter mapping rule configuration, and input and output parameter processing logic to complete the development of a connector; S2: The custom class loader is entered from the ipaas platform. The custom class loader loads the extension package from the specified location and limits the scope of replacement to the fixed package path and the specified function method. S3: When updating, use a new custom class loader to load the API call object and replace the previous custom class loader to complete the hot update; S4: The garbage collector automatically recycles old class loaders, removing restrictions on the class loader cache.
2. According to claim 1, a method for designing hot update of an IPaaS platform integrating an external API is characterized in that: The basic capabilities include functions such as interface authorization login, saving user authentication credentials, refreshing authentication credentials, etc., and all of the above functions use public methods.
3. According to claim 1, a method for designing hot update of an IPaaS platform integrating an external API is characterized in that: The ipaas platform and other callers add external dependency packages, and the specific implementation of the api call process is provided by the external dependency packages.
4. According to claim 1, a method for designing hot update of an IPaaS platform integrating an external API is characterized in that: The ipaas platform uses a template method mode to standardize the calling method, uniformly stipulates the way to obtain configuration items, and guides the loading of different connectors through configuration files.
5. According to claim 1, a method for designing hot update of an IPaaS platform integrating an external API is characterized in that: After the ipaas platform replaces the extension package, it will call the specified refresh interface to implement the deployment of the extension capability.
6. According to claim 1, a method for designing hot update of an IPaaS platform integrating an external API is characterized in that: In step S2, when the external dependency API changes, the custom class loader specifies the implementation method to achieve the purpose of synchronous update.
