针对7×24小时运行的系统,不能停止系统运行进行更新或维护的问题,根据OSGi(Open Service Gateway Initiative)框架的特点,在分析已有的服务动态更新方法基础上,克服已有策略不能保证服务更新前后的相互一致性和服务状态的一致性,以及更新策略实现过程中的编程模型不佳问题,提出基于发布/订阅模型的服务动态更新策略。以静止状态理论为依据,利用Petri网形式化描述服务动态更新过程,从理论上验证该策略的有效性;同时,以Event Admin Service作为策略的实现工具,具有良好的编程模型,从而实现OSGi平台上的动态演化,实验结果表明该策略具有可行性。
It is a vital problem for a 7×24 running system to update and maintain software online.According to the characteristics of OSGi framework,the authors analyze existing service dynamic update policies for OSGi framework.In order to solve the problem of service mutual consistency and service state consistency during service update,the service dynamic update policy based on publish/subscribe model is presented.The policy is based on quiescent state theory to ensure mutual consistency when services are updated online.The process of the dynamic service update policy is described by Petri net.The authors realize the policy using Event Admin Service in an experiment with a well defined program model.Result shows that the policy is feasible.