Home > Store

ACE Programmer's Guide, The: Practical Design Patterns for Network and Systems Programming

Register your product to gain access to bonus material or receive a coupon.

ACE Programmer's Guide, The: Practical Design Patterns for Network and Systems Programming

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

How-to book for ACE, an open-source toolkit for developing high-performance applications.

° An intro guide for ACE beginners, and an authoritative reference for all ACE users.

° Foreword by Dr. Douglas C. Schmidt--the original developer of ACE.

° ACE is an excellent example of how to design object-oriented software and use C++ to design and write high-performance, easily maintained software systems.

Description

  • Copyright 2004
  • Dimensions: 7-3/8" x 9-1/4"
  • Pages: 544
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-69971-0
  • ISBN-13: 978-0-201-69971-5

The ADAPTIVE Communication Environment (ACE) is an open-source toolkit for building high-performance networked applications and next-generation middleware. ACE's power and flexibility arise from object-oriented frameworks, used to achieve the systematic reuse of networked application software. ACE frameworks handle common network programming tasks and can be customized using C++ language features to produce complete distributed applications. This book will teach developers how they can use the ACE framework to develop their software. It will also show real-world uses of design patterns and C++. Benefits: Reduces the ACE learning curve, gain a clear understanding of how to use ACE to produce high-performance software using less time and effort; Provides a cookbook for solutions to common software engineering problems.

Sample Content

Online Sample Chapter

Using the ACE Logging Facility

Downloadable Sample Chapter

Download the Sample Chapter related to this title.

Table of Contents



Illustrations.


Tables.


Foreword.


Preface.

I. ACE BASICS.

1. Introduction to ACE.

A History of ACE.

ACE's Benefits.

ACE's Organization.

Patterns, Class Libraries, and Frameworks.

Porting Your Code to Multiple Operating Systems.

Smoothing the Differences among C++ Compilers.

Using Both Narrow and Wide Characters.

Where to Find More Information and Support.

Summary.

2. How to Build and Use ACE in Your Programs.

A Note about ACE Versions.

Guide to the ACE Distribution.

How to Build ACE.

How to Include ACE in Your Applications.

How to Build Your Applications.

Summary.

3. Using the ACE Logging Facility.

Basic Logging and Tracing.

Enabling and Disabling Logging Severities.

Customizing the ACE Logging Macros.

Redirecting Logging Output.

Using Callbacks.

The Logging Client and Server Daemons.

The LogManager Class.

Runtime Configuration with the ACE Logging Strategy.

Summary.

4. Collecting Runtime Information.

Command Line Arguments and ACE_Get_Opt.

Accessing Configuration Information.

Building Argument Vectors.

Summary.

5. ACE Containers.

Container Concepts.

Sequence Containers.

Associative Containers.

Allocators.

Summary.

II. INTERPROCESS COMMUNICATION.

6. Basic TCP/IP Socket Use.

A Simple Client.

Adding Robustness to a Client.

Building a Server.

Summary.

7. Handling Events and Multiple I/O Streams.

Overview of the Reactor Framework.

Handling Multiple I/O Sources.

Signals.

Notifications.

Timers.

Using the Acceptor-Connector Framework.

Reactor Implementations.

Summary.

8. Asynchronous I/O and the ACE Proactor Framework.

Why Use Asynchronous I/O?.

How to Send and Receive Data.

Establishing Connections.

The ACE_Proactor Completion Demultiplexer.

Using Timers.

Other I/O Factory Classes.

Combining the Reactor and Proactor Frameworks.

Summary.

9. Other IPC Types.

Interhost IPC with UDP/IP.

Intrahost Communication.

Summary.

III. PROCESS AND THREAD MANAGEMENT.

10. Process Management.

Spawning a New Process.

Using the ACE_Process_Manager.

Synchronization Using ACE_Process_Mutex.

Summary.

11. Signals.

Using Wrappers.

Event Handlers.

Guarding Critical Sections.

Signal Management with the Reactor.

Summary.

12. Basic Multithreaded Programming.

Getting Started.

Basic Thread Safety.

Intertask Communication.

Summary.

13. Thread Management.

Types of Threads.

Priorities and Scheduling Classes.

Thread Pools.

Thread Management Using ACE_Thread_Manager.

Signals.

Thread Start-Up Hooks.

Cancellation.

Summary.

