质量敏感的自动服务组合:基于图论的视角
QoS-Aware Automatic Service Composition: A Graph View
-
摘要: 随着众多计算机软件系统的开发与部署,业务的升级换代,如何有效地整合已有的遗留系统,实现资源的聚合和共享成为信息化时代的一个迫切需求。如今,公司和企业的业务能力和需求也在不断变化,传统的一次开发、持续使用的软件开发理念已经落伍。根据需求动态地集成自身和合作伙伴的业务成为企业整合资源、提高市场竞争力的关键之一。这种动态业务集成的需求也不断地催生新的软件构架。在这些背景下,近年来,“Web服务”(服务的最主要实现方式之一) 成为在网络环境下对资源进行封装、抽象和虚拟化的的主要手段之一。它是一种自描述、自包含、平台无关的自治计算单元。面向服务的计算SOC (Service Oriented Computing)以服务为基本单位,通过服务组合技术快速构建分布式软件系统的计算方式业已成为主流。SOC蕴含了“复用服务”的思想。面向服务的架构SOA(Service Oriented Architecture)作为实现SOC的基础逻辑架构,是为解决互联网环境下服务的重用和业务集成而提出的一种新型的软件系统架构。Web服务屏蔽了分布环境中异构的操作系统和网络协议等问题,实现了一个松耦合的高层应用环境,提高了分布计算的抽象化程度;服务组合则直接受益于较早一些的工作流技术、软件组合以及基于工作流的企业应用集成 (Enterprise Application Integration) 技术,能够支持应用的快速构造和灵活调整,其良好的应用前景推动了各种软件支撑产品的开发,也促进了诸如WS—BPEL、WS-CDL、OWL-S等国际标准的产生和应用,逐步发展成为实现松散协同和流程级业务集成的关键技术之一。 1. 自动服务组合随着SOC应用的逐步展开,服务数量的增长速度也将不断加快,在这样一个海量的集合上,管好用好服务,并进行组合的难度也在不断增加。由于Web服务具有分布、自治的特征,且数量急剧增长,在海量的服务资源中手工比对、选择可互操作的服务候选者,并构造服务组合流程模型的方法往往是行不通的。为此,自动服务组合技术应运而生,并日渐引起了学术界和业界的重视。Amazon和SAP已经分别将该技术应用在复杂WS-BEPL程序的生成以及流程建模的辅助工具上,展示了该技术的广泛应用前景。HP开发了eFlow平台,以方便服务开发者使用和定义组合服务。 2. 质量敏感的自动服务组合除了通过自动服务组合技术满足用户的请求外,服务质量也日益受到研究者和使用者的重视。服务质量称为非功能属性,包括:响应时间、价格等。如:在医疗信息系统中,当医疗工作者递交一个请求某病人的医疗记录的查询,以获取该病人血型并据此对病危病人输血,此时就必然希望响应时间较低。故自动服务组合的研究焦点从早期的形式化验证、语义匹配等话题,逐步扩展到搜索性能改进以及搜索结果的全局QoS优化等热点方向。国际Web竞赛(WS-Challenge)就围绕自动服务组合的性能评测,成功组织了6届国际比赛,吸引了包括IBM T. J. Watson研究中心、美国宾夕法尼亚州立大学、美国加州大学欧文分校、惠普研究院以及国内的清华大学、复旦大学等组队参加。竞赛的题目在语法级自动组合、语义级自动组合的基础上,逐渐发展到了2009年QoS敏感的自动服务组合。针对质量敏感的自动服务组合问题,本文将其建模为一个新的图搜索问题,单源结点最优有向图问题(Single-source Optimal Directed Acyclic Graphs: SSOD)。这个新问题与单源结点最优路径问题(Single-source Optimal Shortest Paths)类似,但更加普适。本文详细阐述了SSOD问题的模型及其解决方法:Sim-Dijkstra算法。在此基础上,我们实现了一个有效的服务组合工具:QSynth。实验结果表明:在不同测试集合中,Sim-Dijkstra算法都具有很好的可扩展性和性能,而且超越了Web Service Challenge 2009年的性能冠军。Abstract: In the research of service composition, it demands efficient algorithms that not only retrieve correct service compositions automatically from thousands of services but also satisfy the quality requirements of different service users. However, most approaches treat these two aspects as two separate problems, automatic service composition and service selection. Although the latest researches realize the restriction of this separate view and some specific methods are proposed, they still suffer from serious limitations in scalability and accuracy when addressing both requirements simultaneously. In order to cope with these limitations and efficiently solve the combined problem which is known as QoS-aware or QoS-driven automatic service composition problem, we propose a new graph search problem, single-source optimal directed acyclic graphs (DAGs), for the first time. This novel single-source optimal DAGs (SSOD) problem is similar to, but more general than the classical single-source shortest paths (SSSP) problem. In this paper, a new graph model of SSOD problem is proposed and a Sim-Dijkstra algorithm is presented to address the SSOD problem with the time complexity of O(n log n + m) (n and m are the number of nodes and edges in the graph respectively), and the proofs of its soundness. It is also directly applied to solve the QoS-aware automatic service composition problem, and a service composition tool named QSynth is implemented. Evaluations show that Sim-Dijkstra algorithm achieves superior scalability and efficiency with respect to a large variety of composition scenarios, even more efficient than our worklist algorithm that won the performance championship of Web Services Challenge 2009.