西南石油大学学报(自然科学版) ›› 2002, Vol. 24 ›› Issue (3): 78-81.DOI: 10.3863/j.issn.1000-2634.2002.03.022

• 石油机械工程及其它 • 上一篇    下一篇

用Reactor、Acceptor模式构建CORBA通信层

刘轶 李志蜀 陈良银

  

  1. (四川大学计算机系,四川 成都 610064)
  • 收稿日期:2001-08-21 修回日期:1900-01-01 出版日期:2002-06-30 发布日期:2002-06-30
  • 通讯作者: 刘轶

IMPLEMENT THE COMMUNICATION LAYER OF CORBA WITH REACTOR AND ACCEPTOR PATTERNS

LIU Yi LI Zhi-shu CHEN Liang-yin. 
  

  1. (Dept. of Computer Science, Sichuan University,Chengdu Sichuan 610064,China)
  • Received:2001-08-21 Revised:1900-01-01 Online:2002-06-30 Published:2002-06-30
  • Contact: LIU Yi

摘要: CORBA是一种面向对象的分布式计算环境,其核心部分是实现对象间的通信。为了构建通用性高、扩展性强的CORBA通信层,引入了Reactor模式、Acceptor模式。Reactor模式能以单进程来完成并发处理,而Acceptor模式有效地将服务初始化过程与服务处理过程相分离。首先阐述了Reactor模式、Acceptor模式的结构,包括:句柄、同步事件多路分解器、初始分派器、具体事件处理器、Acceptor和服务处理器。然后讲述了该模式的运行过程:如何建立连接以及如何处理服务。接着重点阐述了初始分派器、具体事件服务器、Acceptor和服务处理器的实现。并在此基础上说明了该模式的一个特性:并发性;最后总结了该模式的优点和不足。

关键词: Reactor模式, Acceptor模式, CORBA, 结构, 特性

Abstract: CORBA is an object-oriented distributed computing envi-ronment. The core of CORBA is the communication of object.To construct a reusable and extensible communication layer of CORBA, Reactor and Acceptor patterns were introduced. The Reactor design pattern can handle synchronous events in a pro-cess, while the Acceptor design pattern decouples service initial-
ization from service processing. At first, the structures of the patterns including handle, synchronous event demultiplexer,initiation dispatcher, concrete event handle, Acceptor and ser-vice handler are elaborated. Then the dynamics of these pat-terns, how to link and how to process service, was explained.
Then the implementation of initiation dispatcher,concrete event handler, Acceptor and service handler was described in this pa-per. And one of the features of the patterns: concurrency is presented. Finally, the benefits and liabilities of the patterns are discussed.

Key words: Reactor patterns, Acceptor patterns, COR-BA, structure, characteristic.

中图分类号: