CN113535254A - Micro-service processing method, micro-service deployment method and related device - Google Patents

Micro-service processing method, micro-service deployment method and related device Download PDF

Info

Publication number
CN113535254A
CN113535254A CN202010316034.7A CN202010316034A CN113535254A CN 113535254 A CN113535254 A CN 113535254A CN 202010316034 A CN202010316034 A CN 202010316034A CN 113535254 A CN113535254 A CN 113535254A
Authority
CN
China
Prior art keywords
micro
package
service
interface
micro service
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
CN202010316034.7A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010316034.7A priority Critical patent/CN113535254A/en
Publication of CN113535254A publication Critical patent/CN113535254A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Abstract

The embodiment of the application discloses a micro service pack processing method, a micro service pack deploying method and a related device, wherein the micro service pack processing method comprises the following steps: acquiring a micro service package, wherein the micro service package comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package; and determining the service dependence of the micro service package according to the interface description file, wherein the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates. According to the technical scheme provided by the embodiment of the application, the service dependence of the micro service pack is determined according to the interface description file, so that manual operation is reduced, the development efficiency of the micro service is improved, and the development difficulty of the micro service is reduced.

Description

Micro-service processing method, micro-service deployment method and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for processing a microservice, a method for deploying a microservice, and a related device.
Background
The micro services in the micro service architecture are mutually dependent and called, the dependency chain is usually complex, and at present, the planning file is generated by manual operation, for example, the planning file is obtained by manual writing or manual operation on an interface, so that the deployment of the micro services is completed. The plan file includes the deployment sequence of the micro service packages, for example, the deployment sequence of the micro service package a is set to 1, the deployment sequence of the micro service package B is set to 2, and the like.
It should be noted that when the number of micro-services is large, the manual management of the planning information will bring a large management cost to b's, and errors are also easy to occur.
Disclosure of Invention
The embodiment of the application provides a processing method, a deployment method and a related device of micro-services, which are beneficial to improving the development efficiency of the micro-services and reducing the development difficulty of the micro-services.
In a first aspect, an embodiment of the present application provides a method for processing a microservice package, including: acquiring a micro service package, wherein the micro service package comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package; and determining the service dependence of the micro service package according to the interface description file, wherein the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates.
According to the technical scheme provided by the embodiment of the application, the service dependence of the micro service pack is determined according to the interface description file, so that manual operation is reduced, the development efficiency of the micro service is improved, and the development difficulty of the micro service is reduced.
Based on the first aspect, in some possible embodiments of the present application, the determining the service dependency of the microservice package according to the interface description file includes: and determining a dependency chain according to the interface on which the micro service packet depends.
Based on the first aspect, in some possible embodiments of the present application, the service dependency includes: static and dynamic dependencies; wherein, the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
Based on the first aspect, in some possible embodiments of the present application, the micro packages that need to be accessed through the remote interface are grouped according to a preset grouping policy.
In a second aspect, an embodiment of the present application provides a method for deploying a microservice package, including: acquiring a micro service package, wherein the micro service package comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package; determining the service dependence of the micro service package according to the interface description file, wherein the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates; determining a micro service package needing to be loaded locally and a micro program package group needing to be accessed through a remote interface according to the service dependence; determining a node where each of the micro-package groups is deployed; loading a micro service package which needs to be loaded locally; and triggering to load the corresponding microprogram packet on the node corresponding to each microprogram packet.
Based on the second aspect, in some possible embodiments of the present application, the determining the service dependency of the microservice package according to the interface description file includes: and determining a dependency chain according to the interface on which the micro service packet depends.
Based on the second aspect, in some possible embodiments of the present application, the service dependency includes: static and dynamic dependencies; wherein, the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
Based on the second aspect, in some possible embodiments of the present application, after the determining the dependency relationship of the microservice package according to the interface description file, the method further includes: and grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
In a third aspect, an embodiment of the present application provides a device for processing a microservice package, including: the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a micro service package which comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package; and the determining unit is used for determining the service dependence of the micro service package according to the interface description file, and the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates.
Based on the third aspect, in some possible embodiments of the present application, in the aspect of determining the service dependency of the micro service package according to the interface description file, the determining unit is specifically configured to determine a dependency chain according to an interface on which the micro service package depends; the dependency chain is used to represent: when the micro service package is operated, the micro service package corresponding to the dependence chain in the reverse order is loaded.
Based on the third aspect, in some possible embodiments of the present application, the service dependency includes: static and dynamic dependencies; wherein, the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
Based on the third aspect, in some possible embodiments of the present application, the method further includes: and the grouping unit is used for grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
In a fourth aspect, an embodiment of the present application provides a device for deploying a microservice package, including: the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a micro service package which comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package; a first determining unit, configured to determine, according to the interface description file, a service dependency of the microservice package, where the service dependency is used to describe a microservice package on which the microservice package depends when running; the second determining unit is used for determining the micro service packages needing to be loaded locally and the micro program package groups needing to be accessed through the remote interface according to the service dependence; a third determining unit, configured to determine a node at which each of the micro packages is deployed in a group; the first processing unit is used for locally loading the micro service package needing to be locally loaded; and the second processing unit is used for triggering the loading of the corresponding microprogram packet on the node corresponding to each microprogram packet.
Based on the fourth aspect, in some possible embodiments of the present application, in terms of determining the service dependency of the micro service package according to the interface description file, the first determining unit is specifically configured to determine the dependency chain according to the interface on which the micro service package depends.
Based on the fourth aspect, in some possible embodiments of the present application, the service dependency includes: static and dynamic dependencies; wherein, the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
Based on the fourth aspect, in some possible embodiments of the present application, the method further includes: and the grouping unit is used for grouping the micro-program packages which need to be accessed through the remote interface according to a preset grouping strategy after the first determining unit determines the service dependence of the micro-service package.
In a fifth aspect, embodiments of the present application provide a computing device comprising a processor and a memory; the processor is configured to execute the computer instructions stored by the memory to cause the computing device to perform some or all of the steps of any of the methods of the first aspect or to perform some or all of the steps of any of the methods of the second aspect.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium storing computer instructions for instructing a computing device to perform part or all of the steps of any one of the methods of the first aspect or to perform part or all of the steps of any one of the methods of the second aspect.
According to the technical scheme provided by the embodiment of the application, the service dependence of the micro service pack is determined according to the interface description file, so that manual operation is reduced, the development efficiency of the micro service is improved, and the development difficulty of the micro service is reduced.
Drawings
Some drawings to which embodiments of the present application relate will be described below.
Fig. 1A is a schematic flowchart of a method for processing a microservice package according to an embodiment of the present application.
Fig. 1B is a flowchart illustrating a method for processing a microservice package according to another embodiment of the present application.
Fig. 2 is a schematic view of an application scenario according to an embodiment of the present application.
Fig. 3 is a schematic flowchart of a method for deploying a microservice package according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a processing apparatus for a microservice package according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a deployment apparatus of a microservice package according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings.
With the development of computer application technology, in order to better utilize the utilization rate of resources and realize the rapid deployment of applications, the applications can be split into a plurality of micro services. The micro-services are utilized to provide external services, and mutual association and access are supported among the micro-services so as to realize the function service of the whole application. The technical scheme provided by the embodiment of the application can be used in a distributed system.
Referring to fig. 1A, fig. 1A is a schematic flowchart of a method for processing a microservice package according to an embodiment of the present application, where the method may include, but is not limited to, the following steps.
101. Acquiring a micro service package, wherein the micro service package comprises an interface description file; the interface description file comprises: the interfaces on which the micro service package depends and the interfaces issued by the micro service package.
The microservice package is typically a compressed file (e.g., a zip file) that packages the application program, and may include: the microservice package in the embodiment of the present application further includes an interface description file.
The interface description file contains an Application Programming Interface (API) which is externally provided by the micro-service and can be accessed, and API description information of other micro-services which the micro-service needs to access. The microservice package is typically uploaded to the management node in fig. 2.
The service dependence includes: static and dynamic dependencies; the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; dynamic dependencies are used to indicate that a micro-package needs to be accessed through a remote interface when a micro-service is started or run.
In some possible embodiments, the interface description file includes a local API, which is an interface necessary for service running, that is, a static interface, and a state translation (REST) interface represented by a remotely accessed resource, where the local API is a local load recall and is a strong dependency, and may be represented as contents in static/import/, for example. The dynamic interface is a REST interface, the remote microservice is started to be called through, and the dynamic interface is a weak dependency, such as content which can be expressed as dynamic/import/. The interface description file also comprises a local API and a Rest interface issued by the microservice, and the local API and the Rest interface can be respectively expressed as dynamic/import/, dynamic/export/, contents in the description file.
In some possible embodiments, the static interface format may be such that it is guaranteed that the interface can be addressed for strict verification when the service is assembled.
sdk interface: micro-service, lib/a.jar, Class, interface, supporting different programming languages
And (3) rtsp interface: microservice: sample: rtsp-1.0.0:. the rtsp can select whether a file link mode is adopted (default), and if the link is not adopted, a copy of the rtsp packet can be copied to the micro-service directory.
The dynamic interface format may be such that the dynamic interface accesses other services through the remote interface, without affecting the integrity of the microservice assembly,
interface addressing mode of micro service package
A rest interface: micro service package, URL URL
And (3) mq interface: the micro-service package comprises MQ and Topic
102. And determining the service dependence of the micro service package according to the interface description file, wherein the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates.
In some possible embodiments, as shown in fig. 2, a micro service package management process running in the management node may parse information in the micro service package and store the parsed information in a cache.
For example, the micro service package management process may parse the micro service package obtained by the management node, decompress the micro service package, and parse the interface description file of the micro service package after decompression, where in some possible embodiments, the interface description file is maintained in a cache.
The micro-service deployment process running on the main node can acquire the interface description information of the micro-service package from the cache of the management node, calculate the service dependence according to the interface description information and issue a deployment instruction to the micro-service agent. The micro-service agent process can execute the micro-service deployment process instruction, obtain the micro-service package corresponding to the service dependence from the warehouse, assemble and pull up the corresponding service.
According to the technical scheme provided by the embodiment of the application, the service dependence of the micro service pack is determined according to the interface description file, so that manual operation is reduced, the development efficiency of the micro service is improved, and the development difficulty of the micro service is reduced.
As shown in fig. 1B, in some possible embodiments, the method for processing a micro service package may further include a step 103 of grouping the micro package that needs to be accessed through the remote interface according to a preset grouping policy.
And (3) dynamic interface release: the method comprises the following steps of performance attributes (the size of a message, the number of requests allowed in unit time, the throughput which is the message size multiplied by the number of requests in unit time, and the maximum delay of the requests), the maximum message body of the requests, and the request concurrency (the maximum number of requests allowed in unit time).
Interface affinity type: the system is characterized by comprising a CPU type (large calculated amount), a memory type (large occupied memory), a disk IO (large disk IO) and a network IO (large network IO), and can support multiple types and be connected together by using a plus number.
The microservice package includes: SDK directory and RTSP directory, SDK directory stores dependent API package. And the RTSP directory stores the dependent RTSP components, and can be linked to the RTSP service directory through files when being specifically realized. Finding the entry of the export in the cache through the entry of the import in the cache according to the interface description file, and when the values of the entries are the same, obtaining the service package name in the entry from the cache and positioning the service package to a unique micro service package. Service a → service B → service C → … …, etc.
For example, the publishing interface of microservice package a may be represented as:
publishing interface of micro service packet A/static/export # micro service A
sdk::a.jar::Type::interface
The dependency interface of microservice package a can be represented as:
the dependent interface of microservice package a/static/import # microservice a,
sdk service B-version B.jar Type interface A service dependent on B service
The dynamic dependency interface of the dynamic publishing interface of the microservice package a can be expressed as:
service package A/dynamic/export
Service package A/dynamic/import
The publishing and dependent interface of microservice package B can be described as follows:
Figure BDA0002458899950000051
after receiving the instruction, the service deployment process acquires the dependency information of the service to be deployed from the service package management process, and according to the service name:
static dependence:
service A- > [ service a, service b, service c ]
Service b- > [ service d ]
Service c- > [ ]
Service B- > [ service a, service e, service f ]
Service e- > [ ]
Service f- > [ ]
Dynamic dependence:
Figure BDA0002458899950000052
and grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy, wherein the preset grouping strategy can comprise an affinity strategy mutual exclusion principle and the like in some possible implementation modes.
After the dynamic dependency service calculation is completed, according to the service affinity type, an affinity policy [ CPU + Memory + Diskio + Netio ] defined in advance is performed, for example, according to the same resource mutual exclusion principle: meanwhile, the CPU type services are divided into different groups, and can be adjusted according to the resources required by the interface resource baseline calculation service, and the resource accumulation does not exceed the upper limit of the processing capacity of the node hardware. And dividing the dynamically-dependent services into groups (the groups are not required to be statically dependent) according to the result of the affinity calculation, wherein the group names are the names distributed to the micro service agent nodes by the service deployment process, and the groups correspond to the corresponding micro service agents after the services are divided.
Grouping A- > [ service A, service B, service C ], grouping B- > [ service D ].
And the service deployment process issues the service lists divided into groups to the micro-service agents of different nodes. After the micro-service agent obtains the information, downloading and assembling services, such as service A- > [ service a, service b, service c ], micro-service b- > [ service d ], service c- > [ ], according to the static dependency information.
The related service packages comprise a service A, a service a, a service b, a service c and a service d, wherein whether the service is already deployed is firstly searched in a service operation directory, whether existing service packages exist is secondly searched in a local warehouse temporary directory, and if the existing service packages do not exist, the service packages are downloaded from a service package management process.
And decompressing the service package to a service operation directory according to the dependence reverse order, finding a file according to a path defined by the interface description file and an rtspSoftLink value, copying or assembling a file link, and executing an initial script in the package to finish deployment.
In some possible embodiments of the present application, the run directory structure is as follows, with the relationships of the services being tiled, deployed in reverse order.
run-folder
Service A
|--static
|--import
I-service b-rtsp imports service b
Service b
|--static
|--export
|--rtsp
Service c
Service d
After the micro service agent is assembled and deployed with services, whether the services are started or not is judged according to the strong and weak dependence in the interface description file, if a certain interface is strongly dependent, the interface must be loaded with the micro services to start, and if the certain interface is dependent, the micro services can also be started when the interface is absent.
And after the service deployment process monitors that the ms-agent service is completed, issuing a service starting instruction to the ms-agent according to the previous dynamic service dependence information.
According to the technical scheme provided by the embodiment of the application, the micro service package comprises the interface description, the dependency of the micro service package can be directly calculated according to the dependency of the interface during deployment, and the dependency sequence of the service defined manually through a planning file in the prior art is avoided.
In some possible embodiments, the interface description includes resource requirements of the interface, and the deployment affinity of the microservices (which services are suitable for deployment on the same node) is calculated according to the resource requirements.
In some possible embodiments, the interface description information may define a unified service interaction interface, so that it is possible to provide a unified development micro-service framework, shield differences and complexities brought by multiple development languages, integrate and package compilers and linkers of various current development languages, and complete creation, compilation, linking, release, deployment, etc. of micro-services.
The micro-service interface description file exists, the self-checking completeness is facilitated based on the strong type constraint of the interface, and the micro-service development difficulty is simplified.
As shown in fig. 3, in some possible embodiments, another embodiment of the present application discloses a technical solution of a method for deploying a microservice package, which includes the following steps.
301. Acquiring a micro service package, wherein the micro service package comprises an interface description file; the interface description file comprises: the interfaces on which the micro service package depends and the interfaces issued by the micro service package.
302. And determining the service dependence of the micro service package according to the interface description file, wherein the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates.
303. And determining the micro service packages needing to be loaded locally and the micro program package groups needing to be accessed through the remote interface according to the service dependence.
304. And determining the node where each micro-program package group is deployed.
305. And locally loading the micro service pack needing to be locally loaded.
306. And triggering to load the corresponding microprogram packet on the node corresponding to each microprogram packet.
In some possible embodiments, the determining the service dependency of the microservice package according to the interface description file includes: and determining a dependency chain according to the interface on which the micro service packet depends.
In some possible embodiments, the service dependency comprises: static and dynamic dependencies; wherein, the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
In some possible embodiments, the method further comprises: and grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
Fig. 4 is a schematic structural diagram of a processing apparatus 400 for a microservice package according to an embodiment of the present application, including: an acquisition unit 401 and a determination unit 402. The acquiring unit 401 is configured to acquire a micro service package, where the micro service package includes an interface description file; the interface description file comprises: the interfaces on which the micro service package depends and the interfaces issued by the micro service package. A determining unit 402, configured to determine, according to the interface description file, a service dependency of the microservice package, where the service dependency is used to describe a microservice package on which the microservice package depends when running. The specific implementation of each module refers to the description in the foregoing method embodiment, and is not described here again.
In some possible embodiments, in terms of determining the service dependency of the microservice package according to the interface description file, the determining unit is specifically configured to determine a dependency chain according to an interface on which the microservice package depends; the dependency chain is used to represent: when the micro service package is operated, the micro service package corresponding to the dependence chain in the reverse order is loaded.
In some possible embodiments, the static dependency is a micro-package that needs to be loaded locally; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
In some possible embodiments, the processing device 400 of the microservice package further includes: and the grouping unit is used for grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
As shown in fig. 5, a deployment apparatus 500 of a microservice package is disclosed in an embodiment of the present application, including: an acquisition unit 501, a first determination unit 502, a second determination unit 503, a third determination unit 504, a first processing unit 505, and a second processing unit 506. An obtaining unit 501, configured to obtain a micro service package, where the micro service package includes an interface description file; the interface description file comprises: the interfaces on which the micro service package depends and the interfaces issued by the micro service package. A first determining unit 502, configured to determine, according to the interface description file, a service dependency of the microservice package, where the service dependency is used to describe a microservice package on which the microservice package depends when running. A second determining unit 503, configured to determine, according to the service dependency, a micro service package that needs to be loaded locally and a micro program package group that needs to be accessed through a remote interface. A third determining unit 504, configured to determine a node where each of the micro package groups is deployed. A first processing unit 505, configured to load the micro service package that needs to be loaded locally. A second processing unit 506, configured to trigger loading of a corresponding micro-program package packet on a node corresponding to each micro-program package packet. The specific implementation of each module refers to the description in the foregoing method embodiment, and is not described here again.
In some possible embodiments, in terms of determining the service dependency of the microservice package according to the interface description file, the first determining unit is specifically configured to determine the dependency chain according to the interface on which the microservice package depends.
In some possible embodiments, the service dependencies include: static and dynamic dependencies; wherein, the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
In some possible embodiments, the deployment apparatus of the microservice package may further include: and the grouping unit is used for grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
The embodiment of the application also provides a computing device, which comprises a processor and a memory; the processor is configured to execute the computer instructions stored by the memory to cause the computing device to perform the method described in any of the preceding method embodiments.
The present application further provides a computer-readable storage medium storing computer instructions for instructing a computing device to execute the method described in any of the foregoing method embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., compact disk), or a semiconductor medium (e.g., solid state disk), among others. In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the foregoing embodiments, the descriptions of the embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is merely a logical division, and the actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the indirect coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, and may be electrical or in 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, may be located in one place, or may be 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, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.

