CN115550425A - Business process arrangement method facing microservice - Google Patents

Business process arrangement method facing microservice Download PDF

Info

Publication number
CN115550425A
CN115550425A CN202211149479.6A CN202211149479A CN115550425A CN 115550425 A CN115550425 A CN 115550425A CN 202211149479 A CN202211149479 A CN 202211149479A CN 115550425 A CN115550425 A CN 115550425A
Authority
CN
China
Prior art keywords
service
micro
instance
interaction
name
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
Application number
CN202211149479.6A
Other languages
Chinese (zh)
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.)
CETC 28 Research Institute
Original Assignee
CETC 28 Research Institute
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 CETC 28 Research Institute filed Critical CETC 28 Research Institute
Priority to CN202211149479.6A priority Critical patent/CN115550425A/en
Publication of CN115550425A publication Critical patent/CN115550425A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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
    • 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/0876Aspects of the degree of configuration automation
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a micro-service oriented business process arrangement method, which comprises the following steps: constructing a dynamic arrangement method of the business process microservices based on a configuration center; micro service code instrumentation, addressing and change notification of micro service data sending object; defining the compliance of the micro-service interaction relation in the service system and the interaction relation and the interaction mode of the micro-service in a specific service process based on the configuration center; before the business process is started, the compliance of the micro-service interaction relation in the process is verified through the micro-service instance interaction rule, and the micro-service instance is started and managed by using kubernentes, so that the instance can obtain a sending object of business data through corresponding registration information of a configuration center, and the dynamic arrangement of the business process is completed.

Description

