• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 软件工程 • 上一篇    下一篇

基于CPN模型的REST服务架构标准特征验证方法研究

赵玉强,刘靖   

  1. (内蒙古大学计算机学院,内蒙古 呼和浩特 010021)
  • 收稿日期:2017-10-15 修回日期:2017-12-05 出版日期:2018-06-25 发布日期:2018-06-25
  • 基金资助:

    国家自然科学基金(61262017,61662051)

CPN model based  standard feature
verification for REST service architecture

ZHAO Yuqiang,LIU Jing   

  1. (School of Computer Science,Inner Mongolia University,Hohhot 010021,China)
  • Received:2017-10-15 Revised:2017-12-05 Online:2018-06-25 Published:2018-06-25

摘要:

当前REST服务架构广泛应用于大规模、可扩展的分布式Web系统中,若应用REST服务架构时不遵循其标准特征,则可能导致基于REST服务架构的Web系统出现性能下降、可扩展性低等问题。因此,实现基于REST服务架构的Web系统前,需要对该系统设计是否满足REST服务架构标准特征进行验证,以提升基于REST服务架构的Web系统的研发质量。提出一种基于CPN模型的REST服务架构标准特征验证方法,即对REST服务架构的五个标准特征约束进行CPN建模,并使用模型状态空间执行路径同步匹配的验证方法,以应用系统的CPN模型和标准特征约束的CPN模型为基础,对模型状态空间中的各自执行路径进行同步匹配,若路径可同步执行完毕,则说明该应用系统满足该REST标准特征约束。以基于REST服务架构的课程管理Web系统为例,验证上述方法的可用性和有效性。实验结果表明,本文所提验证方法可以有效确认基于REST服务架构的Web应用系统设计是否符合REST服务架构的标准特征约束,并在不符合标准特征约束时提供直观、可行的执行数据,便于后续完成应用系统设计缺陷定位及修正。
 

关键词: REST服务架构, CPN模型, 标准特征验证

Abstract:

Nowadays, the representational state transfer (REST) service architecture is widely used in largescale and scalable distributed web systems. If the REST service architecture does not comply with its standard features, it can result in degraded performance or low scalability of the RESTbased web systems. Therefore, in order to enhance the quality of system designing, before implementing the web system based on the REST service architecture, it is necessary to verify whether the system design meets the standard features of the REST service architecture. In this paper, we propose a standard feature verification method for REST service architecture based on colored Petri nets (CPN) model. Firstly, five standard feature constraints of the REST service architecture are modeled using the CPN. Then a verification method is proposed based on synchronized matching of the execution paths in model state space, that is, considering both the CPN model of the application system and the CPN model of standard feature constraints, synchronized matching is performed on the respective execution paths in the model state space. If these paths can be executed synchronously, the application system meets the requirement of the REST standard feature constraints. We validate the usability and validity of the proposed verification method using a practical course management web system based on the REST service architecture. Experimental results show that the proposed method can effectively confirm whether the web application system design based on the REST service architecture conforms to the standard feature constraints of the REST service architecture. Besides, it can also provide intuitive and feasible execution data when the standard feature constraints are not met, which can facilitate the defects location and correction of the following design of application systems.
 

Key words: REST service architecture, colored Petri nets(CPN) model, verification of standard feature