摘要
基于构件的软件开发和复用是提高软件开发效率和质量的有效途径,OSGi(open services gateway initiative)构件平台模型为软件构件提供了良好的生命周期管理和动态依赖管理。在构件粒度上对系统的资源进行监控能够有效增强系统的可靠性,然而目前针对OSGi平台的构件资源监控技术侧重于统计整个系统的资源消耗,未能把统计的粒度细化到构件上,且不能根据各个构件的资源消耗情况对系统进行调整。提出一种基于代理的OSGi构件资源监控方法。该方法具有以下特点:在构件粒度上统计系统的资源消耗,能够统计到每一个构件所消耗的内存和CPU时间;能够发现资源消耗异常的构件,并对其进行重启或替换,从而提高系统可靠性;具有非侵入性,即不会对构件进行任何修改,不会影响到第三方应用的逻辑结构。实验表明,该方法可以准确地统计到构件的资源消耗量,并据此对构件进行有效的调整,提高系统的可靠性。
Component based software development and reuse is recognized as an effective way to improve the effi- ciency of software development and the quality of software. As a widely used component platform, OSGi (open services gateway initiative) supplies a well formed component model with good management of component's lifecycle and dependency. It is an effective way to improve the system reliability to monitor the resource consumption at component level. However, current resource monitor technology mainly focuses on the resource cost of the whole system, not the component, neither can adjust the component system according to component resource consumption. This article introduces a novel component resource monitoring approach, it has three characteristics as follows. Firstly, it can get the detail information of each component in the system. Secondly, it can discover and adjust the components which cost too much resource. Thirdly, it is non-intrusion, that is to say, it is not required to modify the module because of monitoring requirements. Finally, experiments have been done to prove that this tool can accurately get the information without incurring so much overhead. It does help to improve the system's reliability effectively.
出处
《计算机科学与探索》
CSCD
2011年第1期23-31,共9页
Journal of Frontiers of Computer Science and Technology
基金
国家自然科学基金创新研究群体科学基金No.60821003
国家自然科学基金No.60603038
国家重点基础研究发展规划(973)No.2005CB321805
国家高技术研究发展计划(863)No.2009AA01Z139-1~~