14. Thread Safety and Synchronization.

Protection Primitives.

Thread Synchronization.

Thread-Specific Storage.

Summary.

15. Active Objects.

The Pattern.

Using the Pattern.

Summary.

16. Thread Pools.

Understanding Thread Pools.

Half-Sync/Half-Async Model.

Leader/Followers Model.

Thread Pools and the Reactor.

Summary.

IV. ADVANCED ACE.

17. Shared Memory.

ACE_Malloc and ACE_Allocator.

Persistence with ACE_Malloc.

Position-Independent Allocation.

ACE_Malloc for Containers.

Wrappers.

Summary.

18. ACE Streams Framework.

Overview.

Using a One-Way Stream.

A Bidirectional Stream.

Summary.

19. ACE Service Configurator Framework.

Overview.

Configuring Static Services.

Setting Up Dynamic Services.

Setting Up Streams.

Reconfiguring Services During Execution.

Using XML to Configure Services and Streams.

Configuring Services without svc.conf.

Singletons and Services.

Summary.

20. Timers.

Timer Concepts.

Timer Queues.

Prebuilt Dispatchers.

Managing Event Handlers.

Summary.

21. ACE Naming Service.

The ACE_Naming_Context.

A Single-Process Naming Context: PROC_LOCAL.

Sharing a Naming Context on One Node: NODE_LOCAL.

Sharing a Naming Context across the Network: NET_LOCAL.

Summary.

Bibliography.
Index. 0201699710T11042003

Foreword

I started programming computers in the mid-1980s. Then, like today, computing and communication systems were heterogeneous; that is, there were many different programming languages, operating systems, and networking protocols. Moreover, due to the accidental complexities of programming with low-level and nonportable application programming interfaces (APIs), the types of networked applications available to software developers and end users were relatively primitive, consisting largely of e-mail, remote login, and file transfer. As a result, many applications were either centralized on mainframes and minicomputers or localized on a single stand-alone PC or workstation.

There have been significant advances in information technology (IT) for computing and communication during the intervening two decades. Languages, programming environments, operating systems, networking protocols, and middleware are more mature and standardized. For example, C++ has become an ISO/ANSI standard and is being used in a broad range of application domains. Likewise, the UNIX, Windows, and TCP/IP standards have also become ubiquitous. Even distributed computing middleware standards, such as CORBA, .NET, and J2EE, are becoming widely embraced by the IT industry and end users.

Even with all these advances, however, there is still a layer of the networked software design space--host infrastructure middleware for performance-driven, multiplatform, networked and/or concurrent software systems--that is not well served by standard solutions at other levels of abstraction. Host infrastructure middleware encapsulates native operating system (OS) concurrency and interprocess communication (IPC) mechanisms to alleviate many tedious, error-prone, and nonportable activities associated with developing networked applications via native OS APIs, such as Sockets or POSIX threads (Pthreads). Performance-driven systems also have stringent quality of service (QoS) requirements.

Providing host infrastructure middleware for today's popular computing environments is particularly important for (1) high-performance computing systems, such as those that support scientific visualization, distributed database servers, and online financial trading systems; (2) distributed real-time and embedded systems that monitor and control real-world artifacts, such as avionics mission- and flight-control software, supervisory control and data acquisition systems, and automotive braking systems; and (3) multiplatform applications that must run portably across local- and wide-area networks. These types of systems are increasingly subject to the following trends:

  • The need to access native OS mechanisms to meet QoS requirements. For example, multimedia applications that require long-duration, bidirectional bytestream communication services are poorly suited to the synchronous request/response model provided by conventional distribution middleware. Likewise, many distribution middleware implementations incur significant overhead and lack sufficient hooks to manipulate other QoS-related properties, such as latency, throughput, and jitter.
  • Severe cost and time-to-market pressures. Global competition and market deregulation are shrinking budgets for the in-house development and quality assurance (QA) of software, particularly for the OS and middleware infrastructure. Moreover, performance-driven users are often unable or less willing to pay for specialized proprietary infrastructure software.
  • The demand for user-specific customization. Because performance-intensive software often pushes the limits of technology, it must be optimized for particular runtime contexts and application requirements. General-purpose, one-size-fits-all software solutions often have unacceptable performance.

