CN117729262A - Gateway service arrangement method, device, equipment and storage medium - Google Patents
Gateway service arrangement method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN117729262A CN117729262A CN202311720417.0A CN202311720417A CN117729262A CN 117729262 A CN117729262 A CN 117729262A CN 202311720417 A CN202311720417 A CN 202311720417A CN 117729262 A CN117729262 A CN 117729262A
- Authority
- CN
- China
- Prior art keywords
- service
- flow
- gateway
- message
- target field
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000008520 organization Effects 0.000 claims description 9
- 230000015556 catabolic process Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 7
- 238000006731 degradation reaction Methods 0.000 claims description 7
- 238000010367 cloning Methods 0.000 claims description 2
- 238000012423 maintenance Methods 0.000 abstract description 4
- 230000006978 adaptation Effects 0.000 description 21
- 230000008569 process Effects 0.000 description 18
- 241000282836 Camelus dromedarius Species 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 238000004043 dyeing Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 230000009471 action Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 235000010627 Phaseolus vulgaris Nutrition 0.000 description 2
- 244000046052 Phaseolus vulgaris Species 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 230000008521 reorganization Effects 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a gateway service arrangement method, a device, equipment and a storage medium, which are applied to the technical field of micro-services, wherein the method is characterized in that a flow node is created for each service registered in a gateway, and the attribute of the corresponding service is configured in the flow node so as to realize the binding of the flow node and the corresponding service; arranging and connecting the flow nodes based on the service scenes, and defining the connection relation of the flow nodes according to the service triggering conditions to obtain a service flow chart of each service scene; and generating service arrangement configuration based on the service flow chart, and binding the service arrangement configuration with the API interface of the corresponding service scene so as to call the service according to the service arrangement configuration when calling the API interface. Compared with the prior art, the method has the advantages that a large amount of codes do not need to be written for service arrangement, the efficiency is high, and the maintenance is simple.
Description
Technical Field
The present invention relates to the field of micro services, and in particular, to a gateway service orchestration method, device, apparatus, and computer readable storage medium.
Background
With the continuous improvement of the informatization degree of enterprises, the application of systems inside the enterprises is more and more, the system service is more and more complex, and the implementation of a micro-service architecture is more and more common. Micro-services are an architecture scheme for building applications, which can be split into multiple core functions, unlike traditional monolithic schemes. Each function is referred to as a service and can be built and deployed separately, meaning that the services do not affect each other when working (and failing).
In a micro-service architecture, orchestration refers to the process of organizing the work of individual components and application layers. Compared with the traditional architecture, the micro-service architecture is more dependent on realizing a complete business flow through cooperation among the micro-services, and the cooperation is service arrangement. The current service arrangement mode generally realizes the arrangement of micro services by writing codes according to service scenes by developers, and the mode realized by the codes has large service volume and is not beneficial to maintenance.
Disclosure of Invention
The invention aims to provide a gateway service arrangement method, a device, equipment and a storage medium, which are applied to the technical field of micro-services.
In order to solve the above technical problems, the present invention provides a gateway service orchestration method, including:
creating a flow node for each service registered in the gateway, and configuring the attribute of the corresponding service in the flow node to realize the binding of the flow node and the corresponding service;
arranging and connecting the flow nodes based on service scenes, and defining the connection relation of the flow nodes according to service triggering conditions to obtain a service flow chart of each service scene;
and generating service arrangement configuration based on the service flow chart, and binding the service arrangement configuration with an API interface of a corresponding service scene so as to call the service according to the service arrangement configuration when the API interface is called.
Optionally, when the API interface is called, the calling the service according to the service orchestration configuration includes:
when a service request message corresponding to the service scene is received, extracting a first target field and a first target field value in the service request message, and storing the first target field and the first target field value in a data pool;
performing message organization through the first target field and the first target field value in the data pool to generate a service call message;
calling the service request message to correspond to an API interface, and calling the service according to the service arrangement configuration bound by the API interface through the service call message;
when a service return message of the service is received, extracting a second target field and a second target field value in the service return message, and storing the second target field and the second target field value in the data pool;
performing message organization based on the second target field and the second target field value in the data pool to generate a channel return message;
and sending the channel return message to a channel corresponding to the service request message. Optionally, the method further comprises:
cloning the service to be cloned in the service to obtain a cloned service, and marking the cloned service by color;
when a service request message with the color label is received, the clone service with the same color label is invoked.
Optionally, the method further comprises:
after receiving a service request message sent by a channel, checking access rights of the channel;
and when the access authority check is passed, carrying out message authentication on the service request message.
Optionally, the method further comprises:
and performing flow control and fusing degradation on the channel and the server based on the Sentinel component.
Optionally, the configuring the attribute of the corresponding service in the flow node includes:
and configuring the service type, the service name and the service parameter corresponding to the service in the flow node.
Optionally, the service flow diagram is generated by a vue-super-flow component.
In order to solve the above technical problems, the present invention provides a gateway service orchestration device, including:
a first module, configured to create a flow node for each service registered in the gateway, and configure an attribute of a corresponding service in the flow node to implement binding between the flow node and the corresponding service;
the second module is used for arranging and connecting the flow nodes based on service scenes, defining the connection relation of the flow nodes according to service triggering conditions and obtaining a service flow chart of each service scene;
and the third module is used for generating service arrangement configuration based on the service flow chart, and binding the service arrangement configuration with an API interface corresponding to the service scene so as to call the service according to the service arrangement configuration when the API interface is called.
In order to solve the above technical problems, the present invention provides a gateway service orchestration device, including:
a memory for storing a computer program;
a processor for implementing any one of the gateway service orchestration methods when executing the computer program.
To solve the above technical problem, the present invention provides a computer readable storage medium, in which computer executable instructions are stored, which when executed by a processor, implement any one of the gateway service orchestration methods.
Therefore, the invention establishes a flow node for each service registered in the gateway, and configures the attribute of the corresponding service in the flow node so as to realize the binding of the flow node and the corresponding service; arranging and connecting the flow nodes based on the service scenes, and defining the connection relation of the flow nodes according to the service triggering conditions to obtain a service flow chart of each service scene; and generating service arrangement configuration based on the service flow chart, and binding the service arrangement configuration with the API interface of the corresponding service scene so as to call the service according to the service arrangement configuration when calling the API interface. Compared with the prior art, the method has the advantages that a large amount of codes do not need to be written for service arrangement, the efficiency is high, and the maintenance is simple.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a gateway service orchestration method according to an embodiment of the present invention;
fig. 2 is a gateway configuration diagram according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a process layout mode according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a channel message and system message structure according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating an exemplary service flow provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of a component execution flow according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a service dyeing process according to an embodiment of the present invention;
FIG. 8 is a schematic flow dyeing flow chart provided in an embodiment of the present invention;
fig. 9 is a schematic diagram of a gateway function according to an embodiment of the present invention;
fig. 10 is a block diagram of a gateway service orchestration device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a gateway service orchestration method according to an embodiment of the present invention, where the method may include:
s101: and creating a flow node for each service registered in the gateway, and configuring the attribute of the corresponding service in the flow node to realize the binding of the flow node and the corresponding service.
In this embodiment, firstly, service distribution and channel registration can be performed in a gateway, and configuration is required in the gateway through a Console interface in the process of service distribution and channel registration, where the Console interface is a configuration interface of the gateway, and configuration content can be as shown in fig. 2, and service configuration and system configuration of a system (service end) to which the service belongs are required in the process of service distribution; in the channel registration process, channel configuration, API (Application Programming Interface ) configuration, and channel access authority configuration may be performed.
The system configuration may include a system communication protocol configuration and a system common header configuration; the service configuration may include service basic information, service URL (Uniform Resource Locator ) and service message configuration; channel configuration may include: channel certificate public key and channel public message header configuration; the API configuration may include service call flow orchestration, service message configuration; the channel access rights configuration may include channel access API rights maintenance.
In this embodiment, the service arrangement manner may first create a flow node for each service registered in the gateway, and configure an attribute of the corresponding service in the flow node, so as to implement binding between the flow node and the corresponding service. The embodiment is not limited to a specific manner of configuring the attribute of the corresponding service in the flow node, and generally, a service type (serviceType), a service name (service), and a service parameter (parameter) used by the gateway service may be configured in the flow node.
S102: and arranging and connecting the flow nodes based on the service scenes, and defining the connection relation of the flow nodes according to the service triggering conditions to obtain a service flow chart of each service scene.
The embodiment can arrange and connect the flow nodes based on the service scenes, define the connection relation of the flow nodes according to the service triggering condition, and obtain the service flow chart of each service scene. The embodiment is not limited to a specific manner of generating the service flow chart, and the service flow chart can be generated through a vue-super-flow component, and vue-super-flow is a component of a generating and previewing flow chart.
The process arrangement of the service in this embodiment is generally divided into three modes: channel adaptation mode, service adaptation mode and pass-through mode, support the call of many gateway services and many remote services in the channel adaptation mode, support the call of many gateway services and single remote service in the service adaptation mode, support the call of single remote service only in the pass-through mode, its example can be as shown in figure 3.
Channel message adaptation mode is generally used when the message formats and contents of channels and services are inconsistent; the service message adaptation mode is generally used when the channel and the message format of the service are consistent and the content is inconsistent; the pass-through mode is typically used when the channel and service message formats and content are identical. The embodiment does not limit the specific mode of channel message adaptation and service message adaptation, and the embodiment can adapt the message based on the data pool, so that path configuration is not required to be carried out for each field in the adaptation process, and the message adaptation process is simplified.
The embodiment does not limit the specific way of message adaptation, and the same field can be directly mapped when the message formats of channels and services are completely consistent; because the data to be adapted is stored in the data pool, when the message fields are consistent but the structures are inconsistent, the same fields can be mapped directly; when the message fields and the structures are inconsistent, aliases can be added to the fields in the service message, the fields in the channel message are mapped to the fields with the same aliases in the service message, and particularly as shown in fig. 4, when the channel message is completely consistent with the system message, the values of the same fields in the data pool can be directly mapped, for example, the values in the ReqNo, reqDt, reqTm, custNm, age and Addr fields in the channel message can be directly mapped to the same fields in the system message; when the fields are consistent but the structures are inconsistent, if the path of the channel message is/RequsetHeader/Requsetbbody, but the path of the system message is/Header/Body, because the fields and the field values are stored in the data pool in the embodiment, the values of the same fields in the data pool can be directly mapped without path configuration; when the fields of the message and the structure field are inconsistent, the field name in the channel message can be added to the corresponding field of the system message in the form of an alias, for example, the field ReqDt in the channel message can be used as the alias of the field ReqDate in the system message, the field ReqTm can be used as the alias of the field ReqTime, and the field CustNm can be used as the alias of the field CustName. In the process of data organization, data in a data pool can be mapped to fields with the same aliases so as to complete data adaptation.
The service triggering condition in this embodiment is a condition that needs to be met when executing the corresponding service, such as the channel adaptation mode in fig. 3, after the gateway service 1 is executed, the remote service 1 can be executed only when the service executing condition 1 needs to be met, where the service executing condition 1 is the service executing condition of the remote service 1; after the gateway service 1 is executed, the remote service 2 can be executed only if the service execution condition 2 is satisfied, and the service execution condition 2 is the service execution condition of the remote service 2. Each service may have a service execution condition, and when the service execution condition content is empty, the service may be directly executed. The present embodiment can define the connection relationship between the flow nodes by the service execution condition.
S103: and generating service arrangement configuration based on the service flow chart, and binding the service arrangement configuration with the API interface of the corresponding service scene so as to call the service according to the service arrangement configuration when calling the API interface.
The service orchestration configuration may be generated based on a service flowchart, and the service orchestration configuration in the present embodiment may include a plurality of components, and a structural example of each component may be as follows:
Flow:
{
FlowId: flow number,
service-name of service,
serviceType: service type (gateway service/remote service),
param: service parameters (gateway service usage),
the service trigger condition is the expr,
next flow { next component },
subflow { branching component },
}
each service Flow chart can correspond to a service arrangement configuration, the service arrangement configuration comprises a plurality of component flows, the components form the service arrangement configuration in a nested mode, and the content in the components can be description of information of each Flow node in the service Flow chart, such as a Flow number of the service Flow chart to which the Flow node belongs, an attribute (service name, service type and service parameter) of a service bound by the Flow node and a service triggering condition in a connection relation of the Flow node.
There are also next flows and subFlows in each component that describe the connection relationship between the components. Since each flow node in this embodiment may correspond to one component, in this embodiment, the next flow and the subflow of the components may be determined according to the connection relationship of each flow node in the service flow chart, and this embodiment is not limited to a specific determination manner, and when a certain flow node is simultaneously connected to a plurality of branch nodes, the component corresponding to the plurality of branch nodes is the subflow of the component corresponding to the flow node, as shown in fig. 5, the flow node 4 and the flow node 5 are branch nodes of the flow node 2, and the component corresponding to the flow node 4 and the flow node 5 is the subflow of the component corresponding to the flow node 2.
The embodiment does not limit the determination manner of the next flow corresponding to a certain component, the next flow in the embodiment may be a non-branch component, first, each path pointing to the target flow node is found, and when only one path exists, the component corresponding to the target flow node is determined to be the next flow of the component corresponding to the flow node closest to the target flow node; when there are multiple paths, determining a flow node that exists in the multiple paths at the same time and is closest to the target flow node, determining a component corresponding to the target flow node as a next flow of the component corresponding to the flow node, for example, in fig. 5, a path pointing to the flow node 6 includes: a flow node 1, a flow node 3 and a flow node 6; a flow node 1, a flow node 2, a flow node 4 and a flow node 6; flow node 1, flow node 2, flow node 5, and flow node 6. In the paths, the flow node 1 is a node that exists in each path at the same time and is closest to the flow node 6, and the component corresponding to the flow node 6 is the next flow of the flow node 1.
In this embodiment, each component has the same format and exists in a nested form, so that each component needs to be executed recursively in the process of executing the component, the first executed component is the outermost component in the service flow configuration, the corresponding flow node is the first flow node in the service flow chart, when executing a certain component, the current service bound by the current component is called according to the expr, and if the expr is empty, the current service bound by the component can be directly called; if the current component has the subflow, traversing and executing the subflow; if the current component has a next flow, execute the next flow (execute the next flow after executing the subflow when the subflow and the next flow exist simultaneously).
The specific component calling mode can be as shown in fig. 6, firstly, executing Flow and calling the service bound in the Flow; further judging whether the non-executed subflow exists in the Flow, and if so, executing a component corresponding to the subflow; if the unexecuted sub Flow does not exist, judging whether unexecuted next Flow exists in the Flow; if yes, executing the next flow; if not, execution ends. The execution flow of each component is the same and is described above.
In this embodiment, after generating the service orchestration configuration based on the service flowchart, an API interface of each service scenario may be created, and the API interface and the corresponding service orchestration configuration are bound, so that when the API interface is called, the service is called according to the service orchestration configuration, and a specific call manner may be as follows:
when a service request message corresponding to a service scene is received, extracting a first target field and a first target field value in the service request message, and storing the first target field and the first target field value in a data pool;
carrying out message organization through a first target field and a first target field value in a data pool to generate a service call message;
calling the API corresponding to the service request message, and configuring the calling service according to the service arrangement bound by the API through the service calling message;
when a service return message of the service is received, extracting a second target field and a second target field value in the service return message, and storing the second target field and the second target field value in a data pool;
performing message organization based on a second target field and a second target field value in the data pool to generate a channel return message;
and sending the channel return message to the channel corresponding to the service request initiating message.
In this embodiment, the first target field value, the second target field and the second target field value are fields required for performing message adaptation, in the process of performing message adaptation, message analysis is required to be performed to extract the target field and the target field value, and the process of message adaptation is required to call a preset message configuration, and analysis and reorganization of the message are realized through the message configuration, so as to implement message adaptation.
Further, in this embodiment, in order to implement gray release and blue-green deployment, the embodiment may perform dyeing processing on the traffic of the gateway, clone the service to be cloned in the service to obtain a clone service, and color mark the clone service; when a service request message with a color tag is received, a clone service with the same color tag is invoked.
In this embodiment, the specific manner of service dyeing is not limited, and generally, as shown in fig. 6, a service end may initiate a service dyeing request to a Console interface, after the Console interface receives the request, clone a new service from a baseline service (a service registered in advance in a Gateway) and mark a color, the Console pushes the configuration of the cloned new service to the Gateway (Gateway), and the Gateway writes the received configuration into a file and loads the file into a memory and feeds back a service dyeing result to the service end.
In this embodiment, the specific manner of performing the flow dyeing is not limited, and generally, as shown in fig. 7, the channel may initiate a request to Gateway first, after the Gateway receives the request, determine whether the flow is dyed, if the flow is dyed, initiate a request to the dyed server after obtaining a dyeing service configuration (color mark of the flow), if there is no dyeing service configuration, initiate a request to the undyed server, and after obtaining the undyed service configuration, initiate a request to the undyed server, and the Gateway responds to the processing result of the server to the channel.
Further, in this embodiment, after receiving the service request message sent by the channel, access authority checking may be performed on the channel, and after the access authority checking passes, message authentication may be performed on the service request message, so as to ensure service security.
In this embodiment, the channel and the service end may be further controlled and fused for degradation based on a Sentinel component, which is a high-availability traffic protection component facing the distributed service architecture. In this embodiment, the flow control and fuse degradation of the client may be performed from multiple dimensions, where the multiple dimensions may include: all channel initiated service request messages, service request messages calling a specified API interface, service request messages initiated by a specified channel and service request messages calling a specified API interface.
In this embodiment, the flow control and the fusing degradation of the server may also be performed from multiple dimensions, where the multiple dimensions may include: service request message initiated by specified channel+service request message for calling specified service, service request message initiated by specified channel+service end request message for calling specified service end, and request messages of all calling service ends.
In this embodiment, various functions of the gateway, such as access control, authority checking, and service calling, may be implemented based on processors (processors) of the Camel route, which bind each Processor to the Camel route to complete route sequence definition, and execute in accordance with the sequence of the Camel route definition during transaction flow, where the Camel route is an open-source Java programming language integration and message routing framework, and the processors refer to components that process messages in the route, and may convert, filter, route, aggregate, and other functions. The functions of the gateway are shown in fig. 9, and the overall flow of the service request can be completed through the functions of the gateway, firstly, the channel request, namely the service request message sent by the channel, is received through the Camel communication component, the channel request is analyzed, and the channel access authority and the message authentication are checked; the flow protection processing is regulated through the Camel route, and the flow control and fusing degradation strategy is implemented; message adaptation processing is called up through a Camel route, channel requests are analyzed, and message organization is carried out; the call method comprises the steps that a Camel route call flow executing component identifies the service type of a call service, when the call service is a local service, the local service can be called in a bean call mode, and a bean method is a common programming technology and is used for creating and managing objects; when the calling service is a remote service, message adaptation processing can be started through a Camel route, and a remote service request message is organized; the Camel route calls the remote service call component, and a request is initiated to the remote service through the Camel communication component after the remote service protocol is adapted; after the remote service responds, the Camel route calls up the message adaptation process, analyze the service and return the message; when the execution step of the flow component has an unexecuted flow, invoking the sub-flow to continue the execution of the flow component until the whole execution of the corresponding component is completed; the message adaptation processing is called up, and the service return message is organized to obtain a channel return message; and responding the channel return message to the channel to complete the channel request.
Based on the embodiment, the service is bound with the flow nodes, the service flow chart is generated by arranging the flow nodes, and the service arrangement configuration is generated based on the service flow chart, so that the service arrangement is realized.
The following is a specific embodiment of a gateway service orchestration method provided by the present invention, where the specific embodiment may include:
creating a flow node for each service registered in the gateway, and configuring the service type, service name and service parameter of the corresponding service in the flow node to realize the binding of the flow node and the corresponding service;
arranging and connecting the flow nodes based on each service scene, and defining the connection relation of the flow nodes according to service triggering conditions to obtain a service flow chart of each service scene;
the construction component is used for describing the basic information and connection relation of the flow nodes, and each flow node in the service flow chart corresponds to one component;
nesting all components corresponding to the service flow chart to obtain corresponding service arrangement configuration; the nesting mode is realized based on the connection relation of each flow node;
and generating an API interface of each service scene, and binding the service arrangement configuration with the corresponding API interface.
With reference to fig. 10, fig. 10 is a block diagram of a gateway service orchestration device according to an embodiment of the present invention, where the device may include:
a first module 100, configured to create a flow node for each service registered in the gateway, and configure an attribute of the corresponding service in the flow node to implement binding between the flow node and the corresponding service;
a second module 200, configured to schedule and connect the flow nodes based on service scenarios, and define connection relationships of the flow nodes according to service trigger conditions, so as to obtain a service flow chart of each service scenario;
and a third module 300, configured to generate a service orchestration configuration based on the service flowchart, and bind the service orchestration configuration with an API interface of a corresponding service scenario, so that the service is invoked according to the service orchestration configuration when the API interface is invoked.
Based on the embodiment, the service is bound with the flow nodes, the service flow chart is generated by arranging the flow nodes, and the service arrangement configuration is generated based on the service flow chart, so that the service arrangement is realized.
Based on the above embodiment, the third module 300 may include:
the first unit is used for extracting a first target field and a first target field value in the service request message when the service request message corresponding to the service scene is received, and storing the first target field and the first target field value in a data pool;
a second unit, configured to generate a service call message by performing message organization on the first target field and the first target field value in the data pool;
a third unit, configured to call an API corresponding to the service request message, and call the service according to the service orchestration configuration bound by the API through the service call message;
a fourth unit, configured to extract a second target field and a second target field value in the service return message when a service return message of the service is received, and store the second target field and the second target field value in the data pool;
a fifth unit, configured to organize messages based on the second target field and the second target field value in the data pool to generate channel return messages;
and a sixth unit, configured to send the channel return message to a channel corresponding to the service request message.
Based on the above embodiments, the apparatus may further include:
a fourth module, configured to clone a service to be cloned in the services to obtain a cloned service, and color-label the cloned service;
and a fifth module, configured to invoke the clone service with the same color label when receiving a service request message with the color label.
Based on the above embodiments, the apparatus may further include:
a sixth module, configured to perform access right inspection on a channel after receiving a service request message sent by the channel;
and a seventh module, configured to perform message authentication on the service request message after the access right check passes.
Based on the above embodiments, the apparatus may further include:
and an eighth module, configured to perform flow control and fusing degradation on the channel and the server based on the Sentinel component.
Based on the above embodiments, the first module 100 may include:
and a seventh unit, configured to configure a service type, a service name and a service parameter corresponding to the service in the flow node.
Based on the above embodiments, the service flow diagram is generated by the vue-super-flow component.
Based on the above embodiment, the present invention further provides a gateway service orchestration device, where the device may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided in the above embodiment when calling the computer program in the memory. Of course, the device may also include various necessary network interfaces, power supplies, and other components, etc.
The invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by an execution terminal or a processor can implement the method provided by the embodiment of the invention; the storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A gateway service orchestration method, comprising:
creating a flow node for each service registered in the gateway, and configuring the attribute of the corresponding service in the flow node to realize the binding of the flow node and the corresponding service;
arranging and connecting the flow nodes based on service scenes, and defining the connection relation of the flow nodes according to service triggering conditions to obtain a service flow chart of each service scene;
and generating service arrangement configuration based on the service flow chart, and binding the service arrangement configuration with an API interface of a corresponding service scene so as to call the service according to the service arrangement configuration when the API interface is called.
2. The gateway service orchestration method according to claim 1, wherein the invoking the service according to the service orchestration configuration when invoking the API interface comprises:
when a service request message corresponding to the service scene is received, extracting a first target field and a first target field value in the service request message, and storing the first target field and the first target field value in a data pool;
performing message organization through the first target field and the first target field value in the data pool to generate a service call message;
calling the service request message to correspond to an API interface, and calling the service according to the service arrangement configuration bound by the API interface through the service call message;
when a service return message of the service is received, extracting a second target field and a second target field value in the service return message, and storing the second target field and the second target field value in the data pool;
performing message organization based on the second target field and the second target field value in the data pool to generate a channel return message;
and sending the channel return message to a channel corresponding to the service request message.
3. The gateway service orchestration method according to claim 1, further comprising:
cloning the service to be cloned in the service to obtain a cloned service, and marking the cloned service by color;
when a service request message with the color label is received, the clone service with the same color label is invoked.
4. The gateway service orchestration method according to claim 1, further comprising:
after receiving a service request message sent by a channel, checking access rights of the channel;
and when the access authority check is passed, carrying out message authentication on the service request message.
5. The gateway service orchestration method according to claim 1, further comprising:
and performing flow control and fusing degradation on the channel and the server based on the Sentinel component.
6. The gateway service orchestration method according to claim 1, wherein configuring attributes of corresponding services in the flow node comprises:
and configuring the service type, the service name and the service parameter corresponding to the service in the flow node.
7. The gateway service orchestration method according to claim 1, wherein the service flow graph is generated by a vue-super-flow component.
8. A gateway services orchestration device, comprising:
a first module, configured to create a flow node for each service registered in the gateway, and configure an attribute of a corresponding service in the flow node to implement binding between the flow node and the corresponding service;
the second module is used for arranging and connecting the flow nodes based on service scenes, defining the connection relation of the flow nodes according to service triggering conditions and obtaining a service flow chart of each service scene;
and the third module is used for generating service arrangement configuration based on the service flow chart, and binding the service arrangement configuration with an API interface corresponding to the service scene so as to call the service according to the service arrangement configuration when the API interface is called.
9. A gateway services orchestration device, comprising:
a memory for storing a computer program;
a processor for implementing the gateway service orchestration method according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor implement the gateway service orchestration method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311720417.0A CN117729262A (en) | 2023-12-14 | 2023-12-14 | Gateway service arrangement method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311720417.0A CN117729262A (en) | 2023-12-14 | 2023-12-14 | Gateway service arrangement method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117729262A true CN117729262A (en) | 2024-03-19 |
Family
ID=90210076
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311720417.0A Pending CN117729262A (en) | 2023-12-14 | 2023-12-14 | Gateway service arrangement method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117729262A (en) |
-
2023
- 2023-12-14 CN CN202311720417.0A patent/CN117729262A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11157915B2 (en) | Automatic creation and configuration of license models and policies | |
US8856735B2 (en) | System and method of generating REST2REST services from WADL | |
CN111930372B (en) | Service arrangement solution method and system realized through draggable flow chart | |
US8321498B2 (en) | Policy interface description framework | |
JP4069114B2 (en) | Dynamic late combining of third-party on-demand services on an on-demand basis | |
US20080289012A1 (en) | System and method for creating, executing, and mapping service | |
US20090182645A1 (en) | Provisioning Web Services | |
CN113037831B (en) | Service gateway message processing method and device | |
CN101729491A (en) | Method, device and system for enhancing application reliability of script-based business | |
CN111010417A (en) | Data format conversion method, response system and method based on kong | |
CN101174983B (en) | System and method for managing a plurality of web services | |
CN114268628A (en) | Networking method, system, equipment and storage medium of cross-block chain service platform | |
US10397342B2 (en) | Web service contract selection | |
CN117729262A (en) | Gateway service arrangement method, device, equipment and storage medium | |
EP2517439B1 (en) | Method for coordinating the provision of a composite service | |
CN111061723B (en) | Workflow realization method and device | |
WO2023066053A1 (en) | Service request processing method, network device and computer-readable storage medium | |
CN114710311B (en) | Multi-project message management method and system | |
Falcarin et al. | Communication web services and JAIN-SLEE integration challenges | |
Bessler et al. | An orchestrated execution environment for hybrid services | |
Kryvinska et al. | Conceptual framework for services creation/development environment in telecom domain | |
US11061747B2 (en) | API coordination device, API coordination method and API coordination program | |
Sakata et al. | A method for composing process of nondeterministic web services | |
Hao | Toward a unified service delivery process for next‐generation services | |
Baseline | Service Architecture |
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 |