Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2006, Vol. 32 ›› Issue (23): 111-113. doi: 10.3969/j.issn.1000-3428.2006.23.039

• Networks and Communications • Previous Articles     Next Articles

Message-map Based Daemon Control Pattern

ZHANG Xiaoyu, JIN Lianfu   

  1. (College of Computer Science and Technology, Zhejiang University, Hangzhou 310027)
  • Received:1900-01-01 Revised:1900-01-01 Online:2006-12-05 Published:2006-12-05

基于消息映射的服务器控制模式

张晓禹,金连甫   

  1. (浙江大学计算机科学与技术学院,杭州 310027)

Abstract: To aim at the requirement of flexibility, scalability and robustness in daemon design, the paper presents a message-map based control pattern that integrates the message handling mechanism in Windows programming and FSM often used in daemon design so that it can support consistent handling to daemon’s multiservice and multiversion, smooth switch of users’ current type of service, convenient modification of implementation and redefinition of program’s flow.

Key words: Design pattern, Message-map, Control framework, Daemon programming, FSM

摘要: 针对大型服务器程序设计中对灵活性、可扩展性和健壮性的要求,引入了一种基于消息映射的服务器控制模式,把Windows编程中对于消息的处理机制和服务器程序中常见的自动状态机(FSM)设计结合起来,使得既支持服务器中对于多服务多版本的统一处理,又能够提供用户当前服务类型的无缝切换,并能方便地支持各种服务实现的变更和程序流程的重定义。

关键词: 设计模式, 消息映射, 控制框架, 服务器编程, 自动状态机