CN114416314A - Service arrangement method based on API gateway - Google Patents
Service arrangement method based on API gateway Download PDFInfo
- Publication number
- CN114416314A CN114416314A CN202210053233.2A CN202210053233A CN114416314A CN 114416314 A CN114416314 A CN 114416314A CN 202210053233 A CN202210053233 A CN 202210053233A CN 114416314 A CN114416314 A CN 114416314A
- Authority
- CN
- China
- Prior art keywords
- service
- api gateway
- calling
- services
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to a service arranging method based on an API gateway, and belongs to the field of cloud computing. The invention comprises the following steps: according to specific calling requirements, carrying out standard constraint on services which need to be exposed to other systems for calling, and registering the services to an API gateway; creating a new service protocol on the API gateway in advance, and then uniformly arranging the related services by adopting a workflow way through the related services registered on the API gateway and a plug-in tool on the API gateway; and the output result after the arrangement is finished is packaged into a new service by the API gateway and is registered in a service list of the API gateway, and a service caller can call the service according to specific requirements. The invention is friendly to the front end, does not need to request for many times, does not need to change the front end under the condition of changing the old system, can make compatibility to the data through the gateway, has higher business response speed and can generate the service quickly compared with the traditional service architecture, and is more beneficial to the integral improvement of the office efficiency of the following government and enterprise staff.
Description
Technical Field
The invention belongs to the field of cloud computing, and particularly relates to a service arrangement method based on an API gateway.
Background
In a new era, the development of data drive is a new direction of change of government and enterprises, and the government and the enterprises can accelerate the release of data value and complete digital transformation only by continuously improving the internal informatization construction level. With the further prominent introduction of cloud technology and service role, the construction of an efficient and stable information system with foresight has become an urgent need for the development of numerous government and enterprises. Experience and achievement in the past government and enterprise information construction process are summarized, the government and enterprise work increasingly pays attention to content accuracy and process efficiency, however, problems of large quantity of process approval redundancy, repeated interface access and the like still exist in daily operation of various office systems, office efficiency of government and enterprise workers is greatly reduced, and the service arrangement method based on the API gateway can flexibly and efficiently solve the problems.
The API gateway mainly comprises 4 modules of API application, configuration management, monitoring and early warning and safety management. The API application module mainly provides functions of full life cycle management, service registration and discovery, request distribution, API release, gray release and the like for API services, and meets the use requirements of different application scenes; the configuration management module mainly provides functions of overtime fusing, cross-domain access, access control, service current limiting, multi-protocol API calling support, plug-in expansion support and the like, and provides fine-grained and multi-level API management service; the monitoring and early warning module monitors interface services registered on the API gateway from the global level, the application level and the single multi-level, mainly provides functions of API monitoring, API abnormity early warning, hot spot service statistics, log record pushing and the like, and provides support for safe and stable operation of the API; the safety module mainly provides functions of API authentication authorization, IP limitation, URL rewriting, multi-tenant management, user authority management and the like, and safety control capability of the API gateway is improved.
Therefore, the API gateway is the only entrance of the internal program of the external access system, facing a large amount of service forwarding, authentication and authorization, the API gateway is the intermediate platform of all external services, the original independent operation or repeated operation can be performed through customizing the extension event, the recombination of the services is performed after the rearrangement, a new service is constructed on the basis of the original service, the service bearing capacity of the system is enhanced, the maintenance and development cost is greatly reduced, and the response degree and the office efficiency of the page can be greatly improved while the completeness and the accuracy of content processing are ensured.
In addition, microservice as a new technology for deploying applications and services in the cloud has become a hot topic at present. Compared with the traditional architecture, the micro-service architecture depends more on realizing a complete business process through the cooperation among the micro-services, the cooperation is service arrangement, and by decomposing the application and the service into smaller and loosely coupled components and matching with the API gateway, the system application and the service can be developed, upgraded, expanded and deployed more easily.
Disclosure of Invention
Technical problem to be solved
The technical problem to be solved by the invention is how to provide a service arranging method based on an API gateway, so as to solve the problems that data exchange among a plurality of services exists for APP or Web application, most time is consumed in establishing connection because the data exchange is remote connection, in addition, due to the complexity and diversity of calling scenes, the service registered on the API gateway by a service provider often cannot meet the calling requirement of a service caller, and time and labor are wasted if a new service is redeveloped.
(II) technical scheme
In order to solve the technical problem, the invention provides a service arranging method based on an API gateway, which comprises the following steps:
s1, the service provider carries out standard constraint on the service which needs to be exposed to other systems for calling according to the specific calling requirement, and registers the service on the API gateway;
s2, the service provider firstly creates a new service protocol on the API gateway according to the specific calling requirement, specifies the service name, the parameter type and the calling mode, and then uniformly arranges the related services in a workflow mode through the plug-in tools on the API gateway, namely the service calling engine and the database operation engine;
and S3, packaging the output result into a new service by the API gateway and registering the new service in a service list of the API gateway after finishing the arrangement, and calling by the service caller according to specific requirements.
Further, the step S1 of performing specification constraint on the service includes checking whether a network protocol, a parameter type, and a calling manner of the service to be registered by the service registrar meet standards, registering and accessing the service meeting the standards as required, storing the callable information included in the service in a database, and providing a modification and upgrade requirement for the service not meeting the standards.
Further, the network protocol is an http protocol, the parameter type is a Json object, and the calling mode is a post request and a get request.
Further, the step S2 of creating a new service agreement on the API gateway in advance only includes the service shell.
Further, in the step S2, in the process of the orchestration, the whole process is run in the form of a workflow, which involves the participation, invocation, and auditing of a plurality of services inside and outside the service registrar system.
Further, the operations of the arrangement are filtering, moving, renaming, packing and unpacking.
Further, the step S3 specifically includes: and after the arrangement is finished, the API gateway packages the arrangement result into a new service and registers the new service in a service list of the API gateway, and the new service can be repeatedly called according to the subsequent calling requirements.
Further, the step S1 specifically includes: a request is sent in the personnel system, and various information details related to the request are called and returned through inputting names.
Further, the step S2 specifically includes: the service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, specifies service names, parameter types and calling modes, calls offices and telephone information services registered on the API gateway according to the requirements of the newly created service protocol, and uniformly arranges the services by using plug-in tools, namely a service calling engine and a database operation engine, on the gateway.
Further, the step S3 specifically includes: and the details of the personal information output after the arrangement are packaged into a new service by the API gateway and registered in a service list of the API gateway, and a service calling party can call the new service according to specific requirements.
(III) advantageous effects
The invention provides a service arranging method based on an API gateway, which has the beneficial effects that: compared with the traditional architecture, under the micro-service architecture, government and enterprise work can rely more on realizing a complete business process through cooperation among micro-services, and the cooperation is service arrangement. The invention uses the service arrangement method, can obtain the required data from various services rapidly, implement the fast response to the business; by using the API gateway technology, the system is expanded by a powerful self-defined plug-in system, and the service data can be adapted and compatible, so that the interaction cost of a service provider and a caller is reduced, and the whole service calling process is more complete and efficient. Above showing technological progress, having obtained good result of use in actual operation, greatly improved the office efficiency and the use experience of government and enterprise staff.
Drawings
FIG. 1 is a schematic diagram of the service orchestration method based on the API gateway according to the present invention;
fig. 2 is a flowchart of an embodiment of the service orchestration method based on the API gateway according to the present invention.
Detailed Description
In order to make the objects, contents and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
The invention relates to integrated application of an API gateway and flow arrangement of micro-services, in particular to a service arrangement method based on the API gateway, which mainly relates to the technical field of government and enterprise services.
The technical problem to be solved by the invention is as follows: for APP or Web application, data exchange among a plurality of services exists, most of time is consumed in establishing connection because the data exchange is remote connection, and in addition, due to the complexity and diversity of calling scenes, the service registered by a service provider on an API gateway often cannot meet the calling requirement of a service caller, and time and labor are wasted if new service is redeveloped.
The technical scheme of the invention is as follows: the service arranging method based on the API gateway comprises the following steps:
s1, the service provider carries out standard constraint on the service which needs to be exposed to other systems for calling according to the specific calling requirement, and registers the service on the API gateway;
s2, the service provider firstly creates a new service protocol on the API gateway according to the specific calling requirement, specifies the service name, the parameter type and the calling mode, and then performs unified arrangement on the related services by adopting a workflow mode through the related services registered on the API gateway, namely a service calling engine and a database operation engine, and plug-in tools on the API gateway;
and S3, packaging the output result into a new service by the API gateway and registering the new service in the service list of the API gateway after finishing the arrangement, wherein the service caller can call according to the specific requirement.
The step S1 specifically includes: carrying out standard constraint on services, including checking whether a network protocol, a parameter type and a calling mode of a service to be registered of a service registry meet standards or not, wherein the network protocol is an http protocol, the parameter type is a Json object, the calling mode is a post request and a get request, registering and accessing the services meeting the standards according to requirements, storing callable information contained in the services in a database, and providing a transformation and upgrade requirement for the services not meeting the standards;
the step S2 specifically includes: the method comprises the steps that a new service which is created in advance only comprises shells such as a service name and the like, registration and calling specifications are determined for the new service which is registered after subsequent arrangement, in the arrangement process, the whole process is operated in a workflow mode and relates to the participation, calling and auditing of a plurality of services inside and outside a service registrant system, and if the result of the service A can be used as the input of the service B and the like;
the step S3 specifically includes: and after the arrangement is finished, the API gateway packages the arrangement result into a new service and registers the new service in a service list of the API gateway, and the new service can be repeatedly called according to the subsequent calling requirements.
Example 1:
fig. 2 shows a service orchestration method based on an API gateway, which mainly implements the following steps:
the method comprises the following steps: service registration preparation and data verification
In the face of a plurality of service information details related to a call request, firstly, logic carding is carried out on the service information details, whether data information is complete or not and whether a service standard is standard or not are checked, and then the service information details are registered on an API gateway;
step two: new service agreement creation and service orchestration
The method comprises the following steps that a service provider firstly creates a new service protocol on an API gateway according to specific calling requirements, specifies a service name, a parameter type and a calling mode, then calls related services registered on the API gateway, and uniformly arranges the related services (including filtering, moving, renaming, packaging, unpacking and the like) in a workflow mode through plug-in tools, namely a service calling engine and a database operation engine, on the API gateway;
step three: service encapsulation and registration invocation
And the output result after the arrangement is finished is packaged into a new service by the API gateway and is registered in a service list of the API gateway, and a service caller can call the service according to specific requirements.
The invention relates to a service arranging method based on an API gateway, which adopts a service aggregation/splitting mode to uniformly manage the entrance, converts the original service data and encapsulates and creates a new service, thereby greatly reducing the service calling cost and the page response speed.
The following further describes the process of the present invention with reference to the specific examples and the accompanying drawings:
the first step is as follows: sending a request in a personnel system, calling and returning various information details related to the request by inputting a name;
the second step is that: the service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, and specifies a service name, a parameter type and a calling mode;
the third step: the service provider calls services such as office and telephone information registered on the API gateway according to the requirement of a newly created service protocol, and the services are uniformly arranged through plug-in tools, namely a service calling engine and a database operation engine, on the gateway;
the fourth step: and the details of the personal information output after the arrangement are packaged into a new service by the API gateway and registered in a service list of the API gateway, and a service calling party can call the new service according to specific requirements.
Example 2:
the service arranging method based on the API gateway comprises the following steps: firstly, carrying out standard constraint on services which need to be exposed to other systems for calling according to specific calling requirements, and registering the services to an API gateway; creating a new service protocol on the API gateway in advance, and then uniformly arranging the related services by using a workflow way through the related services registered on the API gateway and a plug-in tool on the API gateway; and thirdly, outputting the result after arrangement, packaging the result into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling the service by a service calling party according to specific requirements. .
Further, performing standard constraint on the service in the first step, including checking whether a network protocol, a parameter type and a calling mode of the service to be registered by the service registrant meet standards, wherein the network protocol is an http protocol, the parameter type is a Json object, the calling mode is a post and get request, performing registration access on the service meeting the standards according to requirements, storing the calling information contained in the service in a database, and providing a transformation and upgrade requirement for the service not meeting the standards;
furthermore, the new service created in advance in the second step only comprises shells such as service names and the like, registration and calling specifications are determined for the new service registered after subsequent arrangement, and in the arrangement process, the whole process runs in a workflow mode and relates to the participation, calling, auditing and the like of a plurality of services inside and outside the service registrant system;
further, the middle row of the third step is finished, the API gateway packages the arrangement result into a new service and registers the new service in the service list of the API gateway, and the call can be repeated according to the subsequent call requirement.
The invention has the beneficial effects that: compared with the traditional architecture, under the micro-service architecture, government and enterprise work can rely more on realizing a complete business process through cooperation among micro-services, and the cooperation is service arrangement. The invention uses the service arrangement method, can obtain the required data from various services rapidly, implement the fast response to the business; by using the API gateway technology, the system is expanded by a powerful self-defined plug-in system, and the service data can be adapted and compatible, so that the interaction cost of a service provider and a caller is reduced, and the whole service calling process is more complete and efficient. Above showing technological progress, having obtained good result of use in actual operation, greatly improved the office efficiency and the use experience of government and enterprise staff.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.
Claims (10)
1. A service arranging method based on an API gateway is characterized by comprising the following steps:
s1, the service provider carries out standard constraint on the service which needs to be exposed to other systems for calling according to the specific calling requirement, and registers the service on the API gateway;
s2, the service provider firstly creates a new service protocol on the API gateway according to the specific calling requirement, specifies the service name, the parameter type and the calling mode, and then uniformly arranges the related services in a workflow mode through the plug-in tools on the API gateway, namely the service calling engine and the database operation engine;
and S3, packaging the output result into a new service by the API gateway and registering the new service in a service list of the API gateway after finishing the arrangement, and calling by the service caller according to specific requirements.
2. The API gateway-based service orchestration method according to claim 1, wherein performing specification constraint on the service in step S1 includes checking whether a network protocol, a parameter type, and a calling manner of a service to be registered by the service registrar meet standards, performing registration access on the service meeting the standards as required, storing callable information included in the service in a database, and making a modification and upgrade requirement on the service not meeting the standards.
3. The API gateway-based service orchestration method according to claim 2, wherein the network protocol is an http protocol, the parameter type is a Json object, and the invocation means is post and get requests.
4. The API gateway-based service orchestration method according to any one of claims 1-3, wherein the preemptively creating a new service agreement on the API gateway in step S2 comprises only service shells.
5. The API gateway based service orchestration method according to claim 4, wherein in the orchestration process in step S2, the entire process is run in a workflow form involving the participation, invocation, and auditing of a plurality of services inside and outside the service registry system.
6. The API gateway based service orchestration method of claim 4, wherein the orchestration operations are filtering, moving, renaming, wrapping, and unwrapping.
7. The API gateway-based service orchestration method according to claim 5, wherein step S3 specifically comprises: and after the arrangement is finished, the API gateway packages the arrangement result into a new service and registers the new service in a service list of the API gateway, and the new service can be repeatedly called according to the subsequent calling requirements.
8. The API gateway-based service orchestration method according to claim 1, wherein step S1 specifically comprises: a request is sent in the personnel system, and various information details related to the request are called and returned through inputting names.
9. The API gateway-based service orchestration method according to claim 8, wherein step S2 specifically comprises: the service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, specifies service names, parameter types and calling modes, calls offices and telephone information services registered on the API gateway according to the requirements of the newly created service protocol, and uniformly arranges the services by using plug-in tools, namely a service calling engine and a database operation engine, on the gateway.
10. The API gateway-based service orchestration method according to claim 9, wherein step S3 specifically comprises: and the details of the personal information output after the arrangement are packaged into a new service by the API gateway and registered in a service list of the API gateway, and a service calling party can call the new service according to specific requirements.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210053233.2A CN114416314B (en) | 2022-01-18 | 2022-01-18 | Service arrangement method based on API gateway |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210053233.2A CN114416314B (en) | 2022-01-18 | 2022-01-18 | Service arrangement method based on API gateway |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114416314A true CN114416314A (en) | 2022-04-29 |
| CN114416314B CN114416314B (en) | 2023-01-10 |
Family
ID=81274365
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210053233.2A Active CN114416314B (en) | 2022-01-18 | 2022-01-18 | Service arrangement method based on API gateway |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114416314B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115242629A (en) * | 2022-06-29 | 2022-10-25 | 浪潮通信技术有限公司 | Data aggregation method and device based on API gateway |
| CN116016042A (en) * | 2023-01-09 | 2023-04-25 | 河南垂天科技有限公司 | Dynamic component expansion implementation method based on API gateway |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111245916A (en) * | 2020-01-07 | 2020-06-05 | 苏宁云计算有限公司 | Service invocation method, service orchestration method and device based on microservice gateway |
| CN111610979A (en) * | 2020-04-15 | 2020-09-01 | 河南大学 | An API gateway optimized for persistence and coupling and its method |
| CN112953745A (en) * | 2019-12-10 | 2021-06-11 | 顺丰科技有限公司 | Service calling method, system, computer device and storage medium |
| CN113037830A (en) * | 2021-03-04 | 2021-06-25 | 浪潮云信息技术股份公司 | Micro-service API (application program interface) arranging method and system based on gateway |
| US20210336788A1 (en) * | 2020-04-24 | 2021-10-28 | Netapp, Inc. | Management services api gateway |
| CN113595788A (en) * | 2021-07-28 | 2021-11-02 | 上海华兴数字科技有限公司 | API gateway management method and device based on plug-in |
-
2022
- 2022-01-18 CN CN202210053233.2A patent/CN114416314B/en active Active
Patent Citations (6)
| 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 |
| CN111245916A (en) * | 2020-01-07 | 2020-06-05 | 苏宁云计算有限公司 | Service invocation method, service orchestration method and device based on microservice gateway |
| CN111610979A (en) * | 2020-04-15 | 2020-09-01 | 河南大学 | An API gateway optimized for persistence and coupling and its method |
| US20210336788A1 (en) * | 2020-04-24 | 2021-10-28 | Netapp, Inc. | Management services api gateway |
| CN113037830A (en) * | 2021-03-04 | 2021-06-25 | 浪潮云信息技术股份公司 | Micro-service API (application program interface) arranging method and system based on gateway |
| CN113595788A (en) * | 2021-07-28 | 2021-11-02 | 上海华兴数字科技有限公司 | API gateway management method and device based on plug-in |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115242629A (en) * | 2022-06-29 | 2022-10-25 | 浪潮通信技术有限公司 | Data aggregation method and device based on API gateway |
| CN115242629B (en) * | 2022-06-29 | 2024-11-19 | 浪潮通信技术有限公司 | Data aggregation method and device based on API gateway |
| CN116016042A (en) * | 2023-01-09 | 2023-04-25 | 河南垂天科技有限公司 | Dynamic component expansion implementation method based on API gateway |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114416314B (en) | 2023-01-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109246251B (en) | Micro-service calling method, device, system, equipment and readable storage medium | |
| CN107147704B (en) | block chain-oriented universal service middleware system | |
| CN110908658B (en) | Micro-service and micro-application system, data processing method and device | |
| CN103854168B (en) | Isomery flow process is pending focuses on method and processing means | |
| CN100479564C (en) | Method and system for realizing separation of service platform and gate | |
| CN101472140B (en) | System for distributing and requiring multimedia program and implementing method thereof | |
| CN110738454A (en) | enterprise management platform system | |
| CN112256248B (en) | Intelligent cloud low-code platform capable of achieving starting effect | |
| CN114416314B (en) | Service arrangement method based on API gateway | |
| CN101207838A (en) | Message forwarding based on sender-receiver relationship | |
| CN102799460B (en) | A kind of business development system, method and service operation system, method | |
| WO2010130165A1 (en) | Method and system for generating open telecommunication service based on internet | |
| CN105786913A (en) | Cloud manufacturing platform oriented ERP integrated database service interface encapsulation system and method | |
| CN114338682B (en) | Flow identity identification transmission method and device, electronic equipment and storage medium | |
| CN113709221A (en) | API management and API gateway calling method | |
| CN114666113A (en) | Dynamic response data desensitization method based on API gateway | |
| CN104240070A (en) | Data release service system and method | |
| CN103685572B (en) | Method and system for building data center management platform based on SOA (service-oriented architecture) | |
| CN114793191A (en) | Internet of things integration system and method based on domain model | |
| CN100388665C (en) | Telecommunication network calling centre system and its implementing method | |
| WO2023125773A1 (en) | Global exception handling method and platform in large-scale micro-service cluster scenario | |
| CN101299186A (en) | Method and device for calling portlet service | |
| CN104217003A (en) | Data modeling system | |
| CN113890891A (en) | Data sharing interaction method and device of energy cloud network | |
| CN110442421A (en) | A kind of generic service conversion method and system based on Kubernetes |
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 |