http://www.developer.com/

Back to article

Developing Efficient Network and Distributed Applications with ACE


August 9, 2004

I'm going to introduce Adaptive Communication Environment (ACE), a free, open source, C++-based OO framework used to develop portable, reliable, high-performance, and real-time communication services and applications. ACE, with its rich feature set and reusability support, can be used to develop efficient communication services/components for distributed applications, as well as network applications, increasing speed and efficiency for both types of applications.

Importance of Communication Software

Communication (interprocess) is an important aspect of distributed as well as network applications. Fine-tuning of communication components/services has a direct effect on the performance of these applications, in the form of increasing efficiency and speed. To obtain better performance, communication software should possess the following characteristics:

  • It should be flexible enough to accommodate and support an ever-increasing number of data types and traffic patterns, while confirming to end-to-end quality of service norms.
  • It should be efficient to provide low latency to delay-sensitive applications, high-performance to bandwidth-intensive applications, and predictability to real-time applications.
  • It should be reliable enough for developing high-performance, robust and fault-tolerant applications.
  • It should be highly portable to support quickly porting applications on any other OS platforms or compilers while keeping the porting cost low.

Developing Efficient Communication Software

Developers often rely on (i) low-level native OS APIs and (ii) distributed computing middleware components to develop efficient communication software for OO networking applications, distributed applications, or real-time applications. But, both of these approaches have their shortcomings, as given below:

  • Low-level native OS APIs provide neither flexibility nor portability. They tie applications built upon them to a specific OS platform only.
  • For specialized fields of scientific research, medical imaging, aviation, and telecommunication, there are no available standard and readymade distributed computing middleware components (e.g. DCOM, CORBA, or RMI components) efficient and reliable enough for developing complex applications that rely heavily on faster, low-latency, and real-time inter-process communication.

So, how can one overcome these limitations to develop flexible, efficient, reliable, and portable communication software? Adaptive Communication Environment (ACE) could be the answer. The following sections explore ACE and its potential for developing communication software with the above-cited characteristics.

Overview of ACE

Adaptive Communication Environment (ACE) is a free, open source, C++-based, object-oriented framework/toolkit used to develop portable, reliable, high-performance, and real-time communication services/components for distributed networks as well as real-time applications. The ACE framework contains a wide array of reusable C++ wrappers and framework components, and sports a rich feature set to facilitate the development of high-performance distributed, network, and real-time applications.

ACE Under the Hood

ACE has a layered architecture for the separation of concerns and reducing complexity. Figure 1 shows the various layers of the ACE architecture, followed by a brief explanation of these layers.

Figure 1: ACE Outline

OS Adaptation Layer

This is the lowest layer that resides upon native OS APIs of the OS platform ACE is being implemented on. This layer hides platform-specific dependencies of the underlying native OS APIs from other ACE layers and components. The layer achieves this by providing encapsulation and abstractions of native APIs, for a wide array of OS platforms, which handle the following communication-related tasks:

  • Concurrency and synchronization
  • Interprocess communication and shared memory management
  • Event demultiplexing
  • Explicit dynamic linking
  • File system

This layer ensures the portability and maintainability of ACE itself, along with the application built upon it.

C++ Wrapper Facades Layer

This layer contains C++ wrapper facades that provide typesafe C++ interfaces to further encapsulate and enhance communication-related native OS APIs and to facilitate the development of robust applications. This layer provides features and facilities, similar to an OS Adaptation layer, in an object-oriented (OO) format to simplify application development.

This layer consists of useful OO components for concurrency and synchronization, IPC, file system, and memory management.

The C++ wrappers' facades can be used and further customized, by inheriting, aggregating, and instantiating the components mentioned above for application development.

ACE Framework Components

This layer consists of framework components useful for developing communication software. These components integrate and enhance the lower-level C++ wrapper facades.

They help to develop communication software that can be updated and extended on-the-fly, without requiring source code modification, recompilation, or restating the application; by supporting a flexible configuration of concurrent communication application and services.