Claims (18)

1. A method for processing a microservice package, comprising:
acquiring a micro service package, wherein the micro service package comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package;
and determining the service dependence of the micro service package according to the interface description file, wherein the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates.
2. The method of claim 1, wherein determining the service dependency of the microservice package from the interface description file comprises: and determining a dependency chain according to the interface on which the micro service packet depends.
3. The method according to claim 1 or 2, wherein the service dependency comprises: static and dynamic dependencies; wherein the content of the first and second substances,
the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started;
the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
4. The method of claim 3, further comprising:
and grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
5. A deployment method of a micro service pack is characterized by comprising the following steps:
acquiring a micro service package, wherein the micro service package comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package;
determining the service dependence of the micro service package according to the interface description file, wherein the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates;
determining a micro service package needing to be loaded locally and a micro program package group needing to be accessed through a remote interface according to the service dependence;
determining a node where each of the micro-package groups is deployed;
loading a micro service package which needs to be loaded locally;
and triggering to load the corresponding microprogram packet on the node corresponding to each microprogram packet.
6. The method of claim 5, wherein determining the service dependency of the microservice package from the interface description file comprises: and determining a dependency chain according to the interface on which the micro service packet depends.
7. The method of claim 5 or 6, wherein the service dependency comprises: static and dynamic dependencies; wherein, the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started; the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
8. The process of claim 7, wherein after said determining the dependency of the microservice package from the interface description file, the process further comprises:
and grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
9. An apparatus for processing microservice packets, comprising:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a micro service package which comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package;
and the determining unit is used for determining the service dependence of the micro service package according to the interface description file, and the service dependence is used for describing the micro service package depended by the micro service package when the micro service package operates.
10. The apparatus of claim 9,
in the aspect of determining the service dependency of the micro service package according to the interface description file, the determining unit is specifically configured to determine a dependency chain according to an interface on which the micro service package depends; the dependency chain is used to represent: when the micro service package is operated, the micro service package corresponding to the dependence chain in the reverse order is loaded.
11. The apparatus according to claim 9 or 10, wherein the service dependency comprises: static and dynamic dependencies; wherein the content of the first and second substances,
the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started;
the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
12. The apparatus of claim 11, further comprising:
and the grouping unit is used for grouping the microprogram packages which need to be accessed through the remote interface according to a preset grouping strategy.
13. A deployment device of a microservice package, comprising:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a micro service package which comprises an interface description file; the interface description file comprises: the interface on which the micro service package depends and the interface issued by the micro service package;
a first determining unit, configured to determine, according to the interface description file, a service dependency of the microservice package, where the service dependency is used to describe a microservice package on which the microservice package depends when running;
the second determining unit is used for determining the micro service packages needing to be loaded locally and the micro program package groups needing to be accessed through the remote interface according to the service dependence;
a third determining unit, configured to determine a node at which each of the micro packages is deployed in a group;
the first processing unit is used for locally loading the micro service package needing to be locally loaded;
and the second processing unit is used for triggering the loading of the corresponding microprogram packet on the node corresponding to each microprogram packet.
14. The apparatus of claim 13,
in terms of determining the service dependency of the micro service package according to the interface description file, the first determining unit is specifically configured to determine the dependency chain according to the interface on which the micro service package depends.
15. The apparatus of claim 13 or 14, wherein the service dependency comprises: static and dynamic dependencies; wherein the content of the first and second substances,
the static dependency is used for representing a micro program package which needs to be loaded locally when the micro service package is started;
the dynamic dependency is used for representing a micro-program package which needs to be accessed through a remote interface when the micro-service is started or run.
16. The apparatus of claim 15, further comprising:
and the grouping unit is used for grouping the micro-program packages which need to be accessed through the remote interface according to a preset grouping strategy after the first determining unit determines the service dependence of the micro-service package.
17. A computing device, wherein the computing device comprises a processor and a memory; the processor, configured to execute the computer instructions stored by the memory, to cause the computing device to perform the method of any of claims 1 to 8.
18. A computer-readable storage medium storing computer instructions for instructing a computing device to perform the method of any of claims 1 to 8.
CN202010316034.7A 2020-04-20 2020-04-20 Micro-service processing method, micro-service deployment method and related device Pending CN113535254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010316034.7A CN113535254A (en) 2020-04-20 2020-04-20 Micro-service processing method, micro-service deployment method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010316034.7A CN113535254A (en) 2020-04-20 2020-04-20 Micro-service processing method, micro-service deployment method and related device