Business process arrangement method for micro service
Technical Field
The invention relates to a micro-service oriented business process arrangement method.
Background
With the development of technologies such as containers and container clouds and the maturity of open-source software such as docker and kubernets, the development, operation and maintenance of large-scale distributed systems have gradually transitioned to solutions based on "container cloud + micro services".
Based on a container technology, a software service module is packaged into a container mirror image, the container mirror image is downloaded to a certain physical or virtual computing node in a distributed system through container arrangement tools such as kubernets and the like, and a corresponding software function instance is started on the node through the mirror image, so that the work of life cycle management, health check, copy scale control and the like of the software instance can be realized.
Based on the micro-service idea, the fine-grained splitting of a complex service system can be realized, functional modules in the service system are decoupled with each other, each service runs in an independent container instance, the services are communicated with each other by adopting a lightweight communication mechanism, the services are constructed around the specific service, and the services can be independently deployed to a production environment, a similar production environment and the like.
The technical means can better solve the problem of software function arrangement on the basic platform level of system software, namely, the problems of distributed scheduling, high availability, load balancing and the like of the system are solved from the platform layer by utilizing the characteristics of light weight and rapid operation and deployment of containers and the management capability of kubernets on large-scale containers, and the technical architecture of container cloud and micro-service is widely applied to the business fields of e-commerce, industrial automation control, finance and the like, so that the separation of business functions and non-business functions is realized, developers of business software can concentrate on business logic, and the non-business logic of load balancing, high availability guarantee and the like of the system is delivered to the container cloud platform for realization.
However, the above technical architecture does not have the capability of arranging the business in the "business layer", that is, the interactive relationship and the interactive form among the micro services constituting the business function of the actual system are generally directly specified in the code, and cannot be dynamically defined and adjusted, for example, in the e-commerce business system, a coupon function after a user places an order needs to be dynamically added, the function needs to call the information of the user to acquire data such as user member level, accumulated consumption amount, and the like, generally, after the user information acquisition is completed, a business person needs to manually adjust the business logic, add the user information acquisition service between the order generation service and the commodity settlement service, and adjust the business input and output relationship among the order generation service, the user information acquisition service and the commodity settlement service, and a means for automatically arranging the business process input and output information is lacked.
Disclosure of Invention
The invention aims to: the invention aims to provide a business process arrangement method for a specific software business function based on a container aiming at a technical architecture of 'container cloud + micro-service', and dynamically and flexibly determines the interaction relation and the interaction mode of micro-service of a business layer aiming at specific system business layer logic on the basis of the existing container arrangement, thereby quickly constructing and deploying a specific business system.
The method comprises the following steps:
step 1, establishing a distributed micro-service operation support cluster environment based on a mature open-source software product solution;
step 2, performing micro-service code instrumentation, injecting service flow interaction control codes into service codes, and performing automatic compiling and releasing to realize control of service flow interaction relation;
step 3, configuring the interaction rule and the interaction relation of the micro-service of the service layer in the central storage service flow through a distributed software coordination mechanism;
and 4, dynamically acquiring a sending object of service instance service data during micro-service operation through the instrumentation code after the service flow is started and the micro-service is operated in an instancing manner, and dynamically acquiring a changed sending target address through the configuration center when the sending object of the micro-service instance data is changed.
The step 1 comprises the following steps: the service program is packaged into micro-services through a docker container, distributed docker container examples (namely micro-service examples) are arranged and managed through kubernets, and finally, zookeeper is used as a configuration center and a distributed coordination control center to form a complete micro-service containerization treatment environment.
The step 2 comprises the following steps: and dynamically acquiring a service flow corresponding to the micro-service instance when the micro-service instance runs through the instrumentation code, and sending an address of a micro-service instance service data packet under the service flow.
In step 2, the instrumentation code comprises two parts, wherein the first part is that more than two micro-service instances can be started by one micro-service and are used in different service flows, so that the flow name of the micro-service instance is obtained through an environment variable when a program is started; the second part is to register and monitor the key of the configuration center through a callback mechanism, the name of the key is named as 'nextadr/process name/communication protocol name', the key value is the destination micro service name of the service data transmission, and the service data transmission object of the embodiment in the corresponding process is obtained by the key name and the key value and the change of the transmission object is monitored.
The step 3 comprises the following steps: the method comprises the following steps of configuring a center to store micro-service interaction rules and interaction relations through a distributed software coordination mechanism, wherein the interaction rules refer to: according to the interface transmission protocol and data format exposed from the micro-service to the outside, judging which micro-services are allowed to receive and transmit information, and judging which micro-services the transmitting end and the receiving end respectively correspond to; the interaction relationship means: under the definition of an actual business process, the information transceiving relation among the micro services determines the specific business process through the business process relation of a manual arrangement system, and the micro service instance management is carried out through a mature micro service containerization management environment (such as kubernets).
The step 3 comprises the following steps: system developers define all compliant micro-service interaction relations and interaction protocols in a service system, namely, the micro-service interface network protocol and a transmission data format are taken as the basis to judge what micro-services can realize the receiving and sending of messages; and business personnel define the business data receiving and sending relation among the microservices under a specific business process from the business perspective of the system.
Step 4 comprises the following steps: through the business process and the data sending object key value pair data of the micro-service instance configured in the configuration center, the micro-service instance can obtain the sending address of the micro-service instance business data during running and is informed when the sending address changes.
Step 4, starting and managing a micro-service instance through kubernets, firstly verifying the compliance of micro-service interaction relations in the process, respectively comparing each micro-service communication relation in the process with rules in an interaction rule base, if the comparison is successful, generating micro-service interaction relations related to the process according to the step 3, and writing the micro-service interaction relations into a configuration center, otherwise, not starting the service process; and then automatically generating a yaml file of kubernets, defining a default and a service object, and executing the written yaml file to start a micro-service instance, wherein the following rules are followed when the yaml file is generated:
firstly, adding a container started environment variable setting to describe a business process name, wherein the name is fixed to FLOW, and the value is a specific process name;
secondly, naming rules of kubernets service objects corresponding to the micro-service example are as follows: process name-microservice name;
thirdly, the label matching rule of the deployment and service objects is as follows: FLOW = FLOW name and app = microservice name.
Step 4, after the micro-service instance is started, acquiring a sending object instance of micro-service instance service data through a configuration center, acquiring a corresponding network address in a network address resolution component of kubernets through an instance name, and sending the service data according to the network address when the micro-service instance needs to send the service data in the operation process; and after the business process is changed, if the sending object is changed, the value written into the configuration center is synchronously changed, a callback function is triggered, and the micro-service instance updates the sending address of the business data.
The technical idea for realizing the invention is as follows: performing instrumentation in a business microservice code, wherein the instrumentation code is used for subscribing a network sending or calling address in a business process; the configuration center maintains the interaction relation and the interaction mode among the micro-services aiming at the specific service process, after the process deployment is operated, the container instance corresponding to the micro-services can obtain the network sending address of the container instance through the value and the change of the corresponding field of the configuration center, and therefore the arrangement of the micro-service interaction relation is completed through the configuration center.
Compared with the prior art, the invention has the following remarkable advantages: when the system is designed based on the micro-service idea and is realized based on the container cloud architecture, the method can flexibly define and modify the interaction relation and the interaction mode among the micro-services, thereby realizing the dynamic arrangement and adjustment of the business process on the business level.
Drawings
The foregoing and/or other advantages of the invention will become more apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
FIG. 1 is a schematic diagram of the system architecture of the present invention.
FIG. 2 is a schematic diagram of a microservice code instrumentation method.
FIG. 3 is a schematic diagram of a data structure representation method of a configuration center with respect to microservice interaction relationship rules.
FIG. 4 is a schematic diagram of a representation method of a microservice interaction relationship data structure of a configuration center with respect to a specific business process.
FIG. 5 is a schematic illustration of a business process deployment process.
Fig. 6 is a schematic diagram of the micro-service example performing the service data sending object addressing process after the service flow is deployed.
Detailed Description
The method comprises the following steps:
step 1, establishing a distributed micro-service operation support cluster environment based on a mature open-source software product solution;
step 2, performing micro-service code instrumentation, injecting service flow interaction control codes into service codes, and performing automatic compiling and releasing to realize control of service flow interaction relation;
step 3, configuring the interaction rule and the interaction relation of the micro-service of the service layer in the central storage service flow through a distributed software coordination mechanism;
and 4, dynamically acquiring a service instance service data transmitting object during micro-service operation through the instrumentation code after the service process is started and the micro-service is operated in an installization manner, and dynamically acquiring a changed transmitting target address through the configuration center when the micro-service instance data transmitting object is changed.
The step 1 comprises the following steps: the service program is packaged into micro-services through a docker container, distributed docker container examples (namely micro-service examples) are arranged and managed through kubernets, and finally, zookeeper is used as a configuration center and a distributed coordination control center to form a complete micro-service containerization treatment environment.
The step 2 comprises the following steps: and dynamically acquiring a service flow corresponding to the micro-service instance when the micro-service instance runs through the instrumentation code, and sending an address of a micro-service instance service data packet under the service flow.
In step 2, the instrumentation code comprises two parts, wherein the first part is that more than two microservice instances can be started by one microservice service and are used in different service flows, so that the flow name of the microservice instance is obtained through an environment variable when a program is started; the second part is to register and monitor the key of the configuration center through a callback mechanism, the name of the key is named as 'nextadr/process name/communication protocol name', the key value is the destination micro service name of the service data transmission, and the service data transmission object of the embodiment in the corresponding process is obtained by the key name and the key value and the change of the transmission object is monitored.
The step 3 comprises the following steps: the method comprises the following steps of configuring a center to store micro-service interaction rules and interaction relations through a distributed software coordination mechanism, wherein the interaction rules refer to: according to the interface transmission protocol and data format exposed from the micro-service to the outside, judging which micro-services are allowed to receive and transmit information, and judging which micro-services the transmitting end and the receiving end respectively correspond to; the interaction relationship means: under the definition of an actual business process, the information transceiving relation among the micro services determines the specific business process through the business process relation of a manual arrangement system, and the micro service instance management is carried out through a mature micro service containerization management environment (such as kubernets).
The step 3 comprises the following steps: system developers define all compliant micro-service interaction relations and interaction protocols in a service system, namely, the micro-service interface network protocol and a transmission data format are taken as the basis to judge what micro-services can realize the receiving and sending of messages; and business personnel define the business data receiving and sending relation among the microservices under a specific business process from the business perspective of the system.
Step 4 comprises the following steps: through the business process and the data sending object key value pair data of the micro-service instance configured in the configuration center, the micro-service instance can obtain the sending address of the micro-service instance business data during running and is informed when the sending address changes.
Step 4, starting and managing a micro-service instance through kubernets, firstly verifying the compliance of micro-service interaction relations in the process, respectively comparing each micro-service communication relation in the process with rules in an interaction rule base, if the comparison is successful, generating micro-service interaction relations related to the process according to the step 3, and writing the micro-service interaction relations into a configuration center, otherwise, not starting the service process; and then automatically generating a yaml file of kubernets, defining a default and a service object, and executing the written yaml file to start a micro-service instance, wherein the following rules are followed when the yaml file is generated:
firstly, adding a container started environment variable setting to describe a business process name, wherein the name is fixed to FLOW and the value is a specific process name;
secondly, naming rules of kubernets service objects corresponding to the micro-service example are as follows: process name-microservice name;
thirdly, the label matching rule of the deployment and service objects is as follows: FLOW = FLOW name and app = microservice name.
Step 4, after the micro-service instance is started, acquiring a sending object instance of micro-service instance service data through a configuration center, acquiring a corresponding network address in a network address resolution component of kubernets through an instance name, and sending the service data according to the network address when the micro-service instance needs to send the service data in the running process; and after the business process is changed, if the sending object is changed, the value written into the configuration center is synchronously changed, a callback function is triggered, and the micro-service instance updates the sending address of the business data.
Examples
In this embodiment, a typical application scenario of the present invention is described first: taking a public opinion collection and summary analysis application system as an example, the system needs to collect various social contact and video APP topics, comments and other information in various regions and carries out refinement analysis to form a public opinion trend product, and the system requires customized comparison analysis to the public opinions of various original collection points, such as comparing the public opinion trends of region 1 and region 2, or comparing the public opinion trends of APP1 and APP2, combining region groups and APP user portraits, and forming a further analysis conclusion. The system adopts a distributed different-place deployment mode, public opinion extraction micro-services and public opinion analysis micro-services are deployed for each APP to be extracted in the area where original public opinion collection is needed, a regional public opinion fusion service is deployed in each region, public opinion trend analysis comparison aiming at the regions is realized, one region is selected among the regions, a cross-regional public opinion fusion service is deployed, and further analysis, refinement and summarization of the regional public opinion trends are realized. The system has typical requirements that according to hot public sentiments and hot areas thereof, designated areas, APP public sentiment collection and trend analysis are flexibly and customizably carried out to form public sentiment products with regional characteristics and APP user portrait characteristics, and various newly developed APP public sentiment collection and analysis micro services are reserved to access interfaces of the system, wherein various APPs or public sentiment extraction and analysis micro services in each area can be dynamically accessed to the system to collect data or be disconnected from the system according to actual needs. In the traditional distributed service application, if the above requirements need to be realized, a local system generally needs to be shut down, and a manager configures a data flow distribution strategy for a server, which is long in time consumption and complex in process and can affect continuous operation of services.
As shown in fig. 1, the architecture diagram of the present invention is shown, and in combination with fig. 1, the technical architecture of the present invention described in step 1 of the present invention mainly comprises the following components, wherein zookeeper is used as a configuration center for writing in static microservice business layer interaction rules and microservice instance IP addresses, and providing storage of microservice interaction relationships and change notification callback capability; using kubernets as an operation supporting environment of the micro-service instance, constructing and managing a distributed PC or server cluster, using the distributed PC or server cluster as a computing node of a micro-service containerization governance environment, and operating the micro-service instance; and self-research business process arrangement tools are used for defining micro-service interaction rules and arranging business process interaction relations.
With reference to fig. 2, the service code instrumentation described in step 2 of the present invention performs instrumentation and normalization on a service code during development of a micro-service program, where the instrumentation code mainly includes two parts, and firstly, because one micro-service can start more than two micro-service instances and be used in different service flows, when the program is started, the process name to which the micro-service instance belongs is obtained through an environment variable; and secondly, registering and monitoring a path of the zookeeper through a callback mechanism, wherein the name of the path is named as 'nextadr/process name/communication protocol name', the value of the path is the destination micro-service name for transmitting the service data, and the set of the path and the value acquire the service data transmission object of the instance in the corresponding process and monitor the change of the transmission object. The instrumentation code is that when the network communication is processed, the IP address of the sending object is not directly filled, but the IP address is dynamically obtained from the DNS according to the name of the sending micro service. Taking instrumentation code shown in the figure as an example, firstly defining an instrumentation environment variable 'G _ FLOW' at a service program initialization position, dynamically acquiring a service process name in the running process of a micro-service program instance through the variable, 'CallBackFunc' as an instrumentation registration callback function, subscribing data center configuration, acquiring the instance name of the next interactive service instance when the service data of the service instance in the process needs to interact with other service instances, storing the instance name by using a global variable, and triggering the callback function to update the value by a notification mechanism of a configuration center when the value changes; secondly, where the program involves data interaction, the network address is obtained from the next microservice instance name from the DNS from that name.
Referring to fig. 3, the "micro service interaction rule" described in step 3 of the present invention is formally expressed, the micro service interaction rule indicates that all micro services that can communicate with each other in the service system form a communication relationship and a combination of communication protocols thereof, and the storage and expression rules of the micro service interaction rule in the present invention are: each interaction rule is stored by using a zonokeer's znode, wherein the key is ' actRule/source microservice/destination microservice ', and the corresponding value is a communication protocol name. For example, the key is "act/microService-a/microService-B", the value is "udp", which indicates that the transmission of udp packets from microService "microService-a" to "microService-B" is compliant, and the key is "act/microService-C/microService-D", the value is "http", which indicates that the http request from microService "microService-a" to "microService-B" is compliant.
Referring to fig. 4, the "micro service interaction relationship" described in step 3 of the present invention is formally expressed, and for a specific service process, the storage and expression rule of the micro service interaction relationship is that each interaction relationship is stored by a zonoeper's znode, where path is "nextadr/process name/source micro service/protocol name", and value is "process name-destination micro service". For example, the path is "nextadr/flowA/microService-a/udp", the value is "flowA-microService-B", which indicates that there is a udp packet from the microService "microService-a" to "microService-B" in the service flow to send a service instance with the object of "microService-B", and the path is "nextadr/microService-C/http", the value is "flowA-microService-D", which indicates that there is an http request from the microService "to" microService-C "in the service flow, and the request object is an instance of the microService-D. In fact, after the value naming rule is defined as "flow name-target micro service", when a kubernets yaml file of a container instance corresponding to a micro service is generated, kubernets service objects corresponding to a target micro service instance are named by the same naming rule, so that a source micro service instance can perform DNS addressing through the names of the kubernets service objects.
With reference to fig. 5, for the "dynamically obtaining the sending object of the service instance service data during the micro service operation through the instrumentation code after the micro service is instantiated and operated" in step 4 of the present invention, the present invention starts and manages the micro service instance through kubernets, first, the compliance of the micro service interaction relationship in the flow is verified, that is, each micro service communication relationship in the flow is compared with the rule in the interaction rule base, if the comparison can be successful, the micro service interaction relationship related to the flow is generated according to step 3, and is written into the configuration center, otherwise, the service flow is not started. Secondly, defining the default and service objects by automatically generating a yaml file of kubernets, and executing the written yaml file to start a micro-service instance, wherein the following rules are required to be followed when the yaml file is generated: 1) Adding an environment variable set started by a container, describing a business process name, fixing the name as "FLOW", and setting the value as a specific process name; 2) The naming rule of the kubernets service object corresponding to the micro service instance is 'flow name-micro service name'; 3) The tag matching rules for the deployment and service objects are "flow = flow name" and "app = microservice name".
With reference to fig. 6, for the obtaining of the sending address after the specific change when the data sending object of the micro-service instance changes in step 4 of the present invention, after the micro-service instance is started, the sending object instance of the micro-service instance service data is obtained through the configuration center, the corresponding network address is obtained in the DNS component of kubernetes through the instance name, the name of the started service process is set to be "EXAMPLE", two micro-service instances "instant a" and "instant B" are started, the instance "instant a" generates message interaction with the instance "instant B" through the UDP protocol, then the initial state configuration center storage strip is in the form of "nextdr/exle/instant a/UDP = instant B", after the micro-service instance is started, the instance a first obtains the interaction rule through the configuration center (in the "initial 1" process in the figure), then analyzes the interaction rule, and obtains the network address of the instance B from the DNS service according to the "instant B" initial 2 "process in the interaction rule (in the figure), and finally obtains the network address of the instance a" UDP data interaction rule through the "UDP" 3 "interaction data" process in the UDP "interaction protocol B" (fig. 3); when the service flow changes, if the sending object changes, the value written into the configuration center changes synchronously, the callback function is triggered, and the micro-service instance can update the sending address of the service data after receiving the change. Now, suppose that the flow "EXAMPLE" changes, the microservice instance "InstanceC" is started, and the interaction relationship changes to the instance "InstanceA" and generates message interaction with the instance "InstanceC" through UDP protocol, at this time, the configuration center stores content change, notifies the corresponding changed content to the instance a through a trigger (the "change 1" process in the figure), and the instance a receives the interaction relationship change notification of the configuration center and notifies the "change 2" process in the figure, after the instance a obtains the received notification, the interaction rule is parsed, the network address of the instance C is obtained from DNS service according to the "InstanceC" in the interaction rule (the "change 3" process in the figure), and finally, the instance a interacts service data with the instance B through UDP protocol, and completes the flow change (the "change 4" process in the figure).
In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, where the computer storage medium is capable of storing a computer program, and the computer program may run the inventive content of the microservice-oriented business process orchestration method provided by the present invention and some or all steps in each embodiment when executed by the data processing unit. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
It is clear to those skilled in the art that the technical solutions in the embodiments of the present invention can be implemented by means of a computer program and its corresponding general-purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a computer program or a software product, where the computer program or the software product may be stored in a storage medium and include instructions for enabling a device (which may be a personal computer, a server, a single chip microcomputer, an MUU, or a network device) including a data processing unit to execute the method according to the embodiments or some parts of the embodiments of the present invention.
The invention provides a microservice-oriented business process arrangement method, and a plurality of methods and ways for implementing the technical scheme, and the above description is only a preferred embodiment of the invention, and it should be noted that, for those skilled in the art, a plurality of improvements and embellishments can be made without departing from the principle of the invention, and these improvements and embellishments should also be regarded as the protection scope of the invention. All the components not specified in this embodiment can be implemented by the prior art.

