CN110493067A - A kind of method and device that API gateway service updates - Google Patents

A kind of method and device that API gateway service updates Download PDF

Info

Publication number
CN110493067A
CN110493067A CN201910836986.9A CN201910836986A CN110493067A CN 110493067 A CN110493067 A CN 110493067A CN 201910836986 A CN201910836986 A CN 201910836986A CN 110493067 A CN110493067 A CN 110493067A
Authority
CN
China
Prior art keywords
service
api gateway
information
locally configured
called
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.)
Granted
Application number
CN201910836986.9A
Other languages
Chinese (zh)
Other versions
CN110493067B (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201910836986.9A priority Critical patent/CN110493067B/en
Publication of CN110493067A publication Critical patent/CN110493067A/en
Application granted granted Critical
Publication of CN110493067B publication Critical patent/CN110493067B/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
    • 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/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses the method and devices that a kind of API gateway service updates, suitable for the API gateway realized by distributed remote invocation framenort, wherein, method includes: that API gateway applies acquisition that information is locally configured, and dynamic configuration information is obtained from dynamic configuration server, compare and information and dynamic configuration information is locally configured, if it is determined that the first identifier of newly-increased service, the newly-increased service is then subscribed to from Subscriber according to first identifier, and the newly-increased service is instantiated in the application container of API gateway application, information is locally configured according to dynamic configuration information update.The technical program is under the premise of not restarting API gateway application, to realize that the dynamic of API gateway service updates.

Description

A kind of method and device that API gateway service updates
Technical field
A kind of updated the present embodiments relate to technical field of software development more particularly to API gateway service method and Device.
Background technique
Carrying out open platform API (Application Programming Interface, application programming interface) In gateway application development process, when some API service of new restocking or undercarriage currently existing API service, need to API net Application is closed to be updated, i.e., XML in update API gateway application program (Extensible Markup Language, it is expansible Markup language) format Static Configuration Files, and updated XML format Static Configuration Files are replaced into original file and are restarted API gateway application program.
API gateway is applied as the numerous HTTP of carrying (HyperText Transfer Protocol, Hyper text transfer association View) service entrance, itself require have high availability, but in existing update mode, newly-increased every time, some API of undercarriage clothes It is engaged in just needing re-launching applications, in application program restarting process, service call side can not be normal through API gateway application program Remote call service affects the normal demand of service call side.
Summary of the invention
The embodiment of the present invention provides the method and device that a kind of API gateway service updates, to answer not restarting API gateway Under the premise of, realize that the dynamic of API gateway service updates.
The method that a kind of API gateway service provided in an embodiment of the present invention updates is suitable for calling by distributed remote The API gateway that frame is realized, which comprises
Information is locally configured using acquisition in API gateway;The information that is locally configured is that the API gateway is applied according to from ordering Read the ordered mark determination serviced of server;
The API gateway is applied from dynamic configuration server and obtains dynamic configuration information;The dynamic configuration information is institute It states after dynamic configuration server is updated according to dynamic configuration instruction and generates;The dynamic configuration instruction is for changing from institute State the service of Subscriber subscription;
The API gateway application is relatively more described to be locally configured information and the dynamic configuration information, however, it is determined that increases clothes newly out The first identifier of business then subscribes to the newly-increased service from the Subscriber according to the first identifier, and in the API net It closes in the application container of application and instantiates the newly-increased service;
The API gateway, which is applied, is locally configured information according to dynamic configuration information update.
In above-mentioned technical proposal, API gateway acquisition information and dynamic configuration information is locally configured, to be locally configured information and Dynamic configuration information is compared, however, it is determined that is gone out currently to have newly-increased service, is then subscribed to the newly-increased clothes from Subscriber automatically It is engaged in and instantiates the newly-increased service in application container, can also be updated automatically according to the dynamic configuration information and letter be locally configured Breath.It is not necessary that updated static configuration information is manually replaced original static configuration information, and answered without restarting API gateway With the heat for realizing that API gateway is applied updates, and API gateway application can be made to be constantly in open state, meet service call side Calling demand.The flexibility of the service configuration of API gateway application is promoted, and realizes the high availability of API gateway, is reduced API gateway is a possibility that service call fails restarting process in short-term.
Optionally, the API gateway is locally configured before information using acquisition, further includes:
The API gateway application obtains static configuration information;The static configuration information includes global configuration information and mentions For the mark of service;
The API gateway, which is applied, matches the distributed remote invocation framenort progress overall situation according to the global configuration information It sets;
The API gateway, which is applied, provides the mark of service according to described, subscribes to the offer clothes from the Subscriber Business, and the offer service is instantiated in the application container of API gateway application;
Information is locally configured described in applying the mark according to the offer service to determine in the API gateway.
In above-mentioned technical proposal, information is locally configured for sky, then in initial start-up, due to API gateway in API gateway API gateway is loaded and is configured to all static configuration informations, by service instantiation into application container, and to subscription Server subscription service.
Optionally, after the API gateway is using information is locally configured according to dynamic configuration information update, packet It includes:
The API gateway application receives the service request of service call side, includes service to be called in the service request Mark;
The API gateway applies the mark according to the service to be called, determines to use in information from described be locally configured In the address for the service provider for providing the service to be called;
The API gateway applies the address according to the service provider and the application container in API gateway application Service to be called after middle instantiation calls the service to be called from the service provider and returns to service response to institute State service call side.
Optionally, further include;
The API gateway application is relatively more described to be locally configured information and the dynamic configuration information, however, it is determined that deletes clothes out The second identifier is then recorded in and has deleted in identification information by the second identifier of business;
The API gateway applies the mark according to the service to be called, determines to use in information from described be locally configured Before the address of service provider of the service to be called is provided, further includes:
The API gateway applies the mark according to the service to be called, determines that described deleted in identification information is not deposited In the mark of the service to be called.
In above-mentioned technical proposal, identification information is deleted by setting, has deleted certain in determining dynamic configuration information When the service identifiers of a API service, the service identifiers of the API service can be added to having deleted in identification information, thus real Now to the undercarriage of API service.
Correspondingly, the embodiment of the invention also provides the devices that a kind of API gateway service updates, suitable for passing through distribution The API gateway that far call frame is realized, described device includes: acquiring unit and processing unit;
Information is locally configured for obtaining in the acquiring unit;It is described be locally configured information be API gateway apply according to from The ordered mark determination serviced of Subscriber;
The acquiring unit is also used to obtain dynamic configuration information from dynamic configuration server;The dynamic configuration information The dynamic configuration server generates after being updated according to dynamic configuration instruction;The dynamic configuration instruction is for changing The service subscribed to from the Subscriber;
The processing unit, for information and the dynamic configuration information to be locally configured described in comparison, however, it is determined that increase newly out The first identifier of service then subscribes to the newly-increased service from the Subscriber according to the first identifier, and in the API The newly-increased service is instantiated in the application container of gateway application;And it is locally configured according to dynamic configuration information update Information.
Optionally, the processing unit is also used to:
Before controlling the acquiring unit acquisition and information is locally configured, controls the acquiring unit and obtain static configuration letter Breath;The static configuration information includes the mark of global configuration information and offer service;
Global configuration is carried out to the distributed remote invocation framenort according to the global configuration information;
The mark of service is provided according to described, subscribes to the offer service from the Subscriber, and in the API net It closes in the application container of application and the offer service is provided;
Information is locally configured according to the mark determination that service is provided.
Optionally, the processing unit is also used to:
After information is locally configured described in updating according to the dynamic configuration information, the service for receiving service call side is asked It asks, includes the mark of service to be called in the service request;
According to the mark of the service to be called, from it is described be locally configured in information determine to be used to provide the described it is to be called The address of the service provider of service;
According to the address of the service provider and the API gateway application application container in instantiate after wait adjust With service, the service to be called is called from the service provider and returns to service response to the service call side.
Optionally, the processing unit is also used to:
Information and the dynamic configuration information is locally configured described in comparing, however, it is determined that delete the second identifier of service out, then The second identifier is recorded in and has been deleted in identification information;
The processing unit is also used to:
In the mark according to the service to be called, determine to be used to provide the described wait adjust in information from described be locally configured Before address with the service provider of service, according to the mark of the service to be called, determination is described to have deleted identification information In be not present the service to be called mark.
Correspondingly, the embodiment of the invention also provides a kind of calculating equipment, comprising:
Memory, for storing program instruction;
Processor executes above-mentioned API net according to the program of acquisition for calling the program instruction stored in the memory The method that the service of closing updates.
Correspondingly, the embodiment of the invention also provides a kind of computer-readable non-volatile memory medium, including computer Readable instruction, when computer is read and executes the computer-readable instruction, so that computer executes above-mentioned API gateway service The method of update.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of schematic diagram of system architecture provided in an embodiment of the present invention;
Fig. 2 is the flow diagram that a kind of API gateway provided in an embodiment of the present invention services update method;
Fig. 3 is the flow diagram that another API gateway provided in an embodiment of the present invention services update method;
Fig. 4 is the structural schematic diagram for the device that a kind of API gateway service provided in an embodiment of the present invention updates.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts All other embodiment, shall fall within the protection scope of the present invention.
Fig. 1 illustratively shows the embodiment of the present invention and provides the system tray that the method that API gateway service updates is applicable in Structure, the system architecture can be distributed remote invocation framenort, which may include service provider Cluster 110, Subscriber 120, API gateway cluster 130, load-balanced server 140, dynamic configuration server 150, API Gateway management platform 160 and API Calls side 170.
The service provider 111 that service provider cluster 110 provides identical API service by more forms, and provides in service When 111 application starting of side, its service provided can be registered to Subscriber 120, the record of Subscriber 120 there are all services The service identifiers of 111 service provided of provider and the address of corresponding with service provider 111.Subscriber 120 herein It can be understood as registration center, when the application of service provider 111 starts, its service provided can be registered to registration center.
API gateway cluster 130 is made of more API gateways 131, and it is (following that Web application is run on every API gateway 131 Referred to as API gateway application), API gateway application has verifying user right, receives HTTP request, processing, forwarding, calls remotely The functions such as service, returning response.When API gateway application starts, can subscribe to Subscriber 120 as service consumer is needed Service to be used, Subscriber 120 return to 111 address list of service provider to API gateway application and are buffered in by it In application memory, if service provider 111 has altered, Subscriber 120 can send change data and give API gateway application.
API gateway 131 externally provides the interface of http protocol.Primary complete api interface calling process is as follows: API tune HTTP request, the load balancing clothes that HTTP request first can be preposition by API gateway 131 are sent to API gateway 131 with side 170 Be engaged in device 140, load-balanced server 140 according in API gateway cluster 130 the case where more 131 load pressures of API gateway, HTTP request can be forwarded on a certain API gateway 131.The API gateway of this API gateway 131 is applied basis to be buffered in and is answered With the address list of the remote service in memory, soft load balance process, agreement and the parameter provided by far call frame After conversion, the service of practical a certain service provider 111 of far call offer.The response that service provider 111 returns is passed through After API gateway application is converted to http response message, API Calls side 170 is returned to.
API gateway manages platform 160 and provides visualization interface for user, and user can issue dynamic by visualization interface Configuration-direct instructs in dynamic configuration server 150 according to dynamic configuration and generates dynamic configuration information and store.
Based on foregoing description, Fig. 2 illustratively shows what a kind of API gateway service provided in an embodiment of the present invention updated The process of method, the process can be by above-mentioned API gateway application executions.
As shown in Fig. 2, the process specifically includes:
Step 201, information is locally configured using acquisition in API gateway.
In the embodiment of the present invention, API gateway is applied in initial start-up, available pre-configured static configuration letter Breath, the static configuration information can be XML format static information, wherein include global configuration information in the static configuration information And provide the mark of service;API gateway, which is applied, carries out global configuration to distributed remote invocation framenort according to global configuration information, Such as configure Subscriber, communication protocol;The mark for providing service refers to that the API gateway being currently configured is applied to API tune The mark serviced provided by side, API gateway apply the mark according to the offer service, subscribe to the offer from Subscriber Service, and the offer service is instantiated in the application container of API gateway application;Complete subscription service and instantiating services Afterwards, API gateway, which is applied, is locally configured information according to the mark mark of service (the be equivalent to provide) determination of the subscription service.This Place, instantiating services refer to that according to class and global configuration information, creation is specific in the application container of API gateway application uses In the object of offer service.
Information can be locally configured with timing acquisition in API gateway application, this be locally configured information i.e. API gateway apply according to from The mark determination of subscription service in Subscriber.Information is locally configured can be stored in the form of list is locally configured, This is locally configured list and is made of mark service provider corresponding with the mark of the subscription service address of subscription service.
Step 202, API gateway is applied from dynamic configuration server and obtains dynamic configuration information.
User can manage the visualization interface of platform when needing to be updated API gateway service by API gateway Dynamic configuration instruction is issued, dynamic configuration instruction applies the service subscribed to from Subscriber for changing API gateway, also It is the service provided for changing API gateway to API Calls side.Illustratively, user is when needing to increase newly some API service, Record, which can then be issued, the dynamic configuration instruction of mark of the newly-increased API service, and dynamic configuration server is according to dynamic configuration It instructs and the dynamic configuration information being locally stored is updated, which is increased in the dynamic configuration information.
Dynamic configuration information, format Key-Value can be stored using Redis in dynamic configuration server, wherein Key refers to that service identifiers of the API service in API gateway application, Value refer to the configuration information of the API service, such as most Big access duration may be different for the configuration information of API service according to different far call frames.Illustratively, dynamic Configuration information can be such that
{"apiservice1":"{\"serviceId\":\"api_service_id_1\",\"timeout\":\" 3000\"}","apiservice2":"{\"serviceId\":\"api_service_id_2\"}",}
In addition, dynamic configuration server can also use other Key-Value type databases to store dynamic configuration information, Such as Memcached.Key-Value type database, which can be improved API gateway and apply to obtain from dynamic configuration server, dynamically matches The speed of confidence breath.Certainly, dynamic configuration server can also use relevant database to store dynamic configuration information, such as MySQL, Oracle etc..
Step 203, API gateway application, which is compared, is locally configured information and dynamic configuration information, however, it is determined that increases service newly out First identifier then subscribes to newly-increased service from Subscriber according to first identifier, and real in the application container of API gateway application The newly-increased service of exampleization.
API gateway application, which is compared, is locally configured information and dynamic configuration information, in a kind of implementation, API gateway application If it is determined that information is locally configured less than dynamic configuration information, then the API for having newly-increased in current dynamic configuration information can be determined The service identifiers first identifier of service (namely newly-increased) of service, can be according to the service identifiers of the newly-increased API service, from ordering The subscription increased newly in server to the API service is read, and instantiates the newly-increased API service in application container.
Step 204, API gateway, which is applied, is locally configured information according to dynamic configuration information update.
Such as the process that Fig. 3 is the method that another API gateway service provided in an embodiment of the present invention updates, API gateway is answered With Spring frame and the realization of Magpie distributed remote service call frame has been used, dynamic configuration server passes through Redis To store dynamic configuration information.API gateway application on startup, obtains the static configuration information of XML format, API gateway application Spring container can load Bean example, complete Magpie frame global configuration, and to Subscriber subscription service.API After gateway application start completion, it is stored in memory using subscription service as information is locally configured.API gateway, which is applied, to be run In, the dynamic configuration information of a full dose is reacquired from Redis every 1 minute (time configurable), and is saved in memory The information that is locally configured be compared, if it find that newly-increased API service, then subscribe to the newly-increased API service from Subscriber And the Bean example for increasing API service newly is loaded onto Spring container.API gateway applies the dynamic according to reacquisition Information is locally configured in configuration information update.Information is locally configured it can be appreciated that being stored in the application memory of API gateway application In dynamic configuration information copy.
After API gateway is applied and information is locally configured according to dynamic configuration information update, service call side can receive Service request, wherein in the service request include service to be called mark, API gateway can according in service request to It calls the mark of service to call from service provider to service.Specifically, the service that API gateway application receives service call side is asked It asks, API gateway applies the mark according to service to be called, is determined in information from being locally configured for providing service to be called The address of service provider, API gateway are real using the address according to service provider and in the application container of API gateway application Service to be called after exampleization calls the service to be called from service provider and returns to service response to service call side.
In the embodiment of the present invention, API gateway application, which can also determine, is locally configured information more than dynamic configuration information, then may be used To determine to delete the service identifiers of some API service in current dynamic configuration information, then API gateway application determines that this is deleted Except the second identifier of service, and the second identifier is recorded in and has been deleted in identification information.This has been deleted in identification information and has recorded There are all marks for having deleted service, is used for when service is called by API gateway application by service call side, if API gateway is answered With determining that the service to be called is to have deleted the service recorded in identification information, then API gateway is applied and is returned to service call side Return error message.Having deleted identification information can be by having deleted the deletion logo collection that forms of mark, which can also be with It is called undercarriage set of service.Identification information has been deleted by setting, some API is deleted in determining dynamic configuration information When the service identifiers of service, the service identifiers of the API service can be added to having deleted in identification information, thus realization pair The undercarriage of API service.
In addition, API gateway not only can delete the by being recorded in second identifier to have deleted in identification information to realize The purpose of the corresponding service of two marks directly can also unsubscribe second mark according to the second identifier from Subscriber Know corresponding service, and goes to instantiate the corresponding service of the second identifier in API gateway application container.
In a kind of implementation, API gateway applies the mark according to service to be called, determines from being locally configured in information Before the address of service provider for providing service to be called, it is also necessary to which, according to the mark of service to be called, judgement has been deleted Except whether there is the mark of the service to be called in identification information, specifically, reading the mark of deletion of dynamic configuration server Information executes decision logic, judges that this has deleted the mark that whether there is the service to be called in identification information, if so, directly Return error message is connect, otherwise such as mistake HTTP response determines the clothes of service to be called according to the service identifiers of service to be called The address of business provider, and then call service to be called from service provider and return to service response to service call side.
In foregoing invention embodiment, information and dynamic configuration information is locally configured in API gateway acquisition, to information is locally configured It is compared with dynamic configuration information, however, it is determined that go out currently to have newly-increased service, then it is newly-increased to subscribe to this from Subscriber automatically The newly-increased service is serviced and instantiated in application container, can also be updated automatically according to the dynamic configuration information and letter be locally configured Breath.It is not necessary that updated static configuration information is manually replaced original static configuration information, and answered without restarting API gateway With the heat for realizing that API gateway is applied updates, and API gateway application can be made to be constantly in open state, meet service call side Calling demand.The flexibility of the service configuration of API gateway application is promoted, and realizes the high availability of API gateway, is reduced API gateway is a possibility that service call fails restarting process in short-term.
Based on the same inventive concept, Fig. 4 illustratively shows a kind of API gateway service provided in an embodiment of the present invention more The structure of new device, the device are suitable for the API gateway realized by distributed remote invocation framenort, which can execute The process for the method that API gateway service updates.
The device includes: acquiring unit 401 and processing unit 402;
Information is locally configured for obtaining in the acquiring unit 401;The information that is locally configured is API gateway application root Determining according to the mark of the service ordered by the Subscriber;
The acquiring unit 401 is also used to obtain dynamic configuration information from dynamic configuration server;The dynamic configuration letter Breath is generated after the dynamic configuration server is updated according to dynamic configuration instruction;The dynamic configuration instruction is for becoming The service more subscribed to from the Subscriber;
The processing unit 402, for information and the dynamic configuration information to be locally configured described in comparison, however, it is determined that go out new Increase the first identifier of service, then the newly-increased service is subscribed to from the Subscriber according to the first identifier, and described The newly-increased service is instantiated in the application container of API gateway application;And the local is updated according to the dynamic configuration information Configuration information.
Optionally, the processing unit 402 is also used to:
Before controlling the acquisition of acquiring unit 401 and information is locally configured, controls the acquiring unit 401 and obtain static state Configuration information;The static configuration information includes the mark of global configuration information and offer service;
Global configuration is carried out to the distributed remote invocation framenort according to the global configuration information;
The mark of service is provided according to described, subscribes to the offer service from the Subscriber, and in the API net It closes in the application container of application and the offer service is provided;
Information is locally configured according to the mark determination that service is provided.
Optionally, the processing unit 402 is also used to:
After information is locally configured described in updating according to the dynamic configuration information, the service for receiving service call side is asked It asks, includes the mark of service to be called in the service request;
According to the mark of the service to be called, from it is described be locally configured in information determine to be used to provide the described it is to be called The address of the service provider of service;
According to the address of the service provider and the API gateway application application container in instantiate after wait adjust With service, the service to be called is called from the service provider and returns to service response to the service call side.
Optionally, the processing unit 402 is also used to:
Information and the dynamic configuration information is locally configured described in comparing, however, it is determined that delete the second identifier of service out, then The second identifier is recorded in and has been deleted in identification information;
The processing unit 402 is also used to:
In the mark according to the service to be called, determine to be used to provide the described wait adjust in information from described be locally configured Before address with the service provider of service, according to the mark of the service to be called, determination is described to have deleted identification information In be not present the service to be called mark.
Based on the same inventive concept, the embodiment of the invention also provides a kind of calculating equipment, comprising:
Memory, for storing program instruction;
Processor executes above-mentioned API net according to the program of acquisition for calling the program instruction stored in the memory The method that the service of closing updates.
Based on the same inventive concept, the embodiment of the invention also provides a kind of computer-readable non-volatile memory medium, Including computer-readable instruction, when computer is read and executes the computer-readable instruction, so that computer execution is above-mentioned The method that API gateway service updates.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of application programming interface API gateway services update method, which is characterized in that suitable for passing through distributed remote The API gateway that invocation framenort is realized, which comprises
Information is locally configured using acquisition in API gateway;The information that is locally configured is that the API gateway applies basis to take from subscription The ordered mark determination serviced of business device;
The API gateway is applied from dynamic configuration server and obtains dynamic configuration information;The dynamic configuration information is described dynamic What state configuration server generated after being updated according to dynamic configuration instruction;The dynamic configuration instruction is ordered for changing from described Read the service of server subscription;
The API gateway application is relatively more described to be locally configured information and the dynamic configuration information, however, it is determined that increases service newly out First identifier is then subscribed to the newly-increased service from the Subscriber according to the first identifier, and is answered in the API gateway The newly-increased service is instantiated in application container;
The API gateway, which is applied, is locally configured information according to dynamic configuration information update.
2. the method as described in claim 1, which is characterized in that the API gateway is locally configured before information using acquisition, also Include:
The API gateway application obtains static configuration information;The static configuration information includes global configuration information and offer clothes The mark of business;
The API gateway, which is applied, carries out global configuration to the distributed remote invocation framenort according to the global configuration information;
The API gateway, which is applied, provides the mark of service according to described, subscribes to the offer service from the Subscriber, and The offer service is instantiated in the application container of API gateway application;
Information is locally configured described in applying the mark according to the offer service to determine in the API gateway.
3. the method as described in claim 1, which is characterized in that the API gateway is applied according to the dynamic configuration information more It is locally configured after information described in new, comprising:
The API gateway application receives the service request of service call side, includes the mark of service to be called in the service request Know;
The API gateway applies the mark according to the service to be called, determines from described be locally configured in information for mentioning For the address of the service provider of the service to be called;
The API gateway is real using the address according to the service provider and in the application container of API gateway application Service to be called after exampleization calls the service to be called from the service provider and returns to service response to the clothes Business called side.
4. method as claimed in claim 3, which is characterized in that further include;
The API gateway application is relatively more described to be locally configured information and the dynamic configuration information, however, it is determined that deletes service out The second identifier is then recorded in and has deleted in identification information by second identifier;
The API gateway applies the mark according to the service to be called, determines from described be locally configured in information for mentioning Before the address of the service provider of the service to be called, further includes:
The API gateway applies the mark according to the service to be called, determines that institute is not present in described deleted in identification information State the mark of service to be called.
5. the device that a kind of API gateway service updates, which is characterized in that suitable for what is realized by distributed remote invocation framenort API gateway, described device include: acquiring unit and processing unit;
Information is locally configured for obtaining in the acquiring unit;The information that is locally configured is that API gateway applies basis from subscription The ordered mark determination serviced of server;
The acquiring unit is also used to obtain dynamic configuration information from dynamic configuration server;The dynamic configuration information is institute It states after dynamic configuration server is updated according to dynamic configuration instruction and generates;The dynamic configuration instruction is for changing from institute State the service of Subscriber subscription;
The processing unit, for information and the dynamic configuration information to be locally configured described in comparison, however, it is determined that increase service newly out First identifier, then the newly-increased service is subscribed to from the Subscriber according to the first identifier, and in the API gateway The newly-increased service is instantiated in the application container of application;And letter is locally configured according to dynamic configuration information update Breath.
6. device as claimed in claim 5, which is characterized in that the processing unit is also used to:
Before controlling the acquiring unit acquisition and information is locally configured, controls the acquiring unit and obtain static configuration information; The static configuration information includes the mark of global configuration information and offer service;
Global configuration is carried out to the distributed remote invocation framenort according to the global configuration information;
The mark of service is provided according to described, subscribes to the offer service from the Subscriber, and answer in the API gateway The offer service is provided in application container;
Information is locally configured according to the mark determination that service is provided.
7. device as claimed in claim 5, which is characterized in that the processing unit is also used to:
After information is locally configured described in updating according to the dynamic configuration information, the service request of service call side is received, It include the mark of service to be called in the service request;
According to the mark of the service to be called, determine to be used to provide the described service to be called from described be locally configured in information Service provider address;
Clothes to be called after being instantiated according to the address of the service provider and in the application container of API gateway application Business calls the service to be called from the service provider and returns to service response to the service call side.
8. device as claimed in claim 7, which is characterized in that the processing unit is also used to:
Information and the dynamic configuration information is locally configured described in comparing, however, it is determined that delete the second identifier of service out, then by institute It states second identifier and is recorded in and deleted in identification information;
The processing unit is also used to:
In the mark according to the service to be called, determine to be used to provide the described clothes to be called from described be locally configured in information Before the address of the service provider of business, according to the mark of the service to be called, described deleted in identification information not is determined There are the marks of the service to be called.
9. a kind of calculating equipment characterized by comprising
Memory, for storing program instruction;
Processor requires 1 to 4 according to the program execution benefit of acquisition for calling the program instruction stored in the memory Described in any item methods.
10. a kind of computer-readable non-volatile memory medium, which is characterized in that including computer-readable instruction, work as computer When reading and executing the computer-readable instruction, so that computer executes such as the described in any item methods of Claims 1-4.
CN201910836986.9A 2019-09-05 2019-09-05 Method and device for updating API gateway service Active CN110493067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910836986.9A CN110493067B (en) 2019-09-05 2019-09-05 Method and device for updating API gateway service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910836986.9A CN110493067B (en) 2019-09-05 2019-09-05 Method and device for updating API gateway service

Publications (2)

Publication Number Publication Date
CN110493067A true CN110493067A (en) 2019-11-22
CN110493067B CN110493067B (en) 2022-02-18

Family

ID=68556710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910836986.9A Active CN110493067B (en) 2019-09-05 2019-09-05 Method and device for updating API gateway service

Country Status (1)

Country Link
CN (1) CN110493067B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995873A (en) * 2019-12-27 2020-04-10 美的集团股份有限公司 Gateway service interface discovery method, system, electronic device and storage medium
CN111049695A (en) * 2020-01-09 2020-04-21 深圳壹账通智能科技有限公司 Cloud gateway configuration method and system
CN111240832A (en) * 2019-12-31 2020-06-05 上海汇付数据服务有限公司 API management method and API gateway system
CN111338829A (en) * 2020-03-26 2020-06-26 口碑(上海)信息技术有限公司 Method and device for calling remote procedure call service
CN111343005A (en) * 2020-02-11 2020-06-26 杭州涂鸦信息技术有限公司 Method and system for quickly taking local automatic configuration into effect
CN111352872A (en) * 2020-02-20 2020-06-30 北京字节跳动网络技术有限公司 Execution engine, data processing method, apparatus, electronic device, and medium
CN111541561A (en) * 2020-04-09 2020-08-14 珠海格力电器股份有限公司 Microservice configuration information management system, microservice configuration information management method, microservice configuration information management server, and storage medium
CN111600807A (en) * 2020-04-14 2020-08-28 网宿科技股份有限公司 Flow control method and system based on API gateway equipment
CN112636986A (en) * 2020-12-29 2021-04-09 苏州思必驰信息科技有限公司 Gateway plug-in updating method and device
CN112953745A (en) * 2019-12-10 2021-06-11 顺丰科技有限公司 Service calling method, system, computer device and storage medium
CN113381866A (en) * 2020-02-25 2021-09-10 北京同邦卓益科技有限公司 Service calling method, device, equipment and storage medium based on gateway
CN113452617A (en) * 2021-06-24 2021-09-28 上海豹云网络信息服务有限公司 Dynamic gateway route management method, device and storage medium
CN114422358A (en) * 2022-01-26 2022-04-29 中国农业银行股份有限公司 API gateway configuration updating method and equipment
CN114610362A (en) * 2020-12-08 2022-06-10 中移(苏州)软件技术有限公司 Component upgrading method and device in OpenStack, computer storage medium and system
US20220256308A1 (en) * 2021-02-03 2022-08-11 Trackonomy Systems, Inc. Method for Remote Interaction of Assets with Cellular Device and System Thereof
EP4258620A1 (en) * 2022-04-06 2023-10-11 Beijing Xiaomi Mobile Software Co., Ltd. Invoking service method, device, and computer readable storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070165615A1 (en) * 2005-12-08 2007-07-19 Shin Young M Apparatus and method for notifying communication network event in application server capable of supporting open API based on Web services
CN101807204A (en) * 2010-03-05 2010-08-18 武汉大学 Dynamic creation method of processing Web service with remote sensing image
CN105827446A (en) * 2016-03-31 2016-08-03 深圳市金溢科技股份有限公司 Intelligent traffic API gateway and intelligent traffic service system
CN108173768A (en) * 2016-12-07 2018-06-15 北京京东尚科信息技术有限公司 For in method and apparatus of the gateway based on gateway configuration route service
CN108429645A (en) * 2018-03-05 2018-08-21 深圳乐信软件技术有限公司 A kind of configuration method of API gateway, device, storage medium and API gateway
CN108494755A (en) * 2018-03-13 2018-09-04 华为技术有限公司 A kind of method and device of transmission application Program Interfaces API request
CN108900329A (en) * 2018-06-21 2018-11-27 珠海宏桥高科技有限公司 Real-time dynamic forwarding method based on gateway infrastructure service
US10148493B1 (en) * 2015-06-08 2018-12-04 Infoblox Inc. API gateway for network policy and configuration management with public cloud
CN108965007A (en) * 2018-07-19 2018-12-07 北京车和家信息技术有限公司 API gateway interface configures update method and device
CN109218426A (en) * 2018-09-19 2019-01-15 福建南威软件有限公司 A kind of API gateway method of servicing for supporting webservice agreement to call
CN109951384A (en) * 2019-01-24 2019-06-28 无锡帮趣数据服务有限公司 A kind of application method of API gateway system flexible management

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070165615A1 (en) * 2005-12-08 2007-07-19 Shin Young M Apparatus and method for notifying communication network event in application server capable of supporting open API based on Web services
CN101807204A (en) * 2010-03-05 2010-08-18 武汉大学 Dynamic creation method of processing Web service with remote sensing image
US10148493B1 (en) * 2015-06-08 2018-12-04 Infoblox Inc. API gateway for network policy and configuration management with public cloud
CN105827446A (en) * 2016-03-31 2016-08-03 深圳市金溢科技股份有限公司 Intelligent traffic API gateway and intelligent traffic service system
CN108173768A (en) * 2016-12-07 2018-06-15 北京京东尚科信息技术有限公司 For in method and apparatus of the gateway based on gateway configuration route service
CN108429645A (en) * 2018-03-05 2018-08-21 深圳乐信软件技术有限公司 A kind of configuration method of API gateway, device, storage medium and API gateway
CN108494755A (en) * 2018-03-13 2018-09-04 华为技术有限公司 A kind of method and device of transmission application Program Interfaces API request
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
CN109218426A (en) * 2018-09-19 2019-01-15 福建南威软件有限公司 A kind of API gateway method of servicing for supporting webservice agreement to call
CN109951384A (en) * 2019-01-24 2019-06-28 无锡帮趣数据服务有限公司 A kind of application method of API gateway system flexible management

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953745A (en) * 2019-12-10 2021-06-11 顺丰科技有限公司 Service calling method, system, computer device and storage medium
CN112953745B (en) * 2019-12-10 2023-07-11 顺丰科技有限公司 Service calling method, system, computer device and storage medium
CN110995873A (en) * 2019-12-27 2020-04-10 美的集团股份有限公司 Gateway service interface discovery method, system, electronic device and storage medium
CN111240832A (en) * 2019-12-31 2020-06-05 上海汇付数据服务有限公司 API management method and API gateway system
CN111049695A (en) * 2020-01-09 2020-04-21 深圳壹账通智能科技有限公司 Cloud gateway configuration method and system
CN111343005B (en) * 2020-02-11 2024-01-30 杭州涂鸦信息技术有限公司 Method and system for quickly effecting local automation configuration
CN111343005A (en) * 2020-02-11 2020-06-26 杭州涂鸦信息技术有限公司 Method and system for quickly taking local automatic configuration into effect
CN111352872A (en) * 2020-02-20 2020-06-30 北京字节跳动网络技术有限公司 Execution engine, data processing method, apparatus, electronic device, and medium
CN113381866A (en) * 2020-02-25 2021-09-10 北京同邦卓益科技有限公司 Service calling method, device, equipment and storage medium based on gateway
CN111338829B (en) * 2020-03-26 2023-09-15 口碑(上海)信息技术有限公司 Calling method and device for remote procedure call service
CN111338829A (en) * 2020-03-26 2020-06-26 口碑(上海)信息技术有限公司 Method and device for calling remote procedure call service
CN111541561A (en) * 2020-04-09 2020-08-14 珠海格力电器股份有限公司 Microservice configuration information management system, microservice configuration information management method, microservice configuration information management server, and storage medium
CN111600807A (en) * 2020-04-14 2020-08-28 网宿科技股份有限公司 Flow control method and system based on API gateway equipment
CN114610362A (en) * 2020-12-08 2022-06-10 中移(苏州)软件技术有限公司 Component upgrading method and device in OpenStack, computer storage medium and system
CN112636986A (en) * 2020-12-29 2021-04-09 苏州思必驰信息科技有限公司 Gateway plug-in updating method and device
US20220256308A1 (en) * 2021-02-03 2022-08-11 Trackonomy Systems, Inc. Method for Remote Interaction of Assets with Cellular Device and System Thereof
CN113452617A (en) * 2021-06-24 2021-09-28 上海豹云网络信息服务有限公司 Dynamic gateway route management method, device and storage medium
CN113452617B (en) * 2021-06-24 2023-12-19 上海豹云网络信息服务有限公司 Dynamic gateway route management method, device and storage medium
CN114422358B (en) * 2022-01-26 2024-01-30 中国农业银行股份有限公司 API gateway configuration updating method and equipment
CN114422358A (en) * 2022-01-26 2022-04-29 中国农业银行股份有限公司 API gateway configuration updating method and equipment
EP4258620A1 (en) * 2022-04-06 2023-10-11 Beijing Xiaomi Mobile Software Co., Ltd. Invoking service method, device, and computer readable storage medium

Also Published As

Publication number Publication date
CN110493067B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN110493067A (en) A kind of method and device that API gateway service updates
CN106951233B (en) Mixed-mode smart phone application development framework system
CN109710236B (en) Service development and implementation method, device, platform and medium based on shared service
CN109087004B (en) Public workflow engine system based on domain model
US10481953B2 (en) Management system, virtual communication-function management node, and management method for managing virtualization resources in a mobile communication network
CN112118565A (en) Multi-tenant service gray level publishing method and device, computer equipment and storage medium
US20180332169A1 (en) Personalization of virtual assistant skills based on user profile information
WO2017167121A1 (en) Method and device for determining and applying association relationship between application programs
EP3757780B1 (en) Method and apparatus for service management
CN109995669A (en) Distributed current-limiting method, device, equipment and readable storage medium storing program for executing
CN104541246A (en) System and method for providing a service management engine for use with a cloud computing environment
CN103077024A (en) Device and method for supporting customization and running of software-as-a-service (SaaS) application processes
CN110532025A (en) Data processing method, device, equipment and storage medium based on micro services framework
CN108011846A (en) The method and device of management business in network function virtualization architecture
WO2019024679A1 (en) Method for upgrading network function and upgrade management entity
US20130339488A1 (en) Enterprise services framework for mobile devices
US20070162604A1 (en) Information processing method, information processing device, and program
CN106549796A (en) Resource control method and host node that a kind of firmware space is downloaded
CN107147806A (en) application resource providing method, device and system
CN114168179B (en) Micro-service management method, micro-service management device, computer equipment and storage medium
CN101727475A (en) Method, device and system for acquiring database access process
CN101115180A (en) Electronic program menu system and functional module dynamic load operating method
CN114546563A (en) Multi-tenant page access control method and system
CN117076473B (en) Metadata operation method, system, equipment and medium for SaaS multi-tenant
US20210089288A1 (en) Systems and methods for environment instantiation

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