3.6 Summary

Ru-Brd

This chapter showed how the ACE Reactor framework can simplify the development of concise , correct, portable, and efficient event-driven networked applications by encapsulating OS event demultiplexing mechanisms within an object-oriented C++ interface. Likewise, it showed how the ACE Reactor framework enhances reuse, improves portability, and enables the extensibility of event handlers by separating event detection, demultiplexing , and dispatching mechanisms from application-defined event processing policies .

Since reusable classes in the ACE Reactor framework perform the lower-level event detection, demultiplexing, and event handler dispatching, a relatively small amount of application-defined code must be written. For example, the logging service in Sections 3.3 and 3.4 is mostly concerned with application-defined processing activities, such as receiving client log records. Any applications that reuse the ACE_Reactor class described in Section 3.5 can therefore leverage the knowledge and experience of its skilled middleware developers, as well as its future enhancements and optimizations.

The ACE Reactor framework uses dynamic binding extensively since the dramatic improvements in clarity, extensibility, and modularity it provides usually compensate for any decrease in efficiency resulting from its indirect virtual table dispatching [HLS97]. The ACE Reactor framework is often used to develop networked applications, where the major sources of overhead result from caching, latency, network/host interface hardware, presentation-level formatting, dynamic memory allocation and copying, synchronization, and concurrency management. The additional indirection caused by dynamic binding is often insignificant by comparison [Koe92]. In addition, good C++ compilers can eliminate virtual method overhead completely via the use of "adjustor thunk" optimizations [Lip96].

One of the most powerful properties of the ACE Reactor framework design is its ability to enhance extensibility both above and below its public interface. The Reactor implementations provide a good example of how applying patterns can provide a set of classes that take advantage of unique platform capabilities, while maintaining the ability for networked applications to run unchanged across diverse computing platforms. The next chapter studies the techniques that ACE uses to achieve this flexibility.

Ru-Brd


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

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