As these trends continue to accelerate, they present many challenges to developers of tomorrow's networked software systems. In particular, to succeed in today's competitive, fast-paced computing industry, successful middleware and application software must exhibit the following eight characteristics:

  1. Affordability, to ensure that the total ownership costs of software acquisition and evolution aren't prohibitively high
  2. Extensibility, to support successions of quick updates and additions to address new requirements and take advantage of emerging markets
  3. Flexibility, to support a growing range of data types, traffic flows, and end-to-end QoS requirements
  4. Portability, to reduce the effort required to support applications on heterogeneous OS platforms and compilers
  5. Predictability and efficiency, to provide low latency to delay-sensitive real-time applications, high performance to bandwidth-intensive applications, and usability over low-bandwidth networks, such as wireless links
  6. Reliability, to ensure that applications are robust and tolerant of faults
  7. Scalability, to enable applications to handle many users simultaneously
  8. Trustworthiness, to ensure integrity, confidentiality, and availability in internetworked systems

I've encountered all these challenges while working on scores of research and production performance-driven software systems during the past two decades. In 1992, I began creating a software toolkit called the ADAPTIVE Communication Environment (ACE) to address concurrent network programming challenges. ACE is portable object-oriented host infrastructure middleware written in C++. ACE was designed to solve a very pragmatic problem--to save time implementing my doctoral dissertation project on parallel protocol processing engines in both SunOS 4.x and SunOS 5.x operating systems. Having worked on free software projects for many years, I recognized immediately that making ACE available in open-source form would help to galvanize a community whereby other developers and users could assist with the QA, documentation, and support activities needed to transform ACE into a high-quality production software toolkit.

Over the next decade, a core group of around 30 developers and I teamed up with more than 1,700 contributors from around the world to evolve ACE so it encapsulates and augments a wide range of native OS capabilities that are essential to support performance-driven software systems. The core frameworks and wrapper facades in ACE provide an integrated collection of reusable object-oriented classes that simplify and automate connection establishment, event demultiplexing, secure and efficient interprocess communication, (de)marshaling, dynamic configuration of application components, concurrency, and synchronization. Most important, the ACE frameworks can be customized readily to support a wide range of runtime contexts and application requirements.

Today, ACE runs on dozens of hardware and OS platforms, including most versions of Windows and UNIX, as well as many real-time and embedded operating systems. Due to its maturity, efficiency, and scope, ACE is being used by thousands of development teams, ranging from large Fortune 500 companies to small start-ups to advanced research projects at universities and industry labs. Its open-source development model and highly knowledgeable user community is similar in spirit, enthusiasm, and productivity to that driving the Linux operating system, the Apache web server, and the GNU compiler collection.

For many years, however, the only way to learn ACE was to read the source code and example applications, technical papers that described its patterns and the design of its frameworks, and online tutorials. Although a surprisingly large number of ACE users managed to master ACE via this process, the learning curve was time consuming and error prone. In 2002 and 2003, I teamed up with Steve Huston to write a pair of books on C++ Network Programming (C++NP), which cover the motivation, design, implementation, and use of the most popular wrapper facade classes and frameworks in ACE.

The ACE Programmer's Guide takes a different tack from the C++NP books, explaining quickly and directly how to make the best use of ACE. In addition to its nuts-and-bolts approach to explaining key ACE capabilities, this book addresses important topics not covered in the C++NP books, including how to build ACE and your programs that use ACE, ACE's OS and compiler portability features, the ACE logging facility, command line options processing, container classes, signal handling, and shared memory. The book also covers certain material in greater depth than the C++NP books, including concurrency models, bidirectional streams, and asynchronous I/O. Throughout this book, many examples using ACE show how key patterns and design principles can be applied to develop object-oriented networked software successfully. By learning the material in this book, you'll be better able to design and implement performance-driven networked software that can't be bought off-the-shelf, thereby staying ahead of your competition.

We are fortunate that Steve, James, and Umar have found time in their hectic schedules to write this book. If you're designing software and systems that must be portable, flexible, extensible, predictable, reliable, and affordable, this book and the ACE toolkit will enable you to be more effective in all these areas. Even after spending more than a decade developing ACE and using it to build networked software applications, I find that I've learned a great deal from this book, and I'm confident that you will too.

--Douglas C. Schmidt
Professor of Electrical Engineering and Computer Science atVanderbilt University and Inventor of ACE
Nashville, Tennessee

Index

Download the Index file related to this title.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020