ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展

• 软件技术 • 上一篇    下一篇

基于分布式OSGi的动态服务组合算法

罗 娟 周 峰 李仁发   

  1. (湖南大学信息科学与工程学院 长沙 410082) (juanluo@hnu.edu.cn)
  • 出版日期: 2014-02-15

Dynamic Service Composition Mechanism Based on OSGi

Luo Juan, Zhou Feng, and Li Renfa   

  1. (School of Information Science and Engineering, Hunan University, Changsha 410082)
  • Online: 2014-02-15

摘要: 物联网近年来得到快速发展和普及,而应用与感知设备的严重耦合使得开发过程变得十分困难和复杂.针对OSGi中间件系统,提出了一种分布式OSGi的轻量级中间件结构,将网络中的节点提供的各种功能虚拟抽象为网络服务,通过面向服务架构(service oriented architecture, SOA)的服务管理对设备节点进行解耦.网络设备提供的服务单一,还存在移动性及续航等限制,为了适应动态变化的网络及应用需求,提出了一种满足服务质量约束的网络服务组合机制DscGOM,包括满足服务质量的组合路径选择机制设计和服务重定向机制设计.实验结果表明,该机制能够很好地适应动态网络需求,快速有效地生成服务组合路径.在网络节点意外退出失效的情况下,能够快速寻找替代组合路径和恢复组合服务的执行.

关键词: 中间件, OSGi, 服务, 组合, 面向服务架构

Abstract: Internet of Things has been rapidly developed and popularized in recent years, but the serious coupling between application and sensing devices makes development processes quite difficult and complicated. Due to the limitation of original OSGi in sharing services among different nodes, a distributed lightweight middleware structure is proposed based on OSGi. In this distributed OSGi structure, various kinds of functions provided by networked devices are abstracted to services. So that we can take advantage of SOA to manage all networked nodes/devices using services form for decoupling. Single service provided by nodes/devices may only have limited function, and networked devices have mobility and endurance ability limitation, etc. In order to adapt to dynamically changed network and application requirements, a service composition mechanism named DscGOM is designed. DscGOM includes service composition path choosing mechanism and service redirection mechanism. The experimental results show that DscGOM mechanism can be faster and more effective than traditional method, which generates the composition path of services to satisfy the dynamic network demand. When a network device dies or exits unexpectedly, the mechanism can quickly get an alternative composition path and restore the execution.

Key words: middleware, open service gateway initiative (OSGi), service, composition, service oriented architecture (SOA)