Major components of this layer include Reactor and Proactor components that handle event demultiplexing and dispatching application-specific handlers in response to various types of events. The Connector and Acceptor components respectively take care of decoupling the active and passive initialization roles from application-specific tasks performed on the completion of initialization. The Service Configurator facilitates an on-the-fly configuration of the application at install-time or run-time.

The hierarchically layered Streams components ease the development of applications that are built around hierarchically layered services (for example, user-level protocol stacks). The ORB Adapters help integrate single- and multi-threaded middleware implementations with ACE.

The next installment of this series will explore the role and usage of framework components in development of an application.

Self-contained distributed service components

Although not a standard integral part of the ACE framework, this layer can be useful for building communication software. This layer consists of a standard library of self-contained components providing distributed services.

These service components provide reusable implementations for common tasks that communication software has to perform; these tasks are naming, event routing, logging, time synchronization, and network locking. These implementations help incorporate tried and tested, best-practice approaches to the communication software components, simplifying their development and increasing their efficiency while reducing development time.

The service components also illustrate how ACE Framework components could be utilized effectively to build efficient, robust, and flexible communication software.

Higher-level distributed computing middleware components

This layer consists of standard-compliant and optimized implementations of major middleware technologies used for distributed computing (such as DCOM, CORBA, RMI), packaged as high-level ACE framework components. Major implementations include:

  • The ACE ORB (TAO), an implementation of CORBA for real-time environment.
  • JAWS, a high-performance adaptive Web server, based on ACE framework components and design patterns.
  • Java ACE, or JACE, is an implementation of ACE in Java (now dormant).

These components simplify development of comprehensive middleware solutions for communication based on ACE. They also facilitate automation of various tasks involved in building distributed application. Such tasks include the following:

  • Authentication, authorization, and data security
  • Service location and binding
  • Service registration and activation
  • Implementation of message framing upon bytestream-based communication protocols (for example, TCP)
  • Demultiplexing and dispatching in response to events
  • Presentation conversion issues involving network byte-ordering and parameter marshalling

ACE Features

  • ACE supports a wide range of OS platforms available today, including: Windows, Mac OS X, UNIX flavors such as Solaris, SGI IRIX, HP-UX, SCO and AIX etc.; Linux flavors such as RedHat Linux, Debian, FreeBSD and NetBSD; Real-time OS such as LynxOS, VxWorks, ChorusOS, RTEMS, PSoS, and so forth; OpenVMS, MVS OpenEdition, and the like.
  • Due to a wide range of OS platforms being supported, ACE makes it easy to build robust and efficient communication software that is also highly portable. An application built upon ACE for one OS platform can be easily ported to another OS platform while costing much less in terms of efforts and time.
  • ACE implements many key patterns that help enhance necessary qualities, namely flexibility, reliability, efficiency, and portability along with reusability and modularity of the communication software built upon ACE.
  • ACE satisfies Quality of Service (QoS) requirements for communication software by ensuring low latency for delay-sensitive applications, high-performance for bandwidth-intensive applications, and predictability for real-time applications.
  • ACE makes building efficient middleware solutions for communication easier by providing standard-compliant and optimized ACE-compatible implementations of major middleware technologies bundled with the ACE framework.

Conclusion

The ACE framework helps you to develop efficient, flexible, reliable, highly portable, and reusable communication software components for distributed, real-time, and network applications. It supports a wide range of OS platforms and QoS requirements and provides reusable best-practice implementations of common communication software tasks along with optimized middleware implementations. Also, because it is open source and freely available, it is a viable solution to fulfill communication software needs.

Whereas this first article installment focuses on introducing ACE, the next installment will explore application development using ACE.

About the Author

Mugdha Chauhan is a senior IT consultant and author. An open source supporter, she frequently writes articles and tutorials on useful emerging open source projects. Major tech portals including developer.com, IBM developerWorks, CNET Networks, Slashdot, and many eZines regularly publish her work. Her other expertise and interests include Java, Linux, XML, and wireless application development.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date