CN114422358B - API gateway configuration updating method and equipment - Google Patents

API gateway configuration updating method and equipment Download PDF

Info

Publication number
CN114422358B
CN114422358B CN202210096591.1A CN202210096591A CN114422358B CN 114422358 B CN114422358 B CN 114422358B CN 202210096591 A CN202210096591 A CN 202210096591A CN 114422358 B CN114422358 B CN 114422358B
Authority
CN
China
Prior art keywords
api gateway
updating
configuration
information
gateway
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210096591.1A
Other languages
Chinese (zh)
Other versions
CN114422358A (en
Inventor
杜何哲
李京西
黄志明
朱前勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202210096591.1A priority Critical patent/CN114422358B/en
Publication of CN114422358A publication Critical patent/CN114422358A/en
Application granted granted Critical
Publication of CN114422358B publication Critical patent/CN114422358B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides an API gateway configuration updating method and equipment, wherein the method comprises the following steps: when the updating device monitors that the configuration platform updates the API gateway, the updating device acquires the updating information of the API gateway from the configuration platform, and the API gateway adopts a responsibility chain mode and is in an operation state; when the update information is used for changing the existing function configuration of the API gateway, the update device updates the configuration information in the memory corresponding to the API gateway according to the update information; when the update information is used for configuring the new function of the API gateway, the update device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information. According to the embodiment of the application, dynamic updating can be realized when the API gateway is in the running state, and the reliability and the usability of the API gateway are effectively improved.

Description

API gateway configuration updating method and equipment
Technical Field
The embodiment of the application relates to the technical field of computer networks, in particular to a gateway configuration updating method and device for an application programming interface (Application Programming Interface, abbreviated as API).
Background
Web services typically include a client and a server, with an API gateway being a bridge between the client and the server. The API gateway is required to have good reliability and high availability as a unified portal for client access to backend services, while having certain orchestration and expansion capabilities.
The existing API gateway generally records the routing information in a configuration file mode, and when the API gateway is started, the API gateway automatically loads the configuration file into a memory and realizes related functions according to the configuration file in the memory. When the function of the API gateway needs to be updated, the function can only be realized by changing the configuration file of the API gateway and restarting the API gateway, and the dynamic update in the running state can not be realized, so that the requirements on the high reliability and high availability principles of the API gateway are deviated.
Disclosure of Invention
The embodiment of the application provides an API gateway configuration updating method and device, which can realize dynamic updating when an API gateway is in an operating state, and effectively improve the reliability and usability of the API gateway.
In a first aspect, an embodiment of the present application provides an API gateway configuration updating method, including:
when the updating device monitors that the configuration platform updates the API gateway, the updating device acquires the updating information of the API gateway from the configuration platform, wherein the API gateway adopts a responsibility chain mode and is in an operation state;
when the update information is used for changing the existing function configuration of the API gateway, the update device updates the configuration information in the memory corresponding to the API gateway according to the update information;
when the update information is used for configuring the new function of the API gateway, the update device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information.
In a possible implementation manner, the updating device updates the configuration information in the memory corresponding to the API gateway according to the update information, including:
and the updating device uses a class loader to load the updating information into a memory corresponding to the API gateway.
In a possible implementation manner, the updating device updates the configuration information in the memory corresponding to the API gateway according to the update information, including:
the updating device determines updating content corresponding to the updating information, wherein the updating content comprises a start-stop state and an arrangement sequence for updating the existing functions of the API gateway;
and the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating content.
In a possible implementation manner, before the updating device updates the configuration information in the memory corresponding to the API gateway according to the update information, the updating device further includes:
the updating device verifies the changed function configuration of the API gateway;
when the function configuration changed by the API gateway accords with a preset change rule, the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating information.
In a possible embodiment, the method further includes:
and when the changed function configuration of the API gateway does not accord with the change rule, generating a reminding message, wherein the reminding message is used for reminding a user of failure in updating the API gateway.
In a possible implementation manner, before the updating device obtains the component package corresponding to the newly added target function configuration from the preset component library according to the updating information, the updating device further includes:
the updating device verifies the newly added target function configuration of the API gateway;
when the newly added target function configuration of the API gateway accords with a preset new rule, the updating device acquires a component package corresponding to the newly added target function configuration from a preset component library according to the updating information.
In a possible embodiment, the method further includes:
and when the newly added target function configuration of the API gateway does not accord with the new adding rule, generating a reminding message, wherein the reminding message is used for reminding a user that the updating of the API gateway fails.
In a second aspect, an embodiment of the present application provides an API gateway configuration updating apparatus, including:
the monitoring module is used for acquiring updating information of the API gateway from the configuration platform when the configuration platform is monitored to update the API gateway, wherein the API gateway adopts a responsibility chain mode and is in an operation state;
the updating module is used for updating the configuration information in the memory corresponding to the API gateway according to the updating information when the updating information is used for changing the existing function configuration of the API gateway; when the update information is used for configuring the new function of the API gateway, the update device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information.
In a third aspect, an embodiment of the present application provides an electronic terminal, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the API gateway configuration updating method as provided in the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where computer executable instructions are stored, and when executed by a processor, implement an API gateway configuration updating method as provided in the first aspect.
According to the method and the device for updating the configuration of the API gateway, when the configuration platform is monitored to update the API gateway, the updating device acquires the updating information of the API gateway from the configuration platform, wherein the API gateway adopts a responsibility chain mode and is in an operation state; when the update information is used for changing the existing function configuration of the API gateway, the update device updates the configuration information in the memory corresponding to the API gateway according to the update information; when the update information is used for configuring the new function of the API gateway, the update device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information. According to the embodiment of the application, under the condition of no restarting, the dynamic updating of the API gateway can be realized in the running process of the API gateway, and the reliability and the usability of the API gateway are effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments of the present application or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic architecture diagram of an API gateway configuration updating system provided in an embodiment of the present application;
fig. 2 is a flow chart of an API gateway configuration updating method provided in an embodiment of the present application;
FIG. 3 is a schematic flow chart of a thermal orchestration mechanism according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a dynamic expansion mechanism provided in an embodiment of the present application;
fig. 5 is a schematic program module diagram of an API gateway configuration updating apparatus according to an embodiment of the present application;
fig. 6 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure. Furthermore, while the disclosure is presented in the context of an exemplary embodiment or embodiments, it should be appreciated that the various aspects of the disclosure may, separately, comprise a complete embodiment.
It should be noted that the brief description of the terms in the present application is only for convenience in understanding the embodiments described below, and is not intended to limit the embodiments of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar or similar objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are, for example, capable of operation in sequences other than those illustrated or otherwise described herein.
Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to those elements expressly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
The term "module" as used in this application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and/or software code that is capable of performing the function associated with that element.
With the strong promotion of cloud and microservice of enterprise services, an API gateway gradually becomes a key component of application landing and forwarding landing, and as a key ring in an enterprise network architecture, the API gateway needs to provide a capability of supporting hot arrangement of related functions without restarting, and meanwhile, the capability of integrating user-defined gateway function components needs to be provided in face of diversified requirements of each project on gateway capability, besides ensuring high reliability and high availability of gateway services.
Wherein, the API is some predefined interfaces (such as functions, HTTP interfaces) or refers to the engagement of different components of the software system. The API gateway is a central interface that accesses a set of all APIs of a service so that requests of clients can be distributed to backend services in a unified manner and rules; in addition to route distribution, the API gateway may integrate important security and management tasks such as authentication, throttling, request and response translation, etc.
The API gateway is used as a unified portal for accessing the backend service by a user or a client, and is required to have good high reliability and high availability, and certain arrangement and expansion capabilities, and the existing API gateway expansion device or method generally has the following disadvantages:
1. the custom expansion cost is high: the existing API gateway or network agent needs to be expanded based on languages such as C++, lua or Go, and has no unified standard and interface when custom development and function enhancement are carried out, so that a developer needs to have deeper understanding on the product, and the cost of custom expansion development is increased.
2. After custom expansion, the service needs to be recompiled and restarted: the existing API gateway products need to repackage or compile the whole project and newly added module codes after carrying out custom expansion or function enhancement, so that dynamic expansion and arrangement during operation cannot be realized, and the requirements on the high reliability and high availability principles of the gateway are deviated. The general API gateway based on software implementation needs restarting service when performing configuration updating and function plugging, and meanwhile, dynamic expansion of gateway functions cannot be provided under the conditions of not restarting service and not repackaging compiling, so that the requirements of the gateway on reliability, availability and timeliness are met.
In view of the above technical problems, the application provides an API Gateway arrangement and dynamic expansion method, which realizes the dynamic expansion of a third party function component by means of a responsibility chain mode and a distributed configuration platform on the basis of an API Gateway realized based on a Spring-Cloud-Gateway framework, so as to support the diversified demands of enterprises on the API Gateway and promote the high reliability and high usability of the Gateway. The following will explain in detail the embodiments.
The following explains the related terms involved in the embodiments of the present application:
Spring-Cloud-Gateway: the second generation gateway framework based on Spring-Cloud can help a developer to conveniently realize functions such as route forwarding, protocol conversion, current limiting and the like.
Distributed configuration platform: the distributed configuration platform can intensively manage the configuration of different environments and different clusters of applications and services, can realize real-time pushing to a server after configuration, has the characteristics of normative authority, flow management and the like, and is suitable for micro-service configuration management scenes.
Heat arranging: it means that the gateway can realize the start and stop of the related functions without restarting the service.
Heat loading: the method refers to loading the gateway function component integrated with the third-party custom development in real time on the premise of not requiring recompilation of gateway engineering and restarting of gateway service.
Responsibility chain mode: it is one of the design modes in program development, and the mode decouples the sender and the processor of the request, the requester only needs to send the request to the processor, each processor in the chain contains the reference of the next processor, if the current processor cannot request, the request will be transferred to the next processor, so that the sender does not need to pay attention to the details of the processing and the request transfer.
The application provides an API gateway configuration updating method supporting function hot arrangement and custom development enhancement of an API gateway based on spring-closed-gateway.
Referring to fig. 1, fig. 1 is a schematic architecture diagram of an API gateway configuration updating system according to an embodiment of the present application.
The API gateway configuration updating system provided by the embodiment of the application is realized based on spring-closed-gateway and comprises an API gateway developed by using a responsibility chain mode, a distributed configuration platform and an updating device.
In some embodiments, as shown in fig. 1, the API gateway portion is implemented on the basis of a spring-closed-gateway framework, and is connected into a filtering chain of spring-closed-gateway through a preset filter, and meanwhile, functions such as routing forwarding, identity authentication and current limiting of the API gateway are implemented by using a design mode of a responsibility chain, and meanwhile, the design mode provides a basis for thermal arrangement and subsequent dynamic expansion of each function; the distributed configuration platform module provides the function of pushing configuration for the services of different clusters in different environments; the updating device can interact with the distributed configuration platform, can monitor the change of the configuration related to the configuration platform, and can actively acquire the configuration from the configuration platform.
Referring to fig. 2, fig. 2 is a flow chart of an API gateway configuration updating method provided in an embodiment of the present application, and in some embodiments, the method includes:
s201, when the updating device monitors that the configuration platform updates the functions of the API gateway, the updating device acquires the updating information of the API gateway from the configuration platform, and the API gateway adopts a responsibility chain mode and is in an operation state.
In some embodiments, a user may update, through the distributed configuration platform, the gateway configuration of the designated cluster in the designated environment according to the changing requirement, where the update content includes a start-stop state of the designated function, an arrangement sequence, a configuration of the related function, and the like, and after updating, the configuration is released by the distributed configuration platform.
S202, when the update information is used for changing the existing function configuration of the API gateway, the update device updates the configuration information in the memory corresponding to the API gateway according to the update information.
In the embodiment of the application, the user modifies the corresponding configuration according to the rule on the configuration platform, the updating device monitors the change of the configuration after the modification, and updates the related configuration in the API gateway service memory after actively pulling the new configuration for verification.
Optionally, the changing the existing function configuration of the API gateway includes updating the start-stop state and arrangement sequence of the existing function of the API gateway, deleting the existing function of the API gateway, and so on.
And S203, when the update information is used for configuring the new function of the API gateway, the updating device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information.
In the embodiment of the application, after the third party develops the self-defined function of the API gateway according to the interface standard, the related configuration is actively added to the distributed configuration platform, and the updating device dynamically loads the new function to the running API gateway service by using the class loader after receiving the configuration information, so that the new function is effective.
The method for updating the configuration of the API gateway provided by the embodiment of the application has the following advantages:
1. the availability and maintainability of spring cloud Gateway are promoted, and the function can be arranged at the running time. For example, in the internet second killing scenario, functions such as current limiting and ip blacklist need to be increased urgently, the open source primary spring cloud Gateway needs to be restarted, thermal effect cannot be achieved, efficiency is low, and continuity influence is caused on service. By adopting the updating device provided by the application, the distributed configuration platform is matched, so that the thermal arrangement of the gateway function can be efficiently realized, various burst scenes can be effectively treated, and the back-end system of an enterprise is protected.
2. The expansion capability of spring cloud Gateway is improved, when the open source native spring cloud Gateway increases the expansion function, the original code function must be added into the jar packet in a compiling mode, the capability of dynamically loading the expansion code is not provided, the expansion capability of the spring cloud Gateway gateway is reduced, meanwhile, the expansion function code is updated and changed, spring cloud Gateway and the expansion code are required to be recompiled, and the efficiency and the reliability are low. The updating device provided by the application can dynamically load the extended jar and the corresponding functions, does not need to compile the code of the spring cloud Gateway gateway, upgrades and changes the extended function code, only needs to independently compile the extended function jar, and completes the replacement of the corresponding extended jar, thereby enhancing the maintainability and the extension efficiency of the system.
In some embodiments, the updating device uses a class loader to load the update information into a memory corresponding to the API gateway.
In some embodiments, the updating device is configured to determine update content corresponding to the update information, where the update content includes a start-stop state and an arrangement order for updating an existing function of the API gateway; and updating the configuration information in the memory corresponding to the API gateway according to the updating content.
In some embodiments, the updating device further includes a checking module, configured to check the functional configuration changed by the API gateway; when the function configuration changed by the API gateway accords with a preset change rule, the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating information; and when the changed function configuration of the API gateway does not accord with the change rule, generating a reminding message, wherein the reminding message is used for reminding a user of failure in updating the API gateway.
In some embodiments, the verification module is further configured to:
verifying the newly added target function configuration of the API gateway; when the newly added target function configuration of the API gateway accords with a preset new rule, the updating device acquires a component package corresponding to the newly added target function configuration from a preset component library according to the updating information; and when the newly added target function configuration of the API gateway does not accord with the new adding rule, generating a reminding message, wherein the reminding message is used for reminding a user that the updating of the API gateway fails.
Referring to fig. 3, fig. 3 is a schematic flow chart of a thermal arrangement mechanism provided in an embodiment of the present application, and in a possible implementation of the present application, a flow for implementing thermal arrangement is:
1. configuration update and release: the user updates the gateway configuration of the appointed cluster in the appointed environment according to the changing requirement through the distributed configuration platform, the updating content comprises the start-stop state of the appointed function, the arrangement sequence, the configuration of the related function and the like, and the distributed configuration platform performs configuration release after updating.
2. Configuration acquisition and verification: after configuration release, a monitor of the updating device monitors related information and actively pulls updated configuration, after pulling, the configuration is checked according to agreed standards and rules, if the configuration passes, the current configuration in a running gateway service memory is modified, after the configuration is successfully modified, the latest arrangement and configuration are used by default when a new request passes through a gateway, and the gateway service is not required to be released and restarted in a repacking mode; if the verification fails, the user is reminded, and the current configuration is continuously used and is not updated.
3. The arrangement takes effect: the API gateway is realized in a design mode of a responsibility chain, is deployed in a mode of separating configuration from service, loads configuration files into a memory when the service is started for the first time, and actively updates relevant configuration parameters in the memory of the gateway service after the configuration updated by a user passes the verification of the updating device, so that the latest configuration can take effect immediately, and the gateway function and the hot arrangement of the configuration are realized.
In some embodiments, a set of dynamic expansion mechanism is designed for the API gateway to support the loading of the third-party custom development function, and a third-party user can develop the custom function by relying on a form of a public interface, and meanwhile, the API gateway can dynamically load the newly-added functional components in an integrated mode.
Referring to fig. 4, fig. 4 is a schematic flow chart of a dynamic expansion mechanism provided in an embodiment of the present application, and in a feasible implementation manner of the present application, a flow for implementing dynamic expansion is:
1. third party custom development: the third party user can inject the request context information for the custom component and realize the custom enhancement function by relying on the open public interface and realizing the method in the interface.
2. Packaging a custom component: after the custom component is developed, a third party packs the component in a jar package mode and places the component in a third party function component library at a designated position;
3. releasing the newly added function configuration: and the third party user adds and distributes relevant configuration in the distributed configuration platform in a way of thermal arrangement mechanism flow description, and the updating device carries out the thermal loading of the verifier function component of the relevant configuration in real time.
4. Function dynamic loading: after the updating device loads the component package, the configuration and function arrangement sequence in the memory is updated, and the newly added responsible chain node executes relevant new functions after a new request enters the gateway, namely, the dynamic expansion under the condition of no restarting is realized.
The method for updating the configuration of the API gateway provides a basis for plugging and unplugging functions through the mode of the responsibility chain skillfully, simultaneously uses a mode of separating application from configuration, injects related functions and parameters thereof through configuration, and provides a premise for dynamic expansion and hot arrangement of the API gateway.
Furthermore, the embodiment of the application reduces the difficulty and complexity of managing and enhancing the functions of the API gateway, and a user can extend and enhance the gateway functions to a certain extent by fully utilizing the java language characteristics through a unified interface and a unified specification; meanwhile, the method and the device can acquire the function start-stop state and the configuration parameters of the current gateway in real time, and modify and arrange the function start-stop state and the configuration parameters in real time, so that the problems that the gateway is complicated to configure as a middleware, the entrance threshold is high and the like are solved.
According to the embodiment of the application, by means of the responsibility chain and the configuration type arrangement mode, the distributed configuration platform is fully utilized, the requirements of hot arrangement, hot plug and dynamic loading of the function of the API gateway in the running process, and new functional components which are developed in a self-defined mode are met, and the operations of recompilation, packaging, release, restarting of services and the like after function enhancement, which deviate from the gateway high reliability and high availability principle, are avoided.
Based on the description in the foregoing embodiment, an API gateway configuration updating apparatus is also provided in the embodiment of the present application. Referring to fig. 5, fig. 5 is a schematic program module of an API gateway configuration updating apparatus according to an embodiment of the present application, where the API gateway configuration updating apparatus includes:
the monitoring module 501 is configured to obtain update information of an API gateway from a configuration platform when the configuration platform is monitored to update the API gateway, where the API gateway adopts a responsibility chain mode and is in an operation state.
The updating module 502 is configured to update the configuration information in the memory corresponding to the API gateway according to the updating information when the updating information is used to change the existing function configuration of the API gateway; when the update information is used for configuring the new function of the API gateway, the update device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information.
In some embodiments, the updating device uses a class loader to load the update information into a memory corresponding to the API gateway.
In some embodiments, the update module 502 is configured to determine update content corresponding to the update information, where the update content includes a start-stop status and an arrangement order for updating an existing function of the API gateway; and updating the configuration information in the memory corresponding to the API gateway according to the updating content.
In some embodiments, the system further comprises a verification module for verifying the functional configuration of the API gateway change; when the function configuration changed by the API gateway accords with a preset change rule, the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating information; and when the changed function configuration of the API gateway does not accord with the change rule, generating a reminding message, wherein the reminding message is used for reminding a user of failure in updating the API gateway.
In some embodiments, the verification module is further configured to:
verifying the newly added target function configuration of the API gateway; when the newly added target function configuration of the API gateway accords with a preset new rule, the updating device acquires a component package corresponding to the newly added target function configuration from a preset component library according to the updating information; and when the newly added target function configuration of the API gateway does not accord with the new adding rule, generating a reminding message, wherein the reminding message is used for reminding a user that the updating of the API gateway fails.
The API gateway configuration updating device provided by the application is based on a responsibility chain mode, and on the premise of configuration and service separation, the function arrangement and configuration hot updating of the API gateway in the running process under the whole scene can be realized by means of a distributed configuration platform; meanwhile, the dynamic loading of the third-party custom functional component is supported, the maintainability and the expansion efficiency of the original gateway system are enhanced, the dynamic expansion device is suitable for various applications and systems of enterprises to meet the requirements of the API gateway, and a user can utilize the device to realize the arrangement and expansion of the functions of the API gateway during operation by only realizing the interface with unified specification.
Further, based on the descriptions in the above embodiments, there is also provided an electronic device including at least one processor and a memory; wherein the memory stores computer-executable instructions; the at least one processor executes computer-executable instructions stored in the memory to implement the steps in the credit investigation data management method as described in the above embodiment, which is not described herein.
For a better understanding of the embodiments of the present application, referring to fig. 6, fig. 6 is a schematic hardware structure of an electronic device according to the embodiments of the present application.
As shown in fig. 6, the electronic apparatus of the present embodiment includes: a processor 601 and a memory 602; wherein:
a memory 602 for storing computer-executable instructions;
the processor 601 is configured to execute computer-executable instructions stored in the memory to implement the steps in the credit investigation data management method described in the above embodiment, which is not described herein.
Alternatively, the memory 602 may be separate or integrated with the processor 601.
When the memory 602 is provided separately, the device further comprises a bus 603 for connecting said memory 602 and the processor 601.
Further, based on the descriptions in the foregoing embodiments, a computer readable storage medium is further provided in the embodiments of the present application, where computer execution instructions are stored in the computer readable storage medium, and when the processor executes the computer execution instructions, the steps in the API gateway configuration updating method described in the foregoing embodiments are implemented, which is not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The integrated units of the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods described in the embodiments of the present application.
It should be understood that the above processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (6)

1. An API gateway configuration updating method, the method comprising:
when the updating device monitors that the configuration platform updates the function of the API gateway, the updating device acquires the updating information of the API gateway from the configuration platform, wherein the API gateway adopts a responsibility chain mode and is in an operation state;
when the update information is used for changing the existing function configuration of the API gateway, the update device updates the configuration information in the memory corresponding to the API gateway according to the update information;
when the update information is used for configuring the new function of the API gateway, the update device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information;
before the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating information, the updating device further comprises:
the updating device verifies the changed function configuration of the API gateway;
when the function configuration changed by the API gateway accords with a preset change rule, the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating information;
when the function configuration changed by the API gateway does not accord with the change rule, generating a reminding message, wherein the reminding message is used for reminding a user that the updating of the API gateway fails;
the updating device further comprises before acquiring the component package corresponding to the newly added target function configuration from a preset component library according to the updating information:
the updating device verifies the newly added target function configuration of the API gateway;
when the newly added target function configuration of the API gateway accords with a preset new rule, the updating device acquires a component package corresponding to the newly added target function configuration from a preset component library according to the updating information;
and when the newly added target function configuration of the API gateway does not accord with the new adding rule, generating a reminding message, wherein the reminding message is used for reminding a user that the updating of the API gateway fails.
2. The method of claim 1, wherein the updating means updates the configuration information in the memory corresponding to the API gateway according to the update information, comprising:
and the updating device uses a class loader to load the updating information into a memory corresponding to the API gateway.
3. The method of claim 1, wherein the updating means updates the configuration information in the memory corresponding to the API gateway according to the update information, comprising:
the updating device determines updating content corresponding to the updating information, wherein the updating content comprises a start-stop state and an arrangement sequence for updating the existing functions of the API gateway;
and the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating content.
4. An API gateway configuration updating apparatus, comprising:
the monitoring module is used for acquiring updating information of the API gateway from the configuration platform when the configuration platform is monitored to update the API gateway, wherein the API gateway adopts a responsibility chain mode and is in an operation state;
the updating module is used for updating the configuration information in the memory corresponding to the API gateway according to the updating information when the updating information is used for changing the existing function configuration of the API gateway; when the update information is used for configuring the new function of the API gateway, the update device acquires a component package corresponding to the newly-increased target function configuration from a preset component library according to the update information, sends the component package to the API gateway, and updates the configuration information in a memory corresponding to the API gateway according to the update information;
the verification module is used for verifying the function configuration changed by the API gateway; when the function configuration changed by the API gateway accords with a preset change rule, the updating device updates the configuration information in the memory corresponding to the API gateway according to the updating information; when the function configuration changed by the API gateway does not accord with the change rule, generating a reminding message, wherein the reminding message is used for reminding a user that the updating of the API gateway fails;
the verification module is further used for verifying the newly added target function configuration of the API gateway; the updating device verifies the newly added target function configuration of the API gateway; when the newly added target function configuration of the API gateway accords with a preset new rule, the updating device acquires a component package corresponding to the newly added target function configuration from a preset component library according to the updating information; and when the newly added target function configuration of the API gateway does not accord with the new adding rule, generating a reminding message, wherein the reminding message is used for reminding a user that the updating of the API gateway fails.
5. An electronic terminal, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the API gateway configuration updating method of any of claims 1-3.
6. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the API gateway configuration updating method of any of claims 1-3.
CN202210096591.1A 2022-01-26 2022-01-26 API gateway configuration updating method and equipment Active CN114422358B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210096591.1A CN114422358B (en) 2022-01-26 2022-01-26 API gateway configuration updating method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210096591.1A CN114422358B (en) 2022-01-26 2022-01-26 API gateway configuration updating method and equipment

Publications (2)

Publication Number Publication Date
CN114422358A CN114422358A (en) 2022-04-29
CN114422358B true CN114422358B (en) 2024-01-30

Family

ID=81276434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210096591.1A Active CN114422358B (en) 2022-01-26 2022-01-26 API gateway configuration updating method and equipment

Country Status (1)

Country Link
CN (1) CN114422358B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174342B (en) * 2022-06-15 2024-03-08 阿里巴巴(中国)有限公司 Plug-in management method, device and equipment of gateway

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771762A (en) * 2009-01-06 2010-07-07 北京邮电大学 Method and system for dynamically loading services in service system
CN106656622A (en) * 2016-12-29 2017-05-10 深圳Tcl新技术有限公司 Method and device for configuring interface call tasks
CN107533491A (en) * 2015-09-14 2018-01-02 松下电器(美国)知识产权公司 Gateway apparatus, firmware update and control program
CN108900329A (en) * 2018-06-21 2018-11-27 珠海宏桥高科技有限公司 Real-time dynamic forwarding method based on gateway infrastructure service
CN108965007A (en) * 2018-07-19 2018-12-07 北京车和家信息技术有限公司 API gateway interface configures update method and device
CN109842656A (en) * 2017-11-28 2019-06-04 厦门雅迅网络股份有限公司 Car networking method of servicing, the car networking gateway system of the compatible multi-protocols of intelligence
CN110493067A (en) * 2019-09-05 2019-11-22 中国银联股份有限公司 A kind of method and device that API gateway service updates
CN112260876A (en) * 2020-10-26 2021-01-22 欧冶云商股份有限公司 Dynamic gateway route configuration method, platform, computer equipment and storage medium
CN112636992A (en) * 2021-03-10 2021-04-09 腾讯科技(深圳)有限公司 Dynamic routing method, device, equipment and storage medium
CN112882738A (en) * 2021-03-22 2021-06-01 亿企赢网络科技有限公司 Configuration information updating method and device under micro-service architecture and electronic equipment
US11095506B1 (en) * 2020-07-22 2021-08-17 Servicenow, Inc. Discovery of resources associated with cloud operating system
CN113315710A (en) * 2021-05-29 2021-08-27 东方电子股份有限公司 Middle station API gateway management configuration and extension method based on asynchronous dynamic routing
CN113452617A (en) * 2021-06-24 2021-09-28 上海豹云网络信息服务有限公司 Dynamic gateway route management method, device and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771762A (en) * 2009-01-06 2010-07-07 北京邮电大学 Method and system for dynamically loading services in service system
CN107533491A (en) * 2015-09-14 2018-01-02 松下电器(美国)知识产权公司 Gateway apparatus, firmware update and control program
CN106656622A (en) * 2016-12-29 2017-05-10 深圳Tcl新技术有限公司 Method and device for configuring interface call tasks
CN109842656A (en) * 2017-11-28 2019-06-04 厦门雅迅网络股份有限公司 Car networking method of servicing, the car networking gateway system of the compatible multi-protocols of intelligence
CN108900329A (en) * 2018-06-21 2018-11-27 珠海宏桥高科技有限公司 Real-time dynamic forwarding method based on gateway infrastructure service
CN108965007A (en) * 2018-07-19 2018-12-07 北京车和家信息技术有限公司 API gateway interface configures update method and device
CN110493067A (en) * 2019-09-05 2019-11-22 中国银联股份有限公司 A kind of method and device that API gateway service updates
US11095506B1 (en) * 2020-07-22 2021-08-17 Servicenow, Inc. Discovery of resources associated with cloud operating system
CN112260876A (en) * 2020-10-26 2021-01-22 欧冶云商股份有限公司 Dynamic gateway route configuration method, platform, computer equipment and storage medium
CN112636992A (en) * 2021-03-10 2021-04-09 腾讯科技(深圳)有限公司 Dynamic routing method, device, equipment and storage medium
CN112882738A (en) * 2021-03-22 2021-06-01 亿企赢网络科技有限公司 Configuration information updating method and device under micro-service architecture and electronic equipment
CN113315710A (en) * 2021-05-29 2021-08-27 东方电子股份有限公司 Middle station API gateway management configuration and extension method based on asynchronous dynamic routing
CN113452617A (en) * 2021-06-24 2021-09-28 上海豹云网络信息服务有限公司 Dynamic gateway route management method, device and storage medium

Also Published As

Publication number Publication date
CN114422358A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
US11080144B2 (en) System and method for managing blockchain nodes
CN116302719B (en) System and method for enabling high availability managed failover services
CN105302563B (en) The plug-in unit method and system of mobile application service
CN111290865A (en) Service calling method and device, electronic equipment and storage medium
CN113296792B (en) Storage method, device, equipment, storage medium and system
US11366728B2 (en) Systems and methods for enabling a highly available managed failover service
EP2643758A1 (en) Technique for resource creation in a cloud computing system
CN112333096A (en) Micro-service traffic scheduling method and related components
US20220276878A1 (en) Method and apparatus for generating image file and computer-readable storage medium
CN112564917A (en) Cloud service platform based on block chain and deployment method thereof
CN111090423A (en) Webhook framework system and method for realizing active calling and event triggering
CN114422358B (en) API gateway configuration updating method and equipment
CN113596151A (en) Plug-in management method and device, and data processing method and device
CN113268308B (en) Information processing method, device and storage medium
CN109375946B (en) Method and system for managing component package of node package manager
CN116028163A (en) Method, device and storage medium for scheduling dynamic link library of container group
US11182508B1 (en) Enhanced version retention systems and methods
CN106936643B (en) Equipment linkage method and terminal equipment
CN104348646A (en) Configuration data processing method, device and system
CN116954810A (en) Method, system, storage medium and program product for creating container application instance
CN114662102A (en) File processing method and device and storage medium
AU2022245632A1 (en) Run-time communications protocol parameter adjustment in containerized applications
CN110286956B (en) Plug-in operation method and device and electronic equipment
EP4031990A1 (en) System and method for managing blockchain nodes
JPH10320184A (en) Software version management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant