9.5 Summary

I l @ ve RuBoard

Different operating systems not only provide multithreading APIs that differ syntactically, but the semantics of these APIs also vary in subtle ways. To alleviate this complexity, the ACE threading wrapper facades implement a portable set of capabilities that export uniform multithreading syntax and semantics. This section presented several more revisions of our logging server example, where we showed how to handle multiple client sessions using multiple threads rather than multiple processes, as well as how to control the real-time scheduling properties of server threads.

ACE also provides the ACE_Task concurrency framework that allows developers to use threading in a powerful and extensible object-oriented fashion. Moreover, the ACE_Task concurrency framework not only provides a facility for spawning threads in the context of an object, but also a flexible and powerful queueing mechanism for transferring data and objects between tasks in message-oriented and task-oriented architectures. As described in [SH], the ACE_Task framework can be applied to implement the following common concurrency patterns [SSRB00]:

  • The Active Object pattern , which decouples method execution from method invocation. Its purpose is to enhance concurrency and simplify synchronized access to objects that reside in their own threads.

  • The Half-Sync/Half-Async pattern , which decouples synchronous and asynchronous processing in concurrent systems to simplify programming without reducing performance unduly. This pattern introduces two communicating layers: one for synchronous and one for asynchronous service processing. A queueing layer mediates communication between the synchronous and asynchronous layers .

I l @ ve RuBoard


C++ Network Programming
C++ Network Programming, Volume I: Mastering Complexity with ACE and Patterns
ISBN: 0201604647
EAN: 2147483647
Year: 2001
Pages: 101

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net