Publications (1)

Publication Number Publication Date
CN113535254A true CN113535254A (en) 2021-10-22

Family

ID=78093798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010316034.7A Pending CN113535254A (en) 2020-04-20 2020-04-20 Micro-service processing method, micro-service deployment method and related device

Country Status (1)

Country Link
CN (1) CN113535254A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116136756A (en) * 2023-04-18 2023-05-19 浪潮通用软件有限公司 Layered structure-based microservice assembly method, device, equipment and medium
CN117076004A (en) * 2023-10-13 2023-11-17 美云智数科技有限公司 Micro-service packaging and merging method and device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116136756A (en) * 2023-04-18 2023-05-19 浪潮通用软件有限公司 Layered structure-based microservice assembly method, device, equipment and medium
CN117076004A (en) * 2023-10-13 2023-11-17 美云智数科技有限公司 Micro-service packaging and merging method and device and electronic equipment
CN117076004B (en) * 2023-10-13 2024-04-12 美云智数科技有限公司 Micro-service packaging and merging method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US20020069192A1 (en) Modular distributed mobile data applications
CN103309706B (en) Memory file system preparation method based on (SuSE) Linux OS and unit
EP1775913A1 (en) Method for controlling multimedia middleware apparatus using metadata
CN110750545B (en) Dynamic library heat updating method, device, medium and equipment
CN107291481B (en) Component updating method, device and system
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN113535254A (en) Micro-service processing method, micro-service deployment method and related device
CN110162964A (en) A kind of inspection method that file is distorted, apparatus and system
US20230259358A1 (en) Documentation enforcement during compilation
WO2019029451A1 (en) Method for publishing mobile applications and electronic apparatus
WO2022222625A1 (en) Application component compiling method and apparatus, device, and storage medium
CN110489162B (en) Method, device, medium and equipment for simplifying installation package SO (storage and retrieval) file
CN114579206B (en) Method, device, equipment and medium for dynamically loading application program
CN116069366A (en) Client application program updating method and device, storage medium and electronic equipment
CN116049142A (en) Data processing method, device, electronic equipment and storage medium
WO2022078057A1 (en) Method and apparatus for publishing application package, method and apparatus for applying application package, and medium, server and device
CN115840598A (en) Micro front-end architecture system, development method, device and medium based on application market
CN104217021A (en) Reading server, terminal equipment and method for displaying reading contents
CN110502251B (en) Application installation method and device
CN113672334A (en) Container management method and device
CN113064987A (en) Data processing method, apparatus, electronic device, medium, and program product
CN111683005A (en) Internet of things intelligent gateway equipment and construction method thereof
CN113741951A (en) Local packaging method and device
CN105610908B (en) A kind of samba service implementing method and system based on Android device

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