Claims (9)

1. A business process arranging method facing micro service is characterized by comprising the following steps:
step 1, establishing a distributed micro-service operation support cluster environment;
step 2, performing micro-service code instrumentation, injecting service flow interaction control codes into the service codes, and performing automatic compiling and releasing to realize control of service flow interaction relation;
step 3, configuring the interaction rule and the interaction relation of the micro-service of the service layer in the central storage service flow through a distributed software coordination mechanism;
and 4, dynamically acquiring a sending object of service instance service data during micro-service operation through the instrumentation code after the service flow is started and the micro-service is operated in an instancing manner, and dynamically acquiring a changed sending target address through the configuration center when the sending object of the micro-service instance data is changed.
2. The method of claim 1, wherein step 1 comprises: and the service program is packaged into micro-service through a docker container, the distributed docker container examples are arranged and managed through kubernets, and finally, the zookeeper is used as a configuration center and a distributed coordination control center to form a complete micro-service containerization treatment environment.
3. The method of claim 2, wherein step 2 comprises: and dynamically acquiring a service process corresponding to the micro-service instance when the micro-service instance runs through the instrumentation code, and sending an address of a micro-service instance service data packet under the service process.
4. The method according to claim 3, wherein in step 2, the instrumentation code includes two parts, and the first part is to obtain the name of the process to which the micro-service instance belongs through the environment variable when the program is started; the second part is to register and monitor the key of the configuration center through a callback mechanism, wherein the name of the key is named as: nextadr/process name/communication protocol name, and the key value is the destination micro-service name for sending the business data, and the business data sending object of the instance in the corresponding process is obtained by the key name and the key value and the change of the sending object is monitored.
5. The method of claim 4, wherein step 3 comprises: the method comprises the following steps of configuring a center to store micro-service interaction rules and interaction relations through a distributed software coordination mechanism, wherein the interaction rules refer to: according to the interface transmission protocol and data format exposed from the micro-service to the outside, judging which micro-services are allowed to receive and transmit information, and judging which micro-services the transmitting end and the receiving end respectively correspond to; the interaction relationship means: under the definition of an actual business process, the information receiving and sending relation among the micro services determines a specific business process through arranging the business process relation of the system, and the micro service instance management is carried out through a micro service containerization management environment.
6. The method of claim 5, wherein step 3 comprises: system developers define all compliant micro-service interaction relations and interaction protocols in a service system, namely, the micro-service interface network protocol and a transmission data format are taken as the basis to judge what micro-services can realize the receiving and sending of messages; and business personnel define the business data receiving and sending relation among the microservices under a specific business process from the business perspective of the system.
7. The method of claim 6, wherein step 4 comprises: through the business process and the data sending object key value pair data of the micro-service instance configured in the configuration center, the micro-service instance can obtain the sending address of the micro-service instance business data during running and is informed when the sending address changes.
8. The method of claim 7, wherein in step 4, the micro service instances are started and managed through kubernets, compliance of micro service interaction relations in the process is firstly verified, each micro service communication relation in the process is compared with rules in an interaction rule base, if the comparison is successful, the micro service interaction relations related to the process are generated according to step 3 and written into a configuration center, otherwise, the business process is not started; and then automatically generating a yaml file of kubernets, defining a deployment object and a service object, executing the written yaml file to start a micro-service instance, and generating the yaml file according to the following rules:
adding an environment variable set started by a container, describing a business process name, fixing the name as FLOW, and setting the value as a specific process name;
the naming rule of the kubernets service object corresponding to the micro service instance is as follows: process name-microservice name;
the label matching rule of the deployment and service objects is as follows: FLOW = FLOW name and app = microservice name.
9. The method according to claim 8, wherein in step 4, after the micro service instance is started, a configuration center is used to obtain a sending object instance of the micro service instance service data, a corresponding network address is obtained in a network address resolution component of kubernets through an instance name, and when the micro service instance needs to send the service data in the operation process, the service data is sent according to the network address; and after the business process is changed, if the sending object is changed, the value written into the configuration center is synchronously changed, a callback function is triggered, and the micro-service instance updates the sending address of the business data.
CN202211149479.6A 2022-09-21 2022-09-21 Business process arrangement method facing microservice Pending CN115550425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211149479.6A CN115550425A (en) 2022-09-21 2022-09-21 Business process arrangement method facing microservice

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211149479.6A CN115550425A (en) 2022-09-21 2022-09-21 Business process arrangement method facing microservice

Publications (1)

Publication Number Publication Date
CN115550425A true CN115550425A (en) 2022-12-30

Family

ID=84727360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211149479.6A Pending CN115550425A (en) 2022-09-21 2022-09-21 Business process arrangement method facing microservice

Country Status (1)

Country Link
CN (1) CN115550425A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160124742A1 (en) * 2014-10-30 2016-05-05 Equinix, Inc. Microservice-based application development framework
EP4002098A1 (en) * 2020-11-18 2022-05-25 Deutsche Telekom AG Method for providing functionality of multiple microservices and / or functionality of a plurality of software containers using a cloud infrastructure, system, use system, computer program, and computer readable medium
CN114816375A (en) * 2021-01-29 2022-07-29 腾讯科技(深圳)有限公司 Service arranging method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160124742A1 (en) * 2014-10-30 2016-05-05 Equinix, Inc. Microservice-based application development framework
EP4002098A1 (en) * 2020-11-18 2022-05-25 Deutsche Telekom AG Method for providing functionality of multiple microservices and / or functionality of a plurality of software containers using a cloud infrastructure, system, use system, computer program, and computer readable medium
CN114816375A (en) * 2021-01-29 2022-07-29 腾讯科技(深圳)有限公司 Service arranging method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Xie et al. When serverless computing meets edge computing: Architecture, challenges, and open issues
CN106301829B (en) A kind of method and apparatus of network service dilatation
CN111290865A (en) Service calling method and device, electronic equipment and storage medium
CN108306917A (en) The register method and device of data processing method and device, micro services module
CN111813570A (en) Event-driven message interaction method for power Internet of things
CN110908658A (en) Micro-service and micro-application system, data processing method and device
CN109639782A (en) Message sends platform, method
KR100880536B1 (en) Open framework system for heterogeneous computing and service integration
CN105208047A (en) Online and off line methods of distributed system server, and server
CN107707644A (en) Processing method, device, storage medium, processor and the terminal of request message
CN109213498A (en) A kind of configuration method and server of internet web front-end
CN112698838B (en) Multi-cloud container deployment system and container deployment method thereof
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN112882792B (en) Information loading method, computer device and storage medium
CN109451014A (en) A kind of WebService agency plant and its transparent proxy method
CN111147308A (en) Network management method and system based on micro-service architecture
CN111857733B (en) Construction method, device and system of service environment and readable storage medium
CN107332813A (en) A kind of ACL collocation methods, ACL configuration equipment and server
CN115580667B (en) Data transmission method, device, equipment and storage medium
CN115550425A (en) Business process arrangement method facing microservice
CN111459510A (en) Cross-network operating system installation method and device, electronic equipment and medium
CN114390093B (en) Virtual gateway simulation system
CN114640610B (en) Cloud-protogenesis-based service management method and device and storage medium
CN116954810A (en) Method, system, storage medium and program product for creating container application instance
CN106843851A (en) Implementation method and device based on ActiveMQ isomery Classloader unserializings

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