The ACE programmer s guide practical design patterns for network and systems programming 5. print Edition Johnson pdf download
The ACE programmer s guide practical design patterns for network and systems programming 5. print Edition Johnson pdf download
https://ebookfinal.com/download/the-ace-programmer-s-guide-
practical-design-patterns-for-network-and-systems-
programming-5-print-edition-johnson/
https://ebookfinal.com/download/systems-programmer-s-guide-to-z-os-
system-logger-1st-ed-edition-ibm-redbooks/
https://ebookfinal.com/download/the-theft-of-history-5-print-edition-
jack-goody/
https://ebookfinal.com/download/mongodb-applied-design-patterns-
practical-use-cases-with-the-leading-nosql-database-1st-edition-rick-
copeland/
The ACE programmer s guide practical design patterns
for network and systems programming 5. print Edition
Johnson Digital Instant Download
Author(s): Johnson, James CE;Syyid, Umar;Huston, Stephen D
ISBN(s): 9780201699715, 0201699710
Edition: 5. print
File Details: PDF, 3.47 MB
Year: 2009
Language: english
The ACE Programmer’s Guide
This page intentionally left blank
The ACE Programmer’s Guide
Stephen D. Huston
James CE Johnson
Umar Syyid
The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind
and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in
connection with or arising out of the use of the information or programs contained herein.
Figures 7.1, 7.2, 7.3, and 8.1 originally published in Schmidt/Huston, C++ Network Programming, Volume 2: Systematic Reuse
with ACE and Frameworks, Copyright © 2003 by Pearson Education, Inc. Reprinted with permission of Pearson Education, Inc.
The publisher offers discounts on this book when ordered in quantity for bulk purchases and special sales. For more information,
please contact:
U.S. Corporate and Government Sales
(800) 382-3419
[email protected]
For sales outside of the U.S., please contact:
International Sales
[email protected]
Visit Addison-Wesley on the Web: www.awprofessional.com
Library of Congress Cataloging-in-Publication Data
Huston, Stephen D.
The ACE programmer’s guide : practical design patterns for network and systems
programming / Stephen D. Huston, James CE Johnson and Umar Syyid.
p. cm.
ISBN 0-201-69971-0 (pbk. : alk. paper)
1. Computer software—Development. 2. Object-oriented programming (Computer science)
3. Software patterns. I. Johnson, James C. E. II. Syyid, Umar. III. Title.
QA76.76.D47H89 2003
005.1’17—dc21 2003014046
Illustrations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Part I: ACE Basics 1
1. Introduction to ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 A History of ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 ACE’s Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 ACE’s Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Patterns, Class Libraries, and Frameworks. . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Porting Your Code to Multiple Operating Systems . . . . . . . . . . . . . . . . 8
1.6 Smoothing the Differences among C++ Compilers . . . . . . . . . . . . . . . 11
1.7 Using Both Narrow and Wide Characters . . . . . . . . . . . . . . . . . . . . . . 19
1.8 Where to Find More Information and Support. . . . . . . . . . . . . . . . . . . 21
1.9 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2. How to Build and Use ACE in Your Programs . . . . . . . . . . . . . . . 25
2.1 A Note about ACE Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2 Guide to the ACE Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
v
vi Contents
xi
This page intentionally left blank
Tables
xiii
xiv Tables
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 heteroge-
neous 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 inter-
networked 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 imple-
menting my doctoral dissertation project on parallel protocol processing engines
in both SunOS 4.x and SunOS 5.x operating systems. Having worked on free soft-
ware projects for many years, I recognized immediately that making ACE avail-
able in open-source form would help to galvanize a community whereby other
developers and users could assist with the QA, documentation, and support activi-
ties 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 essen-
tial 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 synchroniza-
tion. 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 oper-
ating systems. Due to its maturity, efficiency, and scope, ACE is being used by
thousands of development teams, ranging from large Fortune 500 companies to
xviii Foreword
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 soft-
ware 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 at
Vanderbilt University and Inventor of ACE
Nashville, Tennessee
Preface
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com