摘要
分布式系统的程序设计模式主要包括多线程模式和事件驱动模式,其中事件驱动模式占据了主导地位。本文讨论了这两种模式的不足,以及Coroutine模式相对它们的优点,并认为Coroutine模式是最适合分布式系统的程序设计模式。本文在此基础上提出了Libresync,它是一个基于Coroutine模式的分布式系统基础支持库。它既能给应用开发带来非常清晰的控制流程,又具有很高的灵活性和表达力,性能也能满足大多数需求。
Programming patterns for distributed systems mainly includes multi-threaded and event-driven patterns, and the event-driven pattern is the major one. This paper, however, discusses their disadvantages, and the Coroutine pattern's advantages over them. We think Coroutine is the most suitable pattern for distributed system programming. And we present Libresyne, a Coroutine-based supporting library for distributed systems, which brings us clear control flow, high flexibility and expressiveness. The performance of Libresync is also reasonably good enough for most purposes.
出处
《计算机工程与科学》
CSCD
2008年第12期142-145,共4页
Computer Engineering & Science
基金
国家973计划资助项目(2005CB321800)