CN115712417A - Method and system for constructing microservice in code-free mode - Google Patents
Method and system for constructing microservice in code-free mode Download PDFInfo
- Publication number
- CN115712417A CN115712417A CN202211488274.0A CN202211488274A CN115712417A CN 115712417 A CN115712417 A CN 115712417A CN 202211488274 A CN202211488274 A CN 202211488274A CN 115712417 A CN115712417 A CN 115712417A
- Authority
- CN
- China
- Prior art keywords
- service
- component
- micro
- plug
- execution
- 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
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a system for constructing microservice in a code-free mode, wherein the method comprises the following steps: acquiring initial information of micro-services to be constructed, importing the initial information into a micro-service designer, and registering services based on service environment components and service components; checking whether the service registration is successful or not through a micro-service designer of the graphical interface; performing service arrangement according to service requirements, and organizing a service context environment, a plurality of service components and a plurality of service plug-ins into a micro service for processing services by a micro service designer in a code-free mode; the service attribute panel configures basic information and advanced parameters of the components; the whole process of the micro-service arrangement can be dynamically plugged and unplugged, and the components for adjusting the micro-service arrangement do not need to restart the service. The invention organizes the service context environment, the plurality of service components and the plurality of service plug-ins into a micro-service for processing the service by the service designer in a code-free mode, thereby realizing the quick response of the service appeal change of the enterprise and reducing the cost of the enterprise.
Description
Technical Field
The invention relates to the technical field of micro services, in particular to a method and a system for constructing a micro service in a code-free mode.
Background
With the rapid development of the internet, the traditional information management system is not only more large and complex in scale, but also difficult to cope with the diversification of information, and the problems of poor expansibility and maintainability of a single framework can be solved by utilizing the characteristics of independent deployment, single responsibility and convenience in maintenance of a micro-service framework, so that more and more business systems are switched to the micro-service framework from the single framework. With the deep research of enterprises on the micro-service architecture, some problems are discovered, such as complexity of the micro-service architecture itself, user security and the like, the micro-service architecture realizes advantages of agile development, rapid expansion and capacity deployment and the like through effective service splitting, solves the problems of high concurrency, high availability and high expansion of system services, and improves service and code complexity of a core service system.
With the continuous and deep digital development, the change of the customer requirements and the ground covering of the underlying technology occurs, and the traditional software development mode cannot quickly respond to the change of enterprise business requirements caused by the change of the industrial environment; meanwhile, the traditional business process engine still has the problems of complex architecture, low flexibility, difficult integration with an application system and the like when performing business processing. Secondly, the software industry in China is rapidly developed, the vigorous IT talent demand is not matched with the current talent supply capacity, and the problems of high talent cost, high loss rate and the like become important factors for limiting the development of enterprises. Therefore, how to provide a low-cost and efficient code-free way to construct a microservice platform is a problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a system for constructing microservices in a code-free mode.
The invention provides a method for constructing microservice in a code-free mode, which comprises the following steps:
acquiring initial information of micro-services to be constructed, importing the initial information into a micro-service designer, registering the services based on a service environment component and a service component through an xml file format, and using the registered services for service arrangement;
checking whether the service registration is successful or not through a micro-service designer of the graphical interface;
according to business requirements, service arrangement is carried out based on registered services, and a micro-service designer adopts a code-free mode to organize a service context environment, a plurality of service components and a plurality of service plug-ins into a micro-service for processing business;
and configuring basic information and advanced parameters of the microservice by the components according to the service attribute panel.
In this scenario, the micro-service designer includes: the components and the configurator are realized by adopting an Html5 technology, and required components are selected by dragging and dropping the components to construct the micro-service in a code-free mode.
The components comprise a service component container, a service environment creator component, a service component and a service plug-in; the service assembly comprises a platform built-in service assembly and a custom service assembly, and the custom service assembly is registered to the micro-service designer in an xml mode.
The configurator comprises configuration of service component attributes and configuration of transaction modes, wherein the transaction modes comprise a context-dependent submission mode, an automatic submission mode of container management, a manual submission mode of container management and a submission mode of component management.
In the scheme, the micro service consists of a service component container, a service environment creator component, a service component and a service plug-in;
the service component container ServerContainer is responsible for environment creation, object submission rollback and exception management in the whole service execution process, and determines the transaction mode of the service: a submission mode dependent on context submission, automatic submission of container management, manual submission of container management, component management;
the service environment creator component servicecontextpointer is responsible for creating the running environment of the whole service, including receiving and analyzing parameters transmitted by a caller, generating data returned to the caller, performing environment initialization work, and performing a plurality of lists;
the service component ServiceComponentAdapter is used for managing the plug-in, determining an interface of the plug-in, calling the interface which accords with a preset service rule, determining an execution method of the component and a method and a parameter of the plug-in by designing the plug-in, and taking charge of calling functions of the plug-in;
the service plug-in serviceplug Adapter is used for executing the functions of the service components.
In the scheme, service arrangement is performed based on registered services, and the method specifically comprises the following steps:
a preparation phase of service arrangement is carried out through a service component container ServerContainer, and a required service environment creator component is selected to carry out arrangement of the service preparation phase;
the execution stage of service arrangement is carried out through the service component ServiceComponentAdapter, and the execution stage of service arrangement is carried out by selecting the required service component and service plug-in;
and selecting a required service environment creator component to perform the arranging of the service end phase.
In the scheme, when the micro-service is called, a service running environment is created according to the transmitted parameters, then each plug-in of the service is executed in a certain sequence, the corresponding business logic is completed, and a service execution result is returned, specifically:
calling a service environment creator component, and creating a service running environment and a service return value according to parameters transmitted by a service caller;
acquiring the plug-in name of the Prepare in the service preparation stage, acquiring an execution method of the service preparation stage of the service, and calling the plug-ins one by adopting an invoke method according to the method name of the execution method of the service preparation stage;
acquiring plug-in names of Run in a service execution stage, acquiring service execution stage execution methods of the service, and calling plug-ins one by adopting an invoke method according to the method names of the service execution stage execution methods;
acquiring the name of a plugin of Finish in a service end stage, acquiring a service end stage execution method of the service, and calling plugins one by adopting an invoke method according to the method name of the service end stage execution method;
and monitoring the service execution process, and acquiring the execution state information of the whole service, the whole component and the whole plug-in.
The second aspect of the present invention also provides a system for constructing a microservice in a code-free manner, the system comprising: a memory and a processor, wherein the memory includes a program for a method for constructing a micro-service in a code-free manner, and the program for the method for constructing the micro-service in the code-free manner realizes the following steps when being executed by the processor:
acquiring initial information of micro-services to be constructed, importing the initial information into a micro-service designer, registering the services based on a service environment component and a service component through an xml file format, and using the registered services for service arrangement;
checking whether the service registration is successful or not through a micro-service designer of the graphical interface;
according to business requirements, service arrangement is carried out based on registered services, and a micro service designer organizes a service context environment, a plurality of service components and a plurality of service plug-ins into a micro service for processing business in a code-free mode;
and configuring basic information and high-level parameters of the micro-service by the components according to the service attribute panel.
The invention discloses a method and a system for constructing microservice in a code-free mode, wherein the method comprises the following steps: performing service registration based on the service environment component and the service component through an xml file format; checking whether the service registration is successful or not through a micro-service designer of the graphical interface; according to business requirements, service arrangement is carried out based on registered services, and a micro service designer organizes a service context environment, a plurality of service components and a plurality of service plug-ins into a micro service for processing business in a code-free mode; the service attribute panel carries out component basic information and advanced parameter configuration; the whole process of the micro-service arrangement can be dynamically plugged and unplugged, and the components for adjusting the micro-service arrangement do not need to restart the service. The invention organizes the service context environment, the plurality of service components and the plurality of service plug-ins into a micro-service for processing the service by the service designer in a code-free mode, thereby realizing the quick response of the service appeal change of the enterprise and reducing the cost of the enterprise. The micro-service execution process is divided into a preparation stage, an execution stage and an end stage, each stage can be provided with a plurality of service components, each service component can be provided with a plurality of service plug-ins, and the micro-service can be flexibly customized.
Drawings
FIG. 1 is a flow diagram illustrating a method of the present invention for building microservices in a codeless manner;
FIG. 2 is a flow chart of a method for executing a service during micro-service invocation in the invention;
FIG. 3 is a schematic diagram illustrating the flow of service execution in the present invention;
FIG. 4 is a block diagram of a system for constructing microservices in a code-free manner according to the invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
FIG. 1 is a flow chart illustrating a method of the present invention for constructing microservices in a code-free manner.
As shown in FIG. 1, a first aspect of the present invention provides a method for constructing a microservice in a code-free manner, comprising:
s102, acquiring initial information of micro-services to be constructed, importing the initial information into a micro-service designer, registering the services through an xml file format based on a service environment component and a service component, and using the registered services for service arrangement;
s104, checking whether the service is successfully registered or not through a micro-service designer of the graphical interface;
s106, according to business requirements, service arrangement is carried out based on registered services, and a micro-service for processing business is formed by organizing a service context environment, a plurality of service components and a plurality of service plug-ins in a code-free mode through a micro-service designer;
and S108, configuring basic information and advanced parameters of the micro-service by the component according to the service attribute panel.
It should be noted that, address information in the microservice initial information is registered, the service component calls a registration center to realize service inquiry and obtain an available service instance address list, and whether the registration is successful is judged through address inspection; the microservice designer includes: the components and the configurator are realized by adopting an Html5 technology, and required components are selected by dragging and dropping the components to construct micro services in a code-free mode.
The components comprise a service component container, a service environment creator component, a service component and a service plug-in; the service components comprise a platform built-in service component and a custom service component, and the custom service component is registered to the micro service designer in an xml mode.
The configurator comprises configuration of service component attributes and configuration of transaction modes, wherein the transaction modes comprise a context-dependent submission mode, an automatic submission mode of container management, a manual submission mode of container management and a submission mode of component management.
It should be noted that the micro service is composed of a service component container, a service environment creator component, a service component, and a service plug-in;
the service component container ServerContainer is responsible for environment creation, object submission rollback and exception management in the whole service execution process, and determines the transaction mode of the service: a submission mode dependent on context submission, automatic submission of container management, manual submission of container management, component management;
the service environment creator component servicecontextpointer is responsible for creating the running environment of the whole service, including receiving and analyzing parameters transmitted by a caller, generating data returned to the caller, performing environment initialization work, and performing a plurality of lists;
the Service Component Adapter is used for managing the plug-in, determining an interface of the plug-in, calling the interface which accords with a preset Service rule, determining an execution method of the Component and a method and a parameter of the plug-in by designing the plug-in, and taking charge of calling a function of the plug-in;
the Service plug-in Adapter is used for executing the functions of the Service components.
It should be noted that, performing service orchestration based on registered services specifically includes:
a service component container ServerContainer is used for preparing service arrangement, the service component container is responsible for environment creation, object submission rollback, exception management and other activities in the whole service execution process, and a required service environment creator component is selected for arranging the service preparation phase;
the execution stage of service arrangement is carried out through the service component ServiceComponentAdapter, the service component comprises a series of plugins, the execution method of the component and the method and the parameter of the contained plugins are determined, and the execution stage of service arrangement is carried out by calling and selecting the required service component and the service plugins according to the function of the plugins made by the method;
the end stage of service arrangement is carried out through a service component container ServerContainer, and a required service environment creator component is selected to carry out the arrangement of the service end stage;
a service context environment, a plurality of service components and a plurality of service plug-ins are organized into a microservice for processing business by a service designer in a code-free manner.
FIGS. 2 and 3 are a flow chart and a schematic diagram illustrating a method for executing a service during micro service invocation in the present invention;
according to the embodiment of the invention, when the micro-service is called, the running environment of the service is created according to the transmitted parameters, then each plug-in of the service is executed in a certain sequence, the corresponding business logic is completed, and the service execution result is returned, specifically:
s202, calling a service environment creator component, and creating a service running environment and a service return value according to parameters transmitted by a service caller;
s204, acquiring the name of the plugin in the service preparation stage Prepare, acquiring the service preparation stage execution method of the service, and calling plugins one by adopting an invoke method according to the name of the service preparation stage execution method;
s206, acquiring plug-in names of Run in the service execution stage, acquiring service execution stage execution methods of the service, and calling plug-ins one by adopting an invoke method according to the method names of the service execution stage execution methods;
s208, acquiring the names of the plug-ins of Finish phase of the service, acquiring the execution method of the service end phase of the service, and calling the plug-ins one by adopting an invoke method according to the method names of the execution method of the service end phase;
s210, monitoring the service execution process, and acquiring the execution state information of the whole service, component and plug-in.
The execution of the whole microservice is divided into three phases: preparation phase, execution phase and end phase. Each Service also has three stages: preparation phase, execution phase and end phase. Firstly calling getproperpluginservicename of Service to obtain a Prepare execution method of the Service, then calling plug-ins one by adopting an invoke mode according to the method name, then executing gettripluginservicename of the Service to obtain a Run execution method of the Service, then calling plug-ins one by adopting the invoke mode according to the method name, finally executing getfinishPluginservicename of the Service to obtain a Finish execution method of the Service, and then calling plug-ins one by adopting the invoke mode according to the method name. The invoke method is a reflection call instance method, returns a return value of the instance method, which method calls the invoke method, and returns the return value of which method, and is one of the commonly used call methods.
According to the embodiment of the invention, the operation path is monitored in the service execution process, and the micro service is optimized, which specifically comprises the following steps:
acquiring path information in the micro-service execution process to establish a topological structure, and determining the dependency relationship between services according to the topological structure;
constructing a monitoring database, importing a topological structure seen by a service into the monitoring database, screening micro-service evaluation indexes according to historical monitoring data, acquiring influence factors according to the evaluation indexes, and evaluating the running condition of the micro-service through the influence factors;
dividing the influence factors, performing fuzzy evaluation on the influence factors of a fuzzy concept, performing standard limit evaluation on the certainty influence factors with standards, and determining the weight vector of each influence factor by an analytic hierarchy process;
and generating state evaluation information of micro-service operation according to the standard limit evaluation, the fuzzy evaluation and the weight vector, and feeding back the state evaluation information to adjust and correct the application original information and the performance related information of the micro-service.
It should be noted that, micro-service evaluation indexes are screened according to historical monitoring data, where the micro-service evaluation indexes include, but are not limited to, service execution time, service communication time, middleware condition, component calling, running state, and the like, and when the micro-service has an abnormal condition, the micro-service topology structure is dynamically monitored, log data is obtained, abnormal information is located, and application vulnerabilities are accurately located; and a user-defined transaction can be designed according to the application requirements of the system, directional monitoring is carried out, and the monitoring performance is enhanced.
FIG. 4 is a block diagram illustrating a system for building microservices in a codeless manner in accordance with the invention.
The second aspect of the present invention also provides a system 4 for constructing a microservice in a code-free manner, the system comprising: a memory 41 and a processor 42, wherein the memory includes a program of a method for constructing a micro-service in a code-free manner, and the program of the method for constructing the micro-service in the code-free manner realizes the following steps when the processor executes the program of the method:
acquiring initial information of micro-services to be constructed, importing the initial information into a micro-service designer, registering the services based on a service environment component and a service component through an xml file format, and using the registered services for service arrangement;
checking whether the service registration is successful or not through a micro-service designer of the graphical interface;
according to business requirements, service arrangement is carried out based on registered services, and a micro-service designer adopts a code-free mode to organize a service context environment, a plurality of service components and a plurality of service plug-ins into a micro-service for processing business;
and configuring basic information and high-level parameters of the micro-service by the components according to the service attribute panel.
It should be noted that, address information in the micro-service initial information is registered, the service component calls a registration center to realize service inquiry and obtain an available service instance address list, and whether the registration is successful is judged through address inspection; the microservice designer includes: the components and the configurator are realized by adopting an Html5 technology, and required components are selected by dragging and dropping the components to construct the micro-service in a code-free mode.
The components comprise a service component container, a service environment creator component, a service component and a service plug-in; the service assembly comprises a platform built-in service assembly and a custom service assembly, and the custom service assembly is registered to the micro-service designer in an xml mode.
The configurator comprises configuration of service component attributes and configuration of transaction modes, wherein the transaction modes comprise a context-dependent submission mode, an automatic submission mode of container management, a manual submission mode of container management and a submission mode of component management.
It should be noted that the micro service is composed of a service component container, a service environment creator component, a service component, and a service plug-in;
the service component container ServerContainer is responsible for environment creation, object submission rollback and exception management in the whole service execution process, and determines the transaction mode of the service: a submission mode dependent on context submission, automatic submission of container management, manual submission of container management, component management;
the service environment creator component servicecontextpointer is responsible for creating the running environment of the whole service, including receiving and analyzing parameters transmitted by a caller, generating data returned to the caller, performing environment initialization work, and performing a plurality of lists;
the Service Component Adapter is used for managing the plug-in, determining an interface of the plug-in, calling the interface which accords with a preset Service rule, determining an execution method of the Component and a method and a parameter of the contained plug-in by designing the plug-in, and being responsible for calling functions of the plug-in;
the Service plug-in Adapter is used for executing the functions of the Service components.
It should be noted that, performing service orchestration based on registered services specifically includes:
a service component container ServerContainer is used for preparing service arrangement, the service component container is responsible for environment creation, object submission rollback, exception management and other activities in the whole service execution process, and a required service environment creator component is selected for arranging the service preparation phase;
the execution phase of service arrangement is carried out through a service component adapter, the service component comprises a series of plugins, the execution method of the component and the method and the parameter of the contained plugins are determined, and the execution phase of service arrangement is carried out by calling and selecting the required service component and the service plugin according to the function of the plugin according to the method;
the end stage of service arrangement is carried out through a service component container ServerContainer, and a required service environment creator component is selected to carry out the arrangement of the service end stage;
a service context environment, a plurality of service components and a plurality of service plug-ins are organized into a microservice for processing business by a service designer in a code-free manner.
According to the embodiment of the invention, when the micro-service is called, the running environment of the service is created according to the transmitted parameters, then each plug-in of the service is executed in a certain sequence, the corresponding business logic is completed, and the service execution result is returned, specifically:
calling a service environment creator component, and creating a service running environment and a service return value according to parameters transmitted by a service caller;
acquiring the plug-in name of the Prepare in the service preparation stage, acquiring an execution method of the service preparation stage of the service, and calling the plug-ins one by adopting an invoke method according to the method name of the execution method of the service preparation stage;
acquiring plug-in names of Run in a service execution stage, acquiring service execution stage execution methods of the service, and calling plug-ins one by adopting an invoke method according to the method names of the service execution stage execution methods;
acquiring the name of a plugin in Finish phase of service, acquiring an execution method of the service end phase of the service, and calling plugins one by adopting an invoke method according to the method name of the execution method of the service end phase;
and monitoring the service execution process, and acquiring the execution state information of the whole service, the whole component and the whole plug-in.
The execution of the whole microservice is divided into three phases: preparation phase, execution phase and end phase. Each Service also has three phases: preparation phase, execution phase and end phase. Firstly calling getproperpluginservicename of Service to obtain a Prepare execution method of the Service, then calling plug-ins one by adopting an invoke mode according to the method name, then executing gettripluginservicename of the Service to obtain a Run execution method of the Service, then calling plug-ins one by adopting the invoke mode according to the method name, finally executing getfinishPluginservicename of the Service to obtain a Finish execution method of the Service, and then calling plug-ins one by adopting the invoke mode according to the method name. The invoke method is a reflection call instance method, returns a return value of the instance method, which method calls the invoke method, and returns the return value of which method, and is one of the commonly used call methods.
The third aspect of the present invention further provides a computer readable storage medium, which contains a program of a method for constructing a micro service in a code-free manner, and when the program of the method for constructing a micro service in a code-free manner is executed by a processor, the steps of the method for constructing a micro service in a code-free manner as described in any one of the above are implemented.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (8)
1. A method for constructing microservices in a codeless manner, comprising the steps of:
acquiring initial information of micro services to be constructed, importing the initial information into a micro service designer, registering the services based on a service environment component and a service component through an xml file format, and using the registered services for service arrangement;
checking whether the service registration is successful or not through a micro-service designer of the graphical interface;
according to business requirements, service arrangement is carried out based on registered services, and a micro service designer organizes a service context environment, a plurality of service components and a plurality of service plug-ins into a micro service for processing business in a code-free mode;
and configuring basic information and high-level parameters of the micro-service by the components according to the service attribute panel.
2. The method of claim 1, wherein the microservice designer implements Html5 technology, and selects a required component by dragging and dropping the component, thereby performing codeless construction of the microservice.
3. The method for constructing microservices in a code-free mode according to claim 1, wherein each microservice consists of a service component container, a service environment creator component, a service component and a service plug-in;
the service component container ServerContainer is responsible for environment creation, object submission rollback and exception management in the whole service execution process, and determines the transaction mode of the service: a submission mode dependent on context submission, automatic submission of container management, manual submission of container management, component management;
the service environment creator component servicecontextpointer is responsible for creating the running environment of the whole service, including receiving and analyzing parameters transmitted by a caller, generating data returned to the caller, performing environment initialization work, and performing a plurality of lists;
the service component serviceComponentAdap is used for managing the plug-ins, determining the interfaces of the plug-ins, calling the interfaces according with the preset service rules, determining the execution method of the component and the method and parameters of the contained plug-ins by designing the plug-ins, and taking charge of calling the functions of the plug-ins;
the service plug-in serviceplug Adapter is used for executing the functions of the service components.
4. The method for constructing microservice in a codeless manner according to claim 1, wherein service orchestration is performed based on registered services, specifically:
a preparation phase of service arrangement is carried out through a service component container ServerContainer, and a required service environment creator component is selected to carry out arrangement of the service preparation phase;
the execution stage of service arrangement is carried out through the service component ServiceComponentAdapter, and the execution stage of service arrangement is carried out by selecting the required service component and service plug-in;
and selecting a required service environment creator component to perform the arranging of the service end phase.
5. The method of claim 4, wherein when the micro service is called, a service runtime environment is created according to the incoming parameters, then each plug-in of the service is executed in a certain order, corresponding business logic is completed, and a service execution result is returned, specifically:
calling a service environment creator component, and creating a service running environment and a service return value according to parameters transmitted by a service caller;
acquiring the plug-in name of the Prepare in the service preparation stage, acquiring an execution method of the service preparation stage of the service, and calling the plug-ins one by adopting an invoke method according to the method name of the execution method of the service preparation stage;
acquiring plug-in names of Run in a service execution stage, acquiring service execution stage execution methods of the service, and calling plug-ins one by adopting an invoke method according to the method names of the service execution stage execution methods;
acquiring the name of a plugin of Finish in a service end stage, acquiring a service end stage execution method of the service, and calling plugins one by adopting an invoke method according to the method name of the service end stage execution method;
and monitoring the service execution process, and acquiring the execution state information of the whole service, the whole component and the whole plug-in.
6. A system for constructing microservices in a codeless manner, the system comprising: a memory and a processor, wherein the memory includes a program for a method for constructing a micro-service in a code-free manner, and the program for the method for constructing the micro-service in the code-free manner realizes the following steps when being executed by the processor:
acquiring initial information of micro-services to be constructed, importing the initial information into a micro-service designer, registering the services based on a service environment component and a service component through an xml file format, and using the registered services for service arrangement;
checking whether the service registration is successful or not through a micro-service designer of the graphical interface;
according to business requirements, service arrangement is carried out based on registered services, and a micro service designer organizes a service context environment, a plurality of service components and a plurality of service plug-ins into a micro service for processing business in a code-free mode;
and configuring basic information and high-level parameters of the micro-service by the components according to the service attribute panel.
7. The system for constructing microservices in a codeless manner according to claim 6 wherein microservices consist of service component containers, service environment creator components, service plugins;
the service component container ServerContainer is responsible for environment creation, object submission rollback and exception management in the whole service execution process, and determines the transaction mode of the service: a submission mode dependent on context submission, automatic submission of container management, manual submission of container management, component management;
the service environment creator component servicecontextpointer is responsible for creating the running environment of the whole service, including receiving and analyzing parameters transmitted by a caller, generating data returned to the caller, performing environment initialization work, and performing a plurality of lists;
the service component ServiceComponentAdapter is used for managing the plug-in, determining an interface of the plug-in, calling the interface which accords with a preset service rule, determining an execution method of the component and a method and a parameter of the plug-in by designing the plug-in, and taking charge of calling functions of the plug-in;
the service plug-in serviceplug Adapter is used for executing the functions of the service components.
8. The system for constructing microservices in a code-free manner according to claim 6, wherein services are arranged based on registered services, and the system comprises:
a preparation phase of service arrangement is carried out through a service component container ServerContainer, and a required service environment creator component is selected to carry out arrangement of the service preparation phase;
the execution phase of service arrangement is carried out through the service component ServiceComponentAdapter, and the execution phase of service arrangement is carried out by selecting the required service components and service plug-ins;
and selecting a required service environment creator component to perform the arranging of the service end phase.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211488274.0A CN115712417A (en) | 2022-11-25 | 2022-11-25 | Method and system for constructing microservice in code-free mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211488274.0A CN115712417A (en) | 2022-11-25 | 2022-11-25 | Method and system for constructing microservice in code-free mode |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115712417A true CN115712417A (en) | 2023-02-24 |
Family
ID=85234735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211488274.0A Pending CN115712417A (en) | 2022-11-25 | 2022-11-25 | Method and system for constructing microservice in code-free mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115712417A (en) |
-
2022
- 2022-11-25 CN CN202211488274.0A patent/CN115712417A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6269473B1 (en) | Method and apparatus for the development of dynamically configurable software systems | |
CN109710236B (en) | Service development and implementation method, device, platform and medium based on shared service | |
CN112835560A (en) | WEB multi-terminal low-code intelligent software development platform | |
CN101888320B (en) | Enhanced network adapter framework | |
US10101972B1 (en) | Data modelling and flow engine for building automated flows within a cloud based developmental platform | |
US10019293B2 (en) | Enhanced command selection in a networked computing environment | |
US8966442B2 (en) | Custom code innovation management | |
US20120192187A1 (en) | Customizing Automated Process Management | |
CN108038665B (en) | Business rule management method, device, equipment and computer readable storage medium | |
CN113361838A (en) | Business wind control method and device, electronic equipment and storage medium | |
CN112906206B (en) | Digital twin model construction method and device | |
CN111258567A (en) | Service code development processing method and device | |
US8539479B2 (en) | System and method for application function consolidation | |
CN114579469A (en) | Full link interface test method and device, electronic equipment and storage medium | |
CN112860948B (en) | Metadata management method and system based on multi-tenant SaaS architecture and electronic equipment | |
Mohamed et al. | SaaS dynamic evolution based on model-driven software product lines | |
CN117348866A (en) | Test case arrangement system and method | |
CN112506590A (en) | Interface calling method and device and electronic equipment | |
CN112613792A (en) | Data processing method, system, computer device and storage medium | |
CN115712417A (en) | Method and system for constructing microservice in code-free mode | |
US9059992B2 (en) | Distributed mobile enterprise application platform | |
CN114066295A (en) | Workflow business arrangement method and device, electronic equipment and readable storage medium | |
CN114077437A (en) | Integrated management method, device and system for artificial intelligence application | |
CN113886215A (en) | Interface test method, device and storage medium | |
KR100973543B1 (en) | Modeling Method and Device for Dynamic Architecture of Mobile Application |
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 |