WO2010048898A1 - 组合服务的部署方法和装置 - Google Patents
组合服务的部署方法和装置 Download PDFInfo
- Publication number
- WO2010048898A1 WO2010048898A1 PCT/CN2009/074731 CN2009074731W WO2010048898A1 WO 2010048898 A1 WO2010048898 A1 WO 2010048898A1 CN 2009074731 W CN2009074731 W CN 2009074731W WO 2010048898 A1 WO2010048898 A1 WO 2010048898A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- deployment
- service
- sub
- sequence
- services
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
Definitions
- the present invention relates to the field of network communications, and in particular, to a method and apparatus for deploying a combined service. Background of the invention
- a composite service is usually composed of a set of sub-services from different sub-service classes, according to certain logical connections and dependencies, and through the interaction and cooperation between sub-services.
- the prior art method for deploying Web services is concerned with: Considering the standardization of Web services from the overall deployment of traditional services (for example, from the level of metadata) Standardizing Web services), the standardization mainly includes the representation of Web services or the standardization of the process of service deployment, without considering that the composite service system provides customized services that meet user needs through interaction, coordination and collaboration between sub-services.
- the service deployment in the method that causes the deployment of the Web service is relatively large and inconvenient to operate. Summary of the invention
- Embodiments of the present invention provide a method and apparatus for deploying a combined service to implement service deployment based on a relationship between sub-services.
- a method of deploying a composite service including:
- the deployment sequence includes a deployment manner of the subservices of the combined service
- the deployment of the combined service is performed in accordance with the optimized deployment sequence.
- a deployment device for a combined service comprising:
- a deployment sequence optimization unit configured to acquire a deployment sequence of the composite service, where the deployment sequence includes a deployment manner of the subservice of the composite service, and the deployment sequence is processed according to the deployment manner of the subservice, and the optimized deployment sequence is generated;
- a service deployment unit configured to perform deployment of the combined service according to the optimized deployment sequence.
- the embodiment of the present invention simplifies the deployment sequence of the combined service by standardizing the deployment manner of the sub-services in the combined service, and optimizing the deployment sequence.
- the scale of service deployment is reduced, the consumption of system resources is effectively reduced, and the work intensity of managers is reduced.
- FIG. 1 is a schematic diagram of a method for deploying a composite service according to an embodiment of the present invention
- FIG. 2 is a schematic structural diagram of a device for deploying a composite service based on a sub-service according to Embodiment 1 of the present invention
- FIG. 3 is a flowchart of a method for deploying a service based on a sub-service according to a second embodiment of the present invention
- FIG. 4 is a flowchart of another method for deploying a service based on a sub-service according to Embodiment 2 of the present invention
- FIG. 5 is a flowchart of internal processing of a deployment sequence normalization unit according to Embodiment 2 of the present invention
- FIG. 6 is a flowchart of processing performed by a deployment execution projection algorithm according to Embodiment 2 of the present invention.
- FIG. 7 is a flowchart of internal processing of a deployment sequence simplification unit according to Embodiment 2 of the present invention.
- FIG. 8 is a flowchart of internal processing of a deployment sequence verification unit according to Embodiment 2 of the present invention.
- FIG. 9 is a schematic diagram of a processing procedure for determining a verification result according to a user's intention according to Embodiment 2 of the present invention.
- FIG. 10 is a flowchart of internal processing of a service deployment unit according to Embodiment 2 of the present invention.
- FIG. 11 is a schematic structural diagram of a schema of an extensible markup language (XML) describing a subservice of a service that has been deployed in a composite service system according to Embodiment 3 of the present invention
- FIG. 12 is a schematic diagram of basic information of four sub-services in a combined service system according to Embodiment 3 of the present invention.
- FIG. 13 is a schematic diagram of basic information of 15 sub-services included in the service S to be deployed according to Embodiment 3 of the present invention. Mode for carrying out the invention
- the deployment sequence of the combined service is obtained, and the deployment sequence includes a deployment mode of the sub-service of the combined service, and the deployment sequence is processed according to the deployment manner of the sub-service to generate an optimized deployment sequence.
- the deployment of the composite service is then performed in accordance with the optimized deployment sequence.
- FIG. 1 A schematic diagram of a method for deploying a combined service proposed in the embodiment of the present invention and a prior art focus is shown in FIG. 1 .
- Embodiments of the present invention focus on the internal structure of a composite service, study the relationship between sub-services in a composite service, and the effect of a service deployment process, and consider service deployment and optimization from the perspectives of sub-service reuse and sub-service compatibility.
- the prior art considers the deployment process and expression of the combined service as a whole from the combined service.
- a Web service is usually supported by a set of sub-services from different sub-service classes, according to certain logical connections and dependencies, and through the interaction between sub-services.
- the logical connections and dependencies between the above sub-services determine the order in which these sub-services are deployed when a web service starts.
- a sub-service class consists of a set of sub-services with similar functions.
- CF(i) is used to represent the sub-service class with family number i. Any sub-service in the sub-service class has a version number P.
- the service S C For a sub-set of services the service S C, with a certain arrangement of the set C indicates a neutron and services, the set of all permutations of C neutrons and services referred to as ⁇ rc ⁇ .
- ° C ⁇ means that the child service is deployed before the child service.
- the functionality of a system consists of a set of pre-defined independent services that are extracted by extracting the services that the system provides to the user.
- the process of functional expansion of the system with an independent service that is, inserting a new service S into the original system, can improve the functionality of the system, which is called an independent service deployment step.
- the sub-services included in the added service 15 need to be deployed according to the 15 required sub-service sets ⁇ rc ⁇ and follow the sub-service deployment strategy.
- sub-service deployment strategy is that when a sub-service c is to be deployed in a system that contains a large number of sub-services, sub-services from the same family of sub-services c may already exist in the sub-service collection of the original system. , but the version number may be different. From the perspective of sub-service reuse, how to deploy this sub-service (direct deployment, replacement of existing sub-service deployment, or nothing, etc.) is the deployment strategy of the sub-service.
- the set of sub-services owned by the system is c.
- the embodiment of the present invention defines a deployment strategy of the seed service.
- Deployment Strategy ⁇ indicates how to deploy a new subservice to the system to extend the functionality of the system.
- the four deployment strategies are as follows:
- Insert the deployment policy IIP In the sub-service collection C, directly deploy the sub-service, execute the insert operation ⁇ ' ⁇ 7 ), the insert operation ser , C inserts the sub-service as a new element into the sub-service Collection C.
- a compatibility concept of a sub-service is introduced, and the compatibility of the sub-service is to reflect a relationship between each sub-service having different version numbers in the same sub-service class.
- the embodiments of the present invention define three inter-service compatibility relationships: forward compatibility (FC), backward compatibility (BC), and forward compatibility and backward compatibility (BCAFC).
- sub-service with backward compatibility (abbreviated as BC); if the sub-service can implement those sub-services with large version number in the sub-service class ⁇ The function of r ) is called forward service (FC); if the sub-service can realize the functions of those sub-services (P ⁇ r) with large version number in the sub-service class, and can implement sub-services In the class, the version number is not larger than those of the sub-services ⁇ r ), and the IJ sub-service is both forward-compatible and backward-compatible (BC AFC).
- the sub-service may be separated from the sub-service class to form a new sub-service class.
- the sub-service deployment method can be represented by a triplet «' ⁇ ' ⁇ ), which includes the family number and version number of the sub-service, compatibility relationship, and deployment strategy, indicating compatibility ⁇
- the subservices are deployed according to the deployment policy ⁇ .
- the deployment mode «, Comp [, ⁇ ' ⁇ ) has the insertion effect; otherwise, the deployment mode «, Comp ⁇ , ⁇ ' ⁇ ) has a non-insertion effect (for example, a sub-service with an empty deployment policy only), if there is a sub-service with a family number in the sub-service collection C of the original system, no operation is performed. Has no insertion effect).
- the deployment mode Of 'one' J indicates that the compatibility and deployment policy of the sub-service e can be any value, and other cases are analogous.
- the deployment sequence is a corresponding arrangement of the deployment mode of each sub-service, denoted as ⁇ ⁇ c).
- Use ⁇ jK( r c) ⁇ to represent a collection of all deployment methods in a deployment execution. If there are n deployment methods in the deployment execution, the length of the deployment sequence is n.
- an independent service deployment step it has two deployment effects: First, successful deployment, that is, after the independent service deployment step is performed, the newly started service can provide the normal functions required by the user; The second is security deployment, that is, after the independent service deployment step is performed, the services in the system that previously provided normal functions to the users can still continue to provide normal functions. Accordingly, we call this a successful stand-alone service deployment step and a secure stand-alone service deployment step.
- the deployment process of a service system from scratch is composed of independent service deployment steps, which form an independent service deployment step sequence. If each individual service deployment step in the sequence is a successful independent service deployment step, then the deployment process is referred to as a successful independent service deployment; if each individual service deployment step in the sequence is a secure independent service deployment step, then The deployment process is called a secure stand-alone service deployment.
- the embodiments of the present invention are not to be construed as limiting.
- FIG. 2 is a schematic structural diagram of a device for deploying a sub-service-based combined service provided by this embodiment, including the following Yuan:
- the deployment sequence optimization unit 21 is configured to obtain a deployment sequence of the composite service, where the deployment sequence includes a deployment manner of the sub-services of the combined service, and the deployment sequence is processed according to the deployment manner of the sub-service, and the optimized deployment sequence is generated.
- the service deployment unit 22 is configured to perform deployment of the combined service according to the optimized deployment sequence.
- the composition of the deployment sequence optimization unit 21 and the service deployment unit 22 described above is referred to FIG.
- the above deployment sequence optimization unit 21 includes: a family number acquisition subunit 211, a subservice collection acquisition subunit 212, a deployment sequence reduction subunit 213, and a deployment sequence normalization subunit 214.
- the family number acquisition sub-unit 211 in the deployment sequence optimization unit 21 is configured to acquire the family number to which each sub-service belongs in the deployment sequence, and send the acquired family number information to which each sub-service belongs.
- the sub-service set obtaining sub-unit 212 in the deployment sequence optimization unit 21 is configured to: according to the family number information of each sub-service in the deployment sequence sent by the family number obtaining unit, the deployment sequence is in each Performing a projection operation on the sub-service class, obtaining a sub-service set of the deployment sequence in each sub-service class, and obtaining a sub-service set of the deployment sequence in each sub-service class;
- the unit optimizes the sub-services included in the sub-service set according to the deployment manner of each sub-service by using a pre-stored simplified rule base, and reconstitutes the optimized deployment sequence of the combined service. This eliminates redundant subservices in the deployment sequence and simplifies the overall deployment.
- the deployment sequence normalization sub-unit 214 in the deployment sequence optimization unit 21 has a deployment mode for each sub-service within a combined service system.
- the unit is used to convert the description manner of various sub-service deployment modes into a unified equivalent internal description manner, and the internal description manner is to express the deployment mode of each sub-service as a triplet, the triplet. It includes the family number and version number of the subservice, the compatibility relationship, and the deployment strategy.
- the deployment manners of all the normalized sub-services are arranged in the set order to form a deployment sequence of the combined service.
- the composition of the above-mentioned family number acquisition subunit 211, subservice collection acquisition subunit 212, deployment sequence reduction subunit 213, and deployment sequence normalization subunit 214 is shown in Fig. 2.
- the deployment device may further include:
- the user is willing to acquire the unit 23, which is used to obtain the user's willingness to use the service deployment effect, including the successful service deployment, the secure service deployment, or the willingness of the successful and secure service deployment, and send the willing information to the deployment.
- Sequence verification unit 24 The deployment sequence verification unit 24 is configured to verify the optimized deployment sequence according to a predetermined verification rule, to obtain deployment effect information of the optimized deployment sequence, and the intention information and the deployment effect information. Comparing, the sub-services satisfying the user's will and the sub-services that do not satisfy the user's will are obtained in the optimized deployment sequence, and are sent to the service deployment unit 22.
- the service deployment unit 22 sends the conformance sent by the deployment sequence verification unit 24.
- the sub-services that the user wishes, according to the order of the sub-services, are deployed according to the deployment strategy and system status of the sub-services, thereby finally completing the service deployment.
- the deployment policies of the sub-services are adjusted, and then output to the deployment sequence optimization unit 21 to perform the above-mentioned simplification and verification processing.
- the above-mentioned sub-service-based composite service deployment device can optimize the deployment sequence involved in the combined service deployment process by studying the compatibility between the logical connection and the dependency relationship between the sub-services, the deployment policy, and the similar function sub-services. And validate the results of the composite service deployment.
- FIG. 3 The structure of the user intention acquisition unit 23 and the deployment sequence verification unit 24 described above is referred to FIG. 3.
- the processing flow of the method for deploying a sub-service-based composite service provided by the embodiment of the present invention is as shown in FIG. 3, and includes the following steps:
- Step 31 Obtain a deployment sequence of the combined service, where the deployment sequence includes a deployment manner in which the composite service includes each sub-service.
- Step 32 Process the deployment sequence of the combined service according to the deployment manner of each of the sub-services, and generate an optimized deployment sequence of the combined service.
- Step 33 Perform deployment of the combined service according to the deployed sequence of the optimized combined service. It can be seen that the technical solution provided by the embodiment of the present invention simplifies the deployment sequence of the combined service by standardizing the deployment manner of the sub-services in the combined service, and greatly reduces the deployment sequence of the combined service. The scale of service deployment effectively reduces the consumption of system resources and reduces the work intensity of managers.
- FIG. 4 The processing flow of another sub-service-based composite service deployment method provided by the embodiment of the present invention is as shown in FIG. 4, and includes the following steps:
- Step 41 Normalize the deployment sequence.
- the deployment sequence of the service to be deployed is normalized by deploying the sequence normalization unit.
- the internal processing flow chart of the above-mentioned deployment sequence normalization unit is shown in FIG. 5, and the specific processing procedure is as follows:
- each sub-service is accompanied by a description.
- Information the description information includes family number and version information of the sub-service, deployment strategy, and compatibility.
- the family number and version information, deployment policy, and compatibility information of each sub-service in the composite service are obtained according to the description information of the sub-service.
- the description manner of the deployment manner of the various sub-services in the service to be deployed is converted into a unified equivalent internal description manner, and the internal description manner is to express the deployment mode of each sub-service as one Triad, the triple It includes the family number and version number of the subservice, the compatibility relationship, and the deployment strategy.
- the deployment manners of all the normalized sub-services are arranged in a set order to form a deployment sequence of the service to be deployed.
- the sub-service sequence of a service to be deployed ⁇ is ⁇ : ⁇ ⁇ , where a and d belong to family 1, b and c belong to family 3, and f belongs to family 2.
- the version numbers of a and b are 1, the version numbers of c and d are 2, and the version number of f is 3. Then, according to the compatibility of each sub-service and the user's deployment strategy intention, the normalized deployment sequence may be represented as follows:
- Step 42 Extract the family number sequence in the normalized deployment sequence. After obtaining the normalized deployment sequence of the service to be deployed, all family number sequences (ie, sub-service class number sequences) in the normalized deployment sequence are extracted by a specific algorithm, and the obtained family number sequence is output.
- the normalized deployment sequence for service S is
- Step 43 Project the normalized deployment sequence on the sub-service class.
- the normalized deployment sequence ⁇ (c) there may be cases where multiple sub-services belong to the same sub-service class.
- sub-service information included in each sub-service class in ⁇ ( ⁇ ) needs to be obtained.
- the projection on the subservice class Cf « is an arrangement of deployment methods, denoted as Pr0j C , . It has sub-deployment service class number is 1 in the ⁇ ⁇ , arrayed according to their respective positions in the ⁇ ⁇ .
- Pr0j C deployment methods
- a sub-service included in each sub-service class in ⁇ ( ⁇ ) can be obtained.
- the processing flow of the deployment execution projection algorithm is as shown in FIG. 6 , and the deployment performs a projection acquisition unit.
- One process of the projection algorithm performed is as follows: Algorithm 2. Projection algorithm for deploying sequences on the family
- the deployment sequence for service S is
- Step 44 Simplify the normalized deployment sequence.
- the more complex the service function the more sub-services it contains, and the larger the deployment size. Therefore, the corresponding deployment execution will be more complicated. If you include different versions of these sub-services. If you take it into consideration, the corresponding deployment will be more complicated. Therefore, simplifying the deployment scale of sub-services is an important process to enhance the practical application capabilities of the composite service system.
- the premise of simplifying the deployment scale of sub-services is to ensure that the sub-services C of service S follow the deployment strategy, before and after simplification.
- ⁇ ( ) Eff cts ( c))
- ⁇ ( ) Eff cts ( c))
- the deployment sequence of the service s is
- Step 45 Verify the simplified deployment sequence.
- the deployment sequence verification unit uses the verification rule base to verify the simplified deployment sequence, and obtains the verification result of the simplified deployment sequence, and the verification result includes: security or successful verification result.
- the internal processing flow of the above-mentioned deployment sequence verification unit is as shown in FIG. 8.
- the specific processing procedure is as follows:
- the verification rule is obtained by accessing the verification rule base, and the verification rule is set according to the definition of the above successful deployment and security deployment, mainly including successful deployment.
- the deployment verification rules can determine whether a deployment mode is successful after being deployed.
- the security deployment verification rule can determine whether a deployment mode is secure after being deployed. Use the verification rules to judge each deployment mode in the simplified deployment sequence, judge the success and security of the deployment, and then comprehensively consider the judgment result of each deployment mode in the deployment sequence to obtain a simplified deployment sequence. Success and safety Validation results.
- the user's willingness to be collected by the user's willingness expression is invoked, and the verification result is judged, and whether the optimized deployment sequence satisfies the judgment result of the user's will.
- the process of determining the verification result according to the user's intention provided by this embodiment is shown in FIG. 9.
- the specific processing process is as follows: For example, if the user wishes to deploy a service that requires success, when the obtained verification result is a successful verification result, The optimized deployment sequence satisfies the user's wishes; when the obtained verification result is not a successful verification result, the optimized deployment sequence does not satisfy the user's will.
- the optimized deployment sequence satisfies the user's will; when the obtained verification result is not a secure verification result, the optimized deployment sequence is not satisfied. User's wishes.
- the optimized deployment sequence satisfies the user's will; when the obtained verification result is not a successful and secure verification result, the optimization is performed.
- the subsequent deployment sequence does not satisfy the user's wishes.
- the system calls the service deployment unit for deployment.
- the deployment strategy of the sub-service needs to be adjusted, and then the process of simplifying and verifying the deployment sequence is re-executed.
- Step 46 Adjust the deployment strategy for the deployment sequence that does not satisfy the user's intention, and deploy the deployment sequence that meets the user's wishes.
- the four deployment strategies proposed by the embodiments of the present invention are: the insertion deployment strategy, the coverage deployment strategy, the new deployment strategy, and the limitation of the empty deployment strategy are sequentially increased.
- the insertion deployment strategy is adopted, the obtained deployment sequence must be secure and successful. Therefore, the system adjusts the deployment policy in such a way as to reduce the limitations of the deployment strategy for each subservice in the deployment sequence:
- the service deployment unit can perform the service deployment.
- the internal processing flow of the service deployment unit provided in this embodiment is as shown in FIG. 10, and the specific processing procedure is as follows:
- Analyze the deployment mode of each sub-service in the optimized deployment sequence obtain the deployment strategy of each sub-service, and deploy each sub-service according to the arrangement of the sub-services in the deployment sequence according to the deployment strategy, with each deployment sequence Once the deployment of a subservice is complete, the entire service completes the deployment process.
- the deployment method of the combined service provided by the embodiment can effectively reduce the size of the sub-services that need to be deployed in the service deployment, and can deploy the service according to the user's will, thereby avoiding waste of human resources/resources due to the inability to expect the service deployment effect.
- Embodiment 3
- This embodiment describes the deployment process of a particular service in a composite service system.
- the sub-services of the services already deployed in the above composite service system may be described by an extensible markup language (XML).
- XML extensible markup language
- the structure of the XML schema is as shown in FIG. 11.
- the XML Schema describes the service installation sequence.
- An example of the necessary information For example: Contains 0 ⁇ multiple subservices, each of which has attributes such as ID, name, version, family, compatibility, installation policy, subservice current installation status (waiting for installation, already installed, skip installation).
- sub-services there are four sub-services in the combined service system.
- the basic information of the four sub-services is shown in Figure 12.
- the four sub-services belong to four sub-service classes 1, 2, 3, and 5.
- the deployment mode of each sub-service As shown below:
- a service S is deployed on the combined service system, and the service includes 15 sub-services.
- the basic information of the 15 sub-services is shown in FIG. 13 , and the 15 sub-services belong to 5 sub-service categories, and each sub-service is Have your own subservice compatibility and deployment strategy.
- the sub-services included in each sub-service class in ⁇ ( ⁇ ) can be obtained, and the projection sequence of the deployment sequence of the service 5 on each family is: , EIP) ⁇ , OIP) ⁇
- the sub-service deployment policy adjustment unit is invoked to adjust the initially specified sub-service deployment policy, and then the deployment policy of each sub-service in the sub-service deployment sequence is sequentially decreased, and the deployment sequence simplification unit is re-invoked after each adjustment and thereafter.
- System flow In this embodiment, the second scheme is adopted, and the sub-service deployment strategy is adjusted for ⁇ ).
- the number of sub-services of the service is reduced to six, and the deployment size of the sub-services is reduced by 60% (and the six sub-services are not deployed at all. According to the sub-service deployment strategy, no deployment is required. To the system), effectively reducing the consumption of system resources.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
- ROM read-only memory
- RAM random access memory
- the embodiment of the present invention starts from the perspective of the user-aware service and the overall utility of the service system, focuses on the deployment and dynamic configuration of the service, and the content of interest is closer to the application environment of the real service deployment, so that the service deployment process based on the sub-service is made. It is standardized and easy to operate.
- the present invention can be implemented by hardware, or can be implemented by means of software plus necessary general hardware platform, and the technical solution of the present invention. It may be embodied in the form of a software product, which may be stored in a computer readable storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for making a computer device (may be Personal computer, server, or network Apparatus, etc.) performs the methods described in various embodiments of the present invention.
- a computer readable storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
- a computer device may be Personal computer, server, or network Apparatus, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Mobile Radio Communication Systems (AREA)
Description
组合服务的部署方法和装置
本申请要求了 2008年 10月 30日提交的、 申请号为 200810225187. X、 发明名称为 "组合服务 的部署方法和装置" 的中国申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及网络通信领域, 尤其涉及一种组合服务的部署方法和装置。 发明背景
随着技术、 需求的快速发展, 如何快速、 方便、 低成本的提供 Web新服务成为重要技术点, 在这 基础上, 组合服务技术快速发展起来。 随着越来越多的系统应用组合服务, 组合服务的部署和优化 成为了关键。 在实际的基于子服务的组合服务系统中, 一个组合服务通常是由一组来自不同子服务类的子服 务, 按照一定的逻辑连接和依赖关系并通过子服务间的交互与协作构建起来的。
在实现本发明实施例的过程中,发明人发现:现有技术中的对 Web服务进行部署的方法所关注的 是: 从传统服务整体部署上来考虑 Web服务的规范化(比如从元数据的层面上去规范 Web服务), 该 规范化主要包括 Web服务的表示方式或者服务部署的过程的规范化, 而没有考虑到组合服务系统是 通过子服务之间的交互、 协调与协作来提供满足用户需求的定制服务, 导致该对 Web服务进行部署 的方法中的服务部署的规模比较大, 不便于操作。 发明内容
本发明的实施例提供了一种组合服务的部署方法和装置, 以实现基于子服务之间的关系进行服 务部署。
本发明的目的是通过以下技术方案实现的:
一种组合服务的部署方法, 包括:
获取组合服务的部署序列, 所述部署序列含有组合服务的子服务的部署方式;
根据所述子服务的部署方式处理部署序列, 生成优化后的部署序列;
按照所述优化后的部署序列进行所述组合服务的部署。
一种组合服务的部署装置, 包括:
部署序列优化单元, 用于获取组合服务的部署序列, 所述部署序列含有组合服务的子服务的部 署方式, 按照所述子服务的部署方式处理部署序列, 生成优化后的部署序列;
服务部署单元, 用于按照所述优化后的部署序列进行所述组合服务的部署。
由上述本发明的实施例提供的技术方案可以看出, 本发明实施例通过对组合服务中的子服务的 部署方式进行规范化处理, 并且对部署序列进行优化, 简化了组合服务的部署序列, 大大降低了服 务部署的规模, 有效减少系统资源的消耗, 降低管理人员的工作强度。
附图简要说明
图 1为本发明实施例提出的对组合服务进行部署的方法与现有技术关注点的对比示意图; 图 2为本发明实施例一提供的一种基于子服务的组合服务的部署装置的结构示意图; 图 3为本发明实施例二提供的一种基于子服务的组合服务的部署方法的处理流程图; 图 4为本发明实施例二提供的另一种基于子服务的组合服务的部署方法的处理流程图; 图 5为本发明实施例二提供的部署序列规范化单元的内部处理流程图;
图 6为本发明实施例二提供的部署执行投影算法的处理流程图;
图 7为本发明实施例二提供的部署序列简化单元的内部处理流程图;
图 8为本发明实施例二提供的部署序列验证单元的内部处理流程图;
图 9为本发明实施例二提供的根据用户意愿判断验证结果的处理过程示意图;
图 10为本发明实施例二提供的服务部署单元的内部处理流程图;
图 11为本发明实施例三提供的描述组合服务系统中已经部署的服务的子服务的可扩展标记语言 (XML, extensible Markup Language ) 的 schema的结构示意图;
图 12为本发明实施例三提供的组合服务系统中的 4个子服务的基本信息示意图;
图 13为本发明实施例三提供的需要部署的服务 S中包含的 15个子服务的基本信息示意图。 实施本发明的方式
下面将参考附图详细说明本发明实施例。
在本发明实施例中, 获取组合服务的部署序列, 所述部署序列含有组合服务的子服务的部署方 式, 根据所述子服务的部署方式处理上述部署序列, 生成优化后的部署序列。 然后, 按照所述优化 后的部署序列进行所述组合服务的部署。
本发明实施例提出的对组合服务进行部署的方法与现有技术关注点的对比示意图如图 1所示。本 发明实施例着眼于组合服务的内部构造, 研究组合服务中子服务之间的关系以及服务部署过程的效 果, 从子服务重用、 子服务兼容性等角度来考虑服务部署和优化。 而现有技术从组合服务整体上来 考虑组合服务的部署过程及表达方式。
在实际的基于子服务的 Web服务系统中,一个 Web服务通常是由一组来自不同子服务类的子服务, 按照一定的逻辑连接和依赖关系并通过子服务间的交互来支持的。 上述子服务间的逻辑连接与依赖 关系, 决定了在某个 Web服务启动时, 这些子服务的部署顺序。 一个子服务类由一组具有相似功能的子服务所组成, 用 CF(i)来表示具有家族号 i的子服务类, 子服务类中的任意子服务 都具备一个版本号 P。 对于一个服务 S的子服务集合 C, 用 表示该 集合 C中子服务的某种排列,集合 C中子服务的所有排列记为 { rc}。用顺序连接符 0来连接两个实 体, 表示一个实体先于另一个实体, 例如 °C】意味着子服务 在子服务 之前部署。
一个系统的功能性是由一组预先定义好的独立服务所组成的, 独立服务是通过对系统所提供的 用户能够感知的服务进行抽取而得到的。 用一个独立服务对系统进行功能扩充的过程, 即在原有的 系统中插入一个新的服务 S, 可以使系统在功能性上得到提高, 称之为独立服务部署步。与此同时, 增加的服务15中所包含的子服务需要按照15所要求的子服务集合 { rc}来进行部署,并遵循子服务的 部署策略。
所谓的子服务的部署策略, 就是当一个子服务 c要在包含有大量子服务的系统中进行部署的时 候, 原系统的子服务集合中可能已经存在了来自于子服务 c相同家族的子服务, 只是版本号可能会 有区别。 从子服务重用的角度来看, 如何部署这个子服务 (直接部署、 替换已有的子服务部署, 或 是什么也不做等等) 就是子服务的部署策略。
给定一个系统, 其所拥有的子服务集合为 c, 当需要在 c中插入家族号为 、 版本号为 的子 服务时, 本发明实施例定义了 4种子服务的部署策略。 部署策略 ^表示如何将一个新的子服务 部署到系统中来扩展系统的功能。 该 4种部署策略 如下:
1、插入部署策略 IIP:即在子服务集合 C中,直接部署子服务 ,执行插入操作 ^^^^' ^7), 该插入操作 ser ,C 是把子服务 作为一个新元素插入到子服务集合 C中。
2、 覆盖部署策略 0IP: 即在子服务集合 C中, 如果包含有家族号为 的子服务, 则执行替换操 作 Repalc , C), 该替换操作 Repalc , C)是用上述新的子服务 替换子服务集合 C中所有 具有家族号为 i的子服务; 如果不存在家族号为 i的子服务, 则执行上述插入操作 1騰 。
3、 择新部署策略 NIP: 即在子服务集合 C中, 如果不存在家族号为 的子服务, 则执行插入操 作 1腳^ ' . 如 果 存 在 家 族 号 为 的 子 服 务 , 那 么 执 行 替 换 操 作
Replace^, { c G C,q≤p}) ^ 即用上述新的子服务 替换子服务集合 C中, 家族号为/且版本 号低于 的所有子服务。 如果包含和待插入的子服务的家族号相同、 版本号比所述待插入的子服务 的版本号高的其它子服务, 则不执行任何操作。
4、 仅空部署策略 EIP: 即在子服务集合 C中, 如果不存在家族号为 的子服务, 则执行插入操 作 sert(cj C), 否则什么操作都不执行。 上述子服务部署策略 只会影响子服务集合 C中具有家族号 1的子服务。
在本发明实施例中, 引入子服务的兼容性概念, 该子服务的兼容性是为了体现同一子服务类中 具有不同版本号的各个子服务之间的关系。 本发明实施例定义了三种的子服务间兼容关系: 向前兼 容 (FC) 、 向后兼容 (BC)和既向前兼容又向后兼容 (BCAFC) 。 如果子服务 能够实现子服务类
中版本号不比 大的那些子服务 ( ≥ "")的功能, 则称子服务 具有向后兼容性 (简称 BC ) ; 如果子服务 能够实现子服务类 中版本号比 大的那些子服务 ρ < r)的功能, 则称子服务 具有向前兼容性 (简称 FC ) ; 如果子服务 既能够实现子服务类 中版本号比 大的那些子服务 (P < r)的功能, 又能够实现子服务类 中版本号不比 大的那些子服务 ≥ r)的功能, 贝 IJ称 子服务 既向前兼容又向后兼容 (简称 BC AFC ) 。
对于子服务类中可能出现的和其它子服务既不向前兼容也不向后兼容的子服务, 可以把该子服 务从子服务类中分离出来, 形成一个新的子服务类。 子服务 的部署方式可以用一个三元组 «' ^^'^^Ρ )来表示,该三元组中包括子服务的家 族号和版本号、 兼容关系以及部署策略, 表示具有兼容性 ^^的子服务 按照部署策略 ^进 行部署。 对于一个子服务 , 如果按照部署策略 ^进行部署之后, 子服务 插入到了子服务集 合 c中, 则称部署方式 «, Comp【, ΙΡ'Ρ )具有插入效果; 否则称部署方式 «, Comp^, ΙΡ'Ρ )具有未 插入效果(例如, 采用仅空部署策略 ΕΙΡ的子服务 , 如果原系统的子服务集合 C中存在家族号为 的子服务, 则不进行任何操作。 此时 的部署方式就具有未插入效果) 。 在本发明实施例中, 部署 方式 Of '一' J表示子服务 e 的兼容性和部署策略可以是任意值, 其它的情况类推。 在本发明实施例中,给定一个子服务集合 C的一个子服务排列 ,那么 的部署序列是 中 每个子服务的部署方式的相应排列, 记为 <^c)。 用 {jK( rc)}来表示部署执行 中的所有 部署方式的集合。 如果部署执行 中有 n个部署方式, 那么部署序列 的长度就为 n。
在本发明实施例中, 对于一个独立服务部署步, 它具有两种部署效果: 一是成功部署, 即在该 独立服务部署步进行之后, 新启动的服务能够提供用户当前所需的正常功能; 二是安全部署, 即在 该独立服务部署步进行之后,系统中以前为用户提供正常功能的服务仍然能够继续提供正常的功能。 相应的, 我们称之为成功的独立服务部署步和安全的独立服务部署步。
一个服务系统从无到有的部署过程, 是由一个个独立服务部署步组成的, 这些独立服务部署步 组成一个独立服务部署步序列。 如果序列中每一个独立服务部署步都是成功的独立服务部署步, 那 么该部署过程称为成功的独立服务部署; 如果序列中每一个独立服务部署步都是安全的独立服务部 署步, 那么该部署过程称为安全的独立服务部署。 为便于对本发明实施例的理解, 下面将结合附图以具体实施例为例做进一步的解释说明, 且各 个实施例并不构成对本发明实施例的限定。
该实施例提供的一种基于子服务的组合服务的部署装置的结构示意图如图 2所示, 包括如下单
元:
部署序列优化单元 21, 用于获取组合服务的部署序列, 所述部署序列含有组合服务的子服务的 部署方式, 按照所述子服务的部署方式处理部署序列, 生成优化后的部署序列。
服务部署单元 22, 用于按照所述优化后的部署序列进行所述组合服务的部署。
上述部署序列优化单元 21和服务部署单元 22的组成结构参考图 2。 上述部署序列优化单元 21包括: 家族号获取子单元 211、 子服务集合获取子单元 212、 部署序 列简化子单元 213和部署序列规范化子单元 214。
其中, 所述的部署序列优化单元 21中的家族号获取子单元 211, 该单元用于获取部署序列中各 个子服务所属的家族号, 并将获取到的各个子服务所属的家族号信息发送给子服务集合获取子单元 212、 部署序列简化子单元 213。 如果一个子服务没有标明家族号, 则默认为该子服务隶属于新的子服务类。
其中, 所述的部署序列优化单元 21中的子服务集合获取子单元 212, 用于根据家族号获取单元 发送过来的部署序列中各个子服务所属的家族号信息, 将所述部署序列在每一个子服务类上执行投 影操作, 得到所述部署序列在每一个子服务类中的子服务集合, 获取所述部署序列在每一个子服务 类中的子服务集合;
其中, 所述的部署序列优化单元 21中的部署序列简化子单元 213, 当同一家族中的子服务在同 一个服务的部署过程中多次出现时, 由于这些子服务之间存在着兼容关系, 以及根据子服务的部署 策略, 可能会有一些冗余的子服务存在。 该单元利用预先保存的简化规则库, 按照每个子服务的部 署方式, 对所述子服务集合中包含的子服务进行优化, 重新组成所述组合服务的优化后的部署序列。 从而消除部署序列中的冗余子服务, 简化整个部署规模。
其中,所述的部署序列优化单元 21中的部署序列规范化子单元 214,在一个组合服务系统内部, 每一个子服务都对应一个部署方式。 该单元用于将各种子服务的部署方式的描述方式转换为统一的 等价的内部描述方式, 该内部描述方式是将每一个子服务的部署方式表示为一个三元组, 该三元组 中包括子服务的家族号和版本号、 兼容关系以及部署策略。 将所有规范化后的子服务的部署方式按照设定的顺序进行排列,组成所述组合服务的部署序列。 上述家族号获取子单元 211、子服务集合获取子单元 212、部署序列简化子单元 213和部署序列 规范化子单元 214的组成结构参考图 2。 所述部署装置还可以包括:
用户意愿获取单元 23, 该单元用于获取用户对服务部署效果的意愿信息, 该意愿信息包括成功 的服务部署、 安全的服务部署或既成功又安全的服务部署意愿, 并将意愿信息发送给部署序列验证 单元 24。
部署序列验证单元 24, 该单元用于根据预定的验证规则对所述优化后的部署序列进行验证, 得 到所述优化后的部署序列的部署效果信息; 将所述意愿信息和所述部署效果信息进行比较, 得到所 述优化后的部署序列中满足用户意愿的子服务和不满足用户意愿的子服务, 并发送给服务部署单元 22 上述的服务部署单元 22将部署序列验证单元 24发送过来的符合用户意愿的子服务, 按照各个 子服务的排列顺序, 根据子服务的部署策略和系统情况依次进行部署, 从而最终完成服务的部署工 作。
对于不符合用户意愿的子服务, 将这些子服务的部署策略进行调整后, 再输出给部署序列优化 单元 21, 重新进行上述简化、 验证处理。 上述基于子服务的组合服务的部署装置通过研究子服务间的逻辑连接与依赖关系、 部署策略以 及相似功能子服务之间的兼容性, 可以对组合服务部署过程中所涉及到的部署序列进行优化, 并对 组合服务部署结果做出有效的验证。
上述用户意愿获取单元 23、 部署序列验证单元 24组成结构参考图 2。 本发明实施例提供的一种基于子服务的组合服务的部署方法的处理流程如图 3所示,包括如下步 骤:
步骤 31、获取组合服务的部署序列, 所述部署序列含有组合服务中包含各个子服务的部署方式。 步骤 32、 根据所述各个子服务的部署方式处理所述组合服务的部署序列, 生成优化后的所述组 合服务的部署序列。
步骤 33、 按照所述优化后的组合服务的部署序列进行所述组合服务的部署。 由本发明的实施例提供的技术方案可以看出, 本发明实施例通过对组合服务中的子服务的部署 方式进行规范化处理, 并且对部署序列进行优化, 简化了组合服务的部署序列, 大大降低了服务部 署的规模, 有效减少系统资源的消耗, 降低管理人员的工作强度。
本发明实施例提供的另一种基于子服务的组合服务的部署方法的处理流程如图 4所示,包括如下 步骤:
步骤 41、 对部署序列进行规范化。 通过部署序列规范化单元将待部署服务的部署序列进行规范化处理, 上述部署序列规范化单元 的内部处理流程图如图 5所示, 具体处理过程如下: 在组合服务系统中, 每个子服务都附带一个描述 信息, 该描述信息中包含子服务的家族号和版本信息、 部署策略和兼容性等信息。 首先, 根据子服 务的描述信息, 获取组合服务中每个子服务的家族号和版本信息、 部署策略和兼容性信息。
然后, 根据上述获取的信息将待部署服务中的各种子服务的部署方式的描述方式转换为统一的 等价的内部描述方式, 该内部描述方式是将每一个子服务的部署方式表示为一个三元组, 该三元组
中包括子服务的家族号和版本号、 兼容关系以及部署策略。 之后, 将所有规范化后的子服务的部署 方式按照设定的顺序进行排列, 组成所述待部署服务的部署序列。 例如, 一个待部署服务^的子服务序列为^:^^^ ^, 其中 a和 d属于家族 1, b和 c属于 家族 3, f属于家族 2。 a和 b的版本号为 1, c和 d的版本号为 2, f的版本号为 3。 那么根据每个子服务的 兼容性以及用户的部署策略意向, 规范化后的部署序列可能为如下的表示形式:
o(c2 3 , FC, NIP)o{c , BC A FC, OIP) 上述公式中的 G表示家族 1并且版本号为 1, 表示家族 1并且版本号为 2, 表示家族 3并且 版本号为 1, C2 3表示家族 2并且版本号为 3, C3 2表示家族 3并且版本号为 2。 步骤 42、 提取规范化后的部署序列中的家族号序列。 得到待部署服务的规范化后的部署序列之后, 需要通过特定的算法, 提取该规范化后的部署序 列中所有的家族号序列 (即子服务类号序列) , 并将得到的家族号序列输出。
上述特定的算法一种处理过程如下:
例如, 服务 S的规范化后的部署序列为
o(c2 3 , FC, NIP)o{c , BC A FC, OIP)
经过上述算法 i, 得到的家族号序列 p( z"c) = {1,3,2}。
步骤 43、 将规范化后的部署序列在子服务类上进行投影。 上述规范化后的部署序列 ^( c)中可能存在多个子服务属于同一子服务类的情况,为了优化部 署序列, 需要得到^(^)中的每一个子服务类所包含的子服务信息。
IE^c)在子服务类 Cf«上的投影是一个部署方式的排列, 记为 Pr0j C、。 它由 ΙΕ π 中具 有子服务类号 1的部署方式, 按照它们在 ΙΕ π 中的相应位置排列而成。 本发明实施例通过执行特定的部署执行投影算法,可以得到 ^(^)中的每个子服务类包含的子 服务, 该部署执行投影算法的处理流程如图 6所示, 该部署执行投影获取单元执行的投影算法的一种 处理过程如下: 算法 2. 部署序列在家族 上的投影算法
例如, 服务 S的部署序列为
o(c2 3 , FC, NIP)o{c , BC A FC, OIP) 经过算法 1, 得到结果 ?( ) = {1'3'2}, 然后针对 ?(^)中的每一个家族号, 运行算法 2, 得到
IE^c 在各家族上的投影序列:
{( , BC A FC, EIP), (c , BC, NIP)}
{(c3 , BC, IIP), (c3 2 , BC Λ FC, OIP)}
{(c2 3, FC, NIP)} 步骤 44、 对规范化后的部署序列进行简化。 对于一个服务的部署来说, 服务功能越复杂, 所包含的子服务就越多, 部署的规模也就越大, 因此相应的部署执行就会越复杂, 如果把包含的这些子服务的不同版本都考虑进去的话, 其相应的 部署执行会更复杂。 所以简化子服务的部署规模是增强组合服务系统的实际应用能力的重要过程。 简化子服务的部署规模的前提就是保证服务 S的子服务集合 C按照部署策略, 对简化前后的
^(^:)和 ^(^:)分别执行后, 具有相同的子服务集合, 此时, 称 ^c)和 ^(^:)在 S上有等 价的执行效果, 记为:
Eff cts ( c)) = Eff cts ( c)) 在本实施中, 采用 ^记录 中不同子服务类的个数, 可以通过算法 1得到 Ρ( ), P( rc)的 长度就是7 ^。 通过部署序列简化单元执行特定的简化算法, 规范化后的部署序列进行简化。 部署 序列简化单元的内部处理流程如图 7所示, 该部署序列简化单元执行的简化算法的一种处理过程如 下: 算法 3. 简化部署执行在子服务类 上投影的过程
过程名: 简化家族 上的投影 输入: 家族 上的投影 = (cf , Compf , IPf ) oL o(cf ,Compf ,IP/"-)oL o{cf" ,Compf" Pf") 输出: 简化后的投影 pO lifled
过程:
2、 令 j从 1循环至 n i.如果子服务 的部署策略 ^ =EIP, 紘 Pr —Sim禪 ed中至少还 存在一个子服务 c;' x < j), 则从 Proj c、― SimPlified中移除 ( 'ComP> ,ΙΡ:' ) ϋ.如果子服务 的部署策略 =0IP, 则 J Proj )-Simp ed中移除子 服务 之前的所有子服务 iii.如果子服务 的部署策略 =NIP a.如果子服务 之前存在一个子服务 (x≥t' 则从 PrommPufied中 移除(c; b.否则从 中移除 之前所有版本号低于 的子服务输 出
例如, 服务 s的部署序列为
o(c2 3 , FC, NIP)o{cl , BC A FC, OIP) 运行算法 2, 得到 在各家族上的投影:
IP), (c ,BC, NIP)}
32 , BC A FC, OIP) }
Prof 、― Simplified =
Λ FC, EIP), (cf,BC, NIP)}, 包含 2个子服务 第一个子服务 ^的 ^ = ^, 执行上述 2.i, 因为 ^之前没有子服务, 因此不进行任何操作; 第二个子服务 的 Ρ = Λ Ρ, 因为 ^的版本号小于 , 因此执行上述 2. iii.b, 从
Proj 、c、—Simplified = {{c2,FC,NIP)} 最终,把简化后的部署序列 Ρ^· ) ) -1 ^ ^^中的部署方式按照它们在 ^c)中的相应顺 序进行排列, 得到最终简化的部署序列。
IE{TTc、— Simplified = , BC, NIP) o(c2 , FC, NIP) O(C BCAFC, OIP) 由此可以看出, 服务 初始由 5个子服务构成, 经过上述优化处理后, 现在只需要 3个子服务就 能够完成同样的服务功能, 起到了降低部署规模, 优化系统环境的作用。
步骤 45、 对简化后的部署序列进行验证。 在对部署序列进行上述简化处理之后, 部署序列验证单元利用验证规则库, 对简化后的部署序 列进行验证, 得出该简化后的部署序列的验证结果, 该验证结果包括: 安全或成功的验证结果。
上述部署序列验证单元的内部处理流程如图 8所示, 具体处理过程如下: 通过访问验证规则库获取验证规则, 该验证规则是根据上述成功部署、 安全部署的定义而设置 的, 主要包括成功部署验证规则和安全部署验证规则两种, 部署验证规则可以判断出一个部署方式 被部署后是否具有成功性, 安全部署验证规则可以判断出一个部署方式被部署后是否具有安全性。 利用验证规则对简化后的部署序列中每一个部署方式进行判断, 判断其部署后的成功性与安全性, 然后综合考虑部署序列中每一个部署方式的判断结果, 得出简化后的部署序列的成功性与安全性的
验证结果。
通过部署序列验证单元得出验证结果之后, 调用用户意愿表达器所采集的用户意愿, 对验证结 果进行判断, 得出优化后的部署序列是否满足用户意愿的判断结果。 该实施例提供的根据用户意愿 判断验证结果的处理过程示意图如图 9所示, 具体处理过程如下: 比如, 如果用户意愿为要求成功的服务部署, 当得到的验证结果为成功的验证结果, 则优化后 的部署序列满足用户意愿; 当得到的验证结果不是成功的验证结果, 则优化后的部署序列不满足用 户意愿。
如果用户意愿为要求安全的服务部署, 当得到的验证结果为安全的验证结果, 则优化后的部署 序列满足用户意愿; 当得到的验证结果不是安全的验证结果, 则优化后的部署序列不满足用户意愿。
如果用户意愿为要求成功且安全的服务部署, 当得到的验证结果为成功且安全的验证结果, 则 优化后的部署序列满足用户意愿; 当得到的验证结果不是成功且安全的验证结果, 则优化后的部署 序列不满足用户意愿。
对于满足用户意愿的部署序列, 系统调用服务部署单元进行部署; 对于不满足用户意愿的部署 序列, 需要进行子服务的部署策略的调整, 然后重新进行部署序列简化、 验证的过程。
步骤 46、 对不满足用户意愿的部署序列进行部署策略的调整, 对满足用户意愿的部署序列进行 部署。
对于不满足用户意愿的部署序列, 需要对原始部署序列中每一个子服务的部署方式进行一定的 部署策略的调整。
本发明实施例提出的四种部署策略: 插入部署策略、 覆盖部署策略、 择新部署策略、 仅空部署 策略的局限性依次增大, 当采用插入部署策略时, 得到的部署序列一定是安全且成功的。 因此, 系 统对部署策略的调整方式为, 依次降低部署序列中每一个子服务的部署策略的局限性:
该实施例提供的一种调整子服务的部署策略的算法的处理过程如下:
I 算法 4. 调整子服务的部署策略的方法 I
过程名: 调整子服务部署策略
输入: 待调整的部署序列
ΙΕ(π0) = (c* ,Compl' )oL o(c^ 'Comp^ ,IP^' ) L o{c , Comply ,ΙΡ^ ) 输出: 调整部署策略后的部署序列
IE{nc ) _ new
约定:
EIPu^,.! = NIP Limit.r OIP^ = IIP
过程:
对于 ΙΕ^中的每一个部署方式 ( ,C ,Ι^' ) 如果 ≠πρ
更新部署方式 ( ,CW^V^ )
输出 ( rc)— "ew 退出过程
例如,
o(c2 3 , FC, NIP) o{cl , BC Λ FC, OIP),
其优化后的部署序列为:
如果经系统验证并根据用户意愿表达器所采集的用户意愿信息, 得出该优化后的部署序列不满 足用户意愿, 则对 进行部署策略的调整。 调整后得出:
o(c2 3 , FC, NIP) o{cl , BC A FC, OIP) 然后, 对 ^(^)-" 重新进行部署序列的简化操作。
对于满足用户意愿的部署序列可以通过服务部署单元进行服务的部署工作, 该实施例提供的服 务部署单元的内部处理流程如图 10所示, 具体处理过程如下:
分析优化后的部署序列中每个子服务的部署方式, 获取每个子服务的部署策略, 根据该部署策 略将每个子服务按照它们在部署序列中的排列方式, 依次进行部署, 随着部署序列中每一个子服务 的部署完毕, 整个服务就完成了部署过程。
该实施例提供的组合服务的部署方法可以有效地减少服务部署所需要部署的子服务规模, 并且 可以按照用户意愿来部署服务, 避免因无法期望服务部署效果而造成的人力 /资源的浪费。
实施例三
该实施例描述了一个具体的服务在组合服务系统中的部署过程。
上述组合服务系统中已经部署的服务的子服务可以采用可扩展标记语言 (XML, extensible Markup Language ) 来描述, 该 XML schema的结构示意图如图 11所示, 该 XML Schema描述了服务安装 序列所须具有的必要信息的一种示例。 例如: 包含有 0〜多个子服务, 每一个子服务有 ID、 名字、 版 本、 家族、 兼容性、 安装策略、 子服务当前安装状态 (等待安装、 已经安装、 跳过安装) 的属性。
该组合服务系统中存在着 4个子服务, 该 4个子服务的基本信息示意图如图 12所示, 该 4个子服务 分属于 4个子服务类 1、 2、 3、 5, 每一个子服务的部署方式如下式所示:
<service id=〃5〃 name=〃cl〃 version=〃l〃>
<family>K/family>
<compatibility>BC</compatibility>
<policy>OIP</policy>
<status>waiting</ status) </service>
该实施例在上述组合服务系统上部署一个服务 S, 该服务包含 15个子服务, 该 15个子服务的基 本信息示意图如图 13所示, 该 15个子服务分属于 5个子服务类, 每个子服务都拥有自己的子服务兼容 性和部署策略。 对于这个服务 的部署, 用户期望的部署结果为既成功又安全的部署。 调用部署执行规范化单元对上述服务 S的部署序列进行规范化, 得到上述服务 的规范化后的 IE{ c ) = (c; , BC, OIP)
BC, OIP)o(c5 2, BC, EIP) , BC, EIP)o(c2 2 , FC, NIP) o(Cl 3, C, IIP)o{cl , BC Λ FC, NIP)o(c4 2 , FC, IIP)o(c3 2 , BC, NIP) o(c5' , BC, NIP) 部署序列 o(c , BC, EIP) ο« , FC, EIP)o(c5 4 , FC, IIP) o(c5 3 , BC, OIP) o(c , BC, EIP) 然后, 调用子服务家族号序列获取单元, 从规范化后的部署序列中提取服务 的子服务类号序 列 Ρ( ) = {1,2,5,3, 4}。 通过部署执行投影获取单元执行特定的投影算法,可以得到 ^( ^)中的每个子服务类包含的子 服务, 得到服务 5的部署序列在各家族上的投影序列为:
, EIP)} , OIP)}
Proj^c) Simplified = {(c^,BC,NIP)}
Proj^' f Simplified = {(c4 2,FC,IIP)} 因此, 服务 S的子服务的进行了规范化和简化处理后的部署序列为:
o(c4 2 , FC, IIP) o{cl , BC, NIP) o(c5 , BC, OIP) 调用部署序列验证单元, 利用验证规则, 对上述 ^(^)^^^^ ^进行验证, 得出 /E ( rc)一 中所有的子服务在部署后, 均为成功的部署; 采用的是覆盖部署策略, 服务 部署后, 会覆盖系统中原有的子服务 , 而^的兼容性是向后兼容的, 无法实现 的功能, 因此, 是一个不安全的部署。 综上, 可以得出服务 S的部署是一个成功但不安全的服务部署, 它不满足 用户的预期要求: 既成功又安全的服务部署。
此时, 有两种解决方案: 其一,用户降低预期要求,接受成功但不安全的服务部署结果(本次服务部署,可以满足服务 S 本身的需要; 对于原有系统的影响, 忽略不计) 。
其二, 调用子服务部署策略调节单元, 对最初指定的子服务部署策略进行调整, 依次降低子服 务部署序列中每一个子服务的部署策略,每次调整后重新调用部署序列简化单元及其后的系统流程。 本实施例中采用第二种方案, 对^^^^)进行子服务部署策略的调整。 调整后的 (^c)为:
IE{ c ) = (c; , BC, IIP)
BC, OIP) o(c5 2 , BC, BC, EIP)o(c2 2 , FC, NIP) o(Cl 3 , FC, IIP) O(C2 3 , BC A FC, NIP) o (c4 2 , FC, IIP) o(c3 2 ,
BC, NIP)
o« , BC, EIP) o(c" , FC, EIP)o(c5 4, FC, IIP) o(c5 3 , BC, OIP)o{cl 2 , BC, EIP)
o(c4 2 , FC, IIP) o(c3 2 , BC, NIP) o(c5 3 , BC, OIP) 调用部署序列验证单元, 得出, ^(^ )- ^ ζ: ¾ί 中所有的子服务在部署后, 均为成功且安 全的部署。 综上, 可以得出服务 在调整了子服务的部署策略后, 进行的服务部署将是一个成功且 安全的服务部署, 此时, 它满足了用户的预期要求。 通过该实施例可以看出, 在系统中部署服务 S, 原本需要部署 15个子服务, 且部署后无法得知 服务的部署效果 (除非不考虑子服务的部署策略, 所有的子服务全部采用直接部署方式——此时一 定是既成功又安全的服务部署一否则无法得知服务部署后效果的成功性与安全性) 。 而通过本实 施例的优化处理以后, 服务 的子服务降低为 6个, 子服务的部署规模降低了 60% (而且, 这 6个子服 务也不用全部部署, 根据子服务的部署策略, 不需要部署到系统中), 有效减少系统资源的消耗。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程 序来指令相关的硬件来完成, 所述的程序可存储于一计算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体 (Read- Only Memory, ROM) 或随机存储记忆体 (Random Access Memory, RAM) 等。 综上所述, 本发明实施例利用同家族的子服务之间的兼容关系以及子服务的部署策略, 简化了 组合服务的部署序列, 大大降低了服务部署的规模, 有效减少系统资源的消耗, 降低管理人员的工 作强度。
而且, 通过对服务部署效果的验证, 能够提前判断服务部署后对系统的影响以及是否满足用户 的要求, 这对管理人员来说, 可以避免因为盲目部署服务而带来的不良后果。
本发明实施例从用户感知服务的角度和服务系统的整体效用出发, 聚焦服务的部署与动态配 置, 所关注的内容更贴近真实的服务部署的应用环境, 使得以子服务为基础的服务部署过程得以规 范化, 便于操作。
通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到本发明可以通过硬件实现, 也可以可借助软件加必要的通用硬件平台的方式来实现基于这样的理解, 本发明的技术方案可以以 软件产品的形式体现出来, 该软件产品可以存储在一个计算机可读存储介质(可以是 CD-ROM, U盘, 移动硬盘等) 中, 包括若干指令用以使得一台计算机设备 (可以是个人计算机, 服务器, 或者网络
设备等)执行本发明各个实施例所述的方法。
以上所述, 仅为本发明较佳的具体实施方式, 但本发明的保护范围并不局限于此, 任何熟悉本 技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到的变化或替换, 都应涵盖在本发明的 保护范围之内。 因此, 本发明的保护范围应该以权利要求的保护范围为准。
Claims
1、 一种组合服务的部署方法, 其特征在于, 包括:
获取组合服务的部署序列, 所述部署序列含有组合服务的子服务的部署方式;
根据所述子服务的部署方式处理部署序列, 生成优化后的部署序列;
按照所述优化后的部署序列进行所述组合服务的部署。
获取组合服务的部署序列, 所述部署序列含有组合服务的子服务的部署方式;
根据所述子服务的部署方式处理部署序列, 生成优化后的部署序列;
按照所述优化后的部署序列进行所述组合服务的部署。
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述子服务的部署方式处理部署序列, 生成优化后的部署序列具体包括:
根据所述组合服务的部署序列找出每一个子服务类中的子服务集合, 并按照每个子服务的部署 方式, 对所述子服务集合中包含的子服务进行优化, 重新组成所述组合服务的优化后的部署序列。
3、 根据权利要求 1所述的方法, 其特征在于, 在所述方法之前还包括如下步骤:
对所述组合服务的部署序列中的子服务的部署方式进行规范化处理, 将所有规范化后的子服务 的部署方式按照设定的顺序进行排列, 组成所述组合服务的部署序列。
4、 根据权利要求 3所述的方法, 其特征在于, 所述规范化后的子服务的部署方式包括: 子服务 的家族号和版本号、 兼容关系以及部署策略。
5、 根据权利要求 2所述的方法, 其特征在于, 所述根据所述组合服务的部署序列找出每一个子 服务类中的子服务集合, 具体包括:
将所述部署序列在每一个子服务类上执行投影操作, 得到所述部署序列在每一个子服务类中的 子服务集合, 并且, 所述子服务集合中各个子服务的排列顺序遵循各个子服务在所述部署序列中的 排列顺序。
6、 根据权利要求 2所述的方法, 其特征在于, 所述按照每个子服务的部署方式, 对所述子服务 集合中包含的子服务进行优化, 具体包括:
如果待部署服务的系统中存在某个家族号的子服务, 则从和所述某个家族号对应的子服务集合 中去除掉所有部署策略为仅空部署策略的子服务;
如果子服务集合中存在部署策略为覆盖部署策略的子服务, 则去除掉所述子服务集合中排列在 所述部署策略为覆盖部署策略的子服务之前的所有其它子服务;
如果子服务集合中存在部署策略为择新部署策略的子服务, 当所述子服务集合中存在排在所述 部署策略为择新部署策略的子服务前且版本号比所述部署策略为择新部署策略的子服务大的其它子 服务, 则去除掉所述部署策略为择新部署策略的子服务; 否则去除掉所述子服务集合中排在所述部 署策略为择新部署策略的子服务前且版本号比所述部署策略为择新部署策略的子服务低的所有其它 子服务。
7、 根据权利要求 1至 6任一项所述的方法, 其特征在于, 所述方法还包括:
获取用户对服务部署效果的意愿信息, 该意愿信息包括成功的服务部署、 安全的服务部署或既
成功又安全的服务部署意愿;
根据预定的验证规则对所述优化后的部署序列进行验证, 得到所述优化后的部署序列的部署效 果 息;
将所述意愿信息和所述部署效果信息进行比较, 得到所述优化后的部署序列中满足用户意愿的 子服务和不满足用户意愿的子服务。
8、 根据权利要求 7所述的方法, 其特征在于, 所述的根据预定的验证规则对所述优化后的部署 序列进行验证, 得到所述优化后的部署序列的部署效果信息, 具体包括:
如果所述优化后的部署序列中每一个子服务的部署策略都是插入部署策略或者覆盖部署策略, 则所述优化后的部署序列的服务部署是成功的;
如果所述优化后的部署序列中每一个具有未插入效果的子服务的部署策略都是仅空部署策略, 且待部署服务的系统中与所述具有未插入效果的子服务同家族的子服务的兼容性是既向前兼容又向 后兼容的, 则所述优化后的部署序列的服务部署是成功的;
如果所述优化后的部署序列中每一个子服务的部署策略都是插入部署策略或者仅空部署策略, 则所述优化后的部署序列的服务部署是安全的;
如果所述优化后的部署序列中每一个具有插入效果的子服务的部署策略是覆盖部署策略且兼容 性是既向前兼容又向后兼容的, 或者每一个具有插入效果的子服务的部署策略为择新部署策略且兼 容性是向后兼容的, 则所述优化后的部署序列的服务部署是安全的;
如果所述优化后的部署序列中每一个子服务的部署策略都是插入部署策略, 则所述优化后的部 署序列的服务部署是成功的和安全的。
9、 根据权利要求 7所述的方法, 其特征在于, 所述的按照所述优化后的部署序列进行所述组合 服务的部署, 具体包括:
对不满足用户意愿的子服务进行部署策略的调整, 对满足用户意愿的子服务按照各个子服务的 部署策略、 在部署序列中的排列顺序依次进行部署。
10、 一种组合服务的部署装置, 其特征在于, 包括: 部署序列优化单元, 用于获取组合服务的部署序列, 所述部署序列含有组合服务的子服务的部 署方式, 按照所述子服务的部署方式处理部署序列, 生成优化后的部署序列;
服务部署单元, 用于按照所述优化后的部署序列进行所述组合服务的部署。
11、 如权利要求 10所述的组合服务的部署装置, 其特征在于, 所述的部署序列优化单元包括: 家族号获取子单元, 用于获取部署序列中各个子服务所属的家族号信息, 并将该家族号信息发 送给子服务集合获取单元; 子服务集合获取子单元, 用于根据家族号获取单元发送过来的部署序列中各个子服务所属的家 族号, 将所述部署序列在每一个子服务类上执行投影操作, 得到所述部署序列在每一个子服务类中 的子服务集合;
部署序列简化子单元, 用于按照每个子服务的部署方式, 对所述子服务集合中包含的子服务进
行优化, 重新组成所述组合服务的优化后的部署序列。
12、 如权利要求 11所述组合服务的部署装置, 其特征在于, 所述的部署序列优化单元还包括: 部署序列规范化子单元, 用于对组合服务中的子服务的部署方式进行规范化处理, 将所有规范 化后的子服务的部署方式按照设定的顺序进行排列, 组成所述组合服务的部署序列。
13、 根据权利要求 10、 11或 12所述的组合服务的部署装置, 其特征在于, 所述部署装置还包 括:
用户意愿获取子单元, 用于获取用户对服务部署效果的意愿信息, 该意愿信息包括成功的服务 部署、 安全的服务部署或既成功又安全的服务部署意愿, 并将意愿信息发送给部署序列验证单元; 部署序列验证子单元, 用于根据预定的验证规则对所述优化后的部署序列进行验证, 得到所述 优化后的部署序列的部署效果信息; 将所述意愿信息和所述部署效果信息进行比较, 得到所述优化 后的部署序列中满足用户意愿的子服务和不满足用户意愿的子服务;
所述服务部署单元对不满足用户意愿的子服务进行部署策略的调整, 对满足用户意愿的子服务 按照各个子服务的部署策略、 在部署序列中的排列顺序依次进行部署。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200810225187.X | 2008-10-30 | ||
| CN 200810225187 CN101729521B (zh) | 2008-10-30 | 2008-10-30 | 组合服务的部署方法和装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2010048898A1 true WO2010048898A1 (zh) | 2010-05-06 |
Family
ID=42128274
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2009/074731 Ceased WO2010048898A1 (zh) | 2008-10-30 | 2009-10-30 | 组合服务的部署方法和装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN101729521B (zh) |
| WO (1) | WO2010048898A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI732449B (zh) * | 2018-01-07 | 2021-07-01 | 宏達國際電子股份有限公司 | 處理通訊裝置能力的裝置及方法 |
| CN114675872A (zh) * | 2021-05-21 | 2022-06-28 | 腾讯云计算(北京)有限责任公司 | 一种对应用程序的数据处理方法、装置、设备及存储介质 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102201995B (zh) * | 2011-06-03 | 2013-12-04 | 北京邮电大学 | 实现网络载荷优化的组合服务方法 |
| CN103413040B (zh) * | 2013-08-05 | 2016-06-08 | 浙江大学 | 面向数据密集型服务协同系统的组件服务部署方法 |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008119364A1 (en) * | 2007-04-02 | 2008-10-09 | Telefonaktiebolaget Lm Ericsson (Publ) | Technique for creating, modifying and executing composite services in a telecommunication network |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1764183A (zh) * | 2005-11-03 | 2006-04-26 | 西安交通大学 | 一种基于计算机网络的QoS驱动的提供组合Web服务的计算机系统 |
-
2008
- 2008-10-30 CN CN 200810225187 patent/CN101729521B/zh not_active Expired - Fee Related
-
2009
- 2009-10-30 WO PCT/CN2009/074731 patent/WO2010048898A1/zh not_active Ceased
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008119364A1 (en) * | 2007-04-02 | 2008-10-09 | Telefonaktiebolaget Lm Ericsson (Publ) | Technique for creating, modifying and executing composite services in a telecommunication network |
Non-Patent Citations (2)
| Title |
|---|
| QI, YAN: "Study on Key Techniques for Dynamic Web Services Selection Supporting Relation QoS", CHINESE MASTER'S THESES FULL-TEXT DATABASE, INFORMATION SCIENCE AND TECHNOLOGY, no. 3, 15 September 2007 (2007-09-15), pages I139 - 220 * |
| ZHU, ZHENGDONG ET AL.: "Minimum Coverage Method for Complicated Web Service Composition", JOURNAL OF XI'AN JIAOTONG UNIVERSITY, vol. 42, no. 8, 31 August 2008 (2008-08-31), pages 945 - 949 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI732449B (zh) * | 2018-01-07 | 2021-07-01 | 宏達國際電子股份有限公司 | 處理通訊裝置能力的裝置及方法 |
| CN114675872A (zh) * | 2021-05-21 | 2022-06-28 | 腾讯云计算(北京)有限责任公司 | 一种对应用程序的数据处理方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101729521A (zh) | 2010-06-09 |
| CN101729521B (zh) | 2013-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7792931B2 (en) | Model-based system provisioning | |
| JP5269081B2 (ja) | 拡張可能な分散アプリケーションの作成とデプロイメント | |
| JP5438911B2 (ja) | バックアップされたファイルのパスワード保護 | |
| US20130151468A1 (en) | File synchronization method and device | |
| US20070006218A1 (en) | Model-based virtual system provisioning | |
| US20170366552A9 (en) | Mode-based access control method and device | |
| US8365245B2 (en) | Previous password based authentication | |
| WO2013123829A1 (zh) | 安装软件的方法、设备及系统 | |
| CN109033857A (zh) | 一种访问数据的方法、装置、设备及可读存储介质 | |
| US9621534B2 (en) | Authentication apparatus, authentication system, authentication method and storage medium | |
| WO2010048898A1 (zh) | 组合服务的部署方法和装置 | |
| JP2011258000A (ja) | 情報処理装置、情報処理装置のユーザ認証方法 | |
| CN112543109A (zh) | 一种云主机创建方法、系统、服务器及存储介质 | |
| US8468523B2 (en) | Network apparatus and method for supporting network virtualization | |
| CN118364484A (zh) | 一种权限树管理方法、装置、计算机设备和存储介质 | |
| CN104301652B (zh) | 进行网络摄像机接入配置的方法及网络硬盘录像机 | |
| US7536550B2 (en) | Image forming apparatus and control method for same | |
| JP4548660B2 (ja) | シングルサインオンフレームワークにおけるワークフローを管理する方法及び装置 | |
| US12223030B2 (en) | Data access control method, data access control apparatus, and data access control program | |
| CN110740151B (zh) | 一种微服务调整方法、装置、服务器及计算机存储介质 | |
| CN113852596B (zh) | 基于Kubernetes的应用认证代理方法及系统 | |
| CN107222361A (zh) | 数据采集方法、系统、计算机设备和介质 | |
| CN103856504A (zh) | 分析存取路径以存取映像文件中目标文件的系统及其方法 | |
| CN116489649B (zh) | 基于嵌入式Linux系统的车载网关安全认证方法及设备 | |
| CN111427589B (zh) | 一种大数据集群资源管理系统的数据空间部署方法和装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 09823090 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 09823090 Country of ref document: EP Kind code of ref document: A1 |




