The ACE Programmer's Guide: Practical Design Patterns for Network and Systems Programming
暫譯: ACE 程式設計師指南:網路與系統程式設計的實用設計模式

Stephen D. Huston, James CE Johnson, Umar Syyid

  • 出版商: Addison Wesley
  • 出版日期: 2003-11-24
  • 定價: $2,150
  • 售價: 9.0$1,935
  • 語言: 英文
  • 頁數: 544
  • 裝訂: Paperback
  • ISBN: 0201699710
  • ISBN-13: 9780201699715
  • 相關分類: Design Pattern
  • 立即出貨

買這商品的人也買了...

相關主題

商品描述

 

Summary

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 of these areas. Even after spending over 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, Inventor of ACE, from the Foreword

This book is a must-have for every ACE programmer. For the beginner, it explains step-by-step how to start using ACE. For the more experienced programmer, it explains in detail the features used daily, and is a perfect reference manual. It would have saved me a lot of time if this book had been available some years ago!
--Johnny Willemsen, Senior Software Engineer, Remedy IT, The Netherlands

With a large C++ code base, we rely on ACE to enable a cross-platform client-server framework for data quality and data integration. ACE has improved our design and smoothed over OS idiosyncrasies without sacrificing performance or flexibility. The combination of online reference materials and printed "big picture" guides is indispensable for us, and The ACE Programmer's Guide earns top-shelf status in my office.
--John Lilley, Chief Scientist, DataLever Corporation

In SITA air-ground division, we are one of the major suppliers of communication services to the airline industry. We started using ACE about a year ago and are now moving most of our new communication-related development to it. I can say that using this toolkit can reduce the development and testing time by at least 50% in our type of application.
--Jean Millo, Senior Architect, SITA

The ADAPTIVE Communication Environment (ACE) is an open-source software toolkit created to solve network programming challenges. Written in C++, with the help of 30 core developers and 1,700 contributors, this portable middleware has evolved to encapsulate and augment a wide range of native OS capabilities essential to support performance-driven software systems.

The ACE Programmer's Guide is a practical, hands-on guide to ACE for C++ programmers building networked applications and next-generation middleware. The book first introduces ACE to beginners. It then explains how you can tap design patterns, frameworks, and ACE to produce effective, easily maintained software systems with less time and effort. The book features discussions of programming aids, interprocess communication (IPC) issues, process and thread management, shared memory, the ACE Service Configurator framework, timer management classes, the ACE Naming Service, and more.

The accompanying CD-ROM contains the complete ACE toolkit, including installable kits for Windows, Solaris, and HP-UX; complete reference documentation for all of the ACE classes; and source code for every example in the book.

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.

商品描述(中文翻譯)

摘要

如果您正在設計必須具備可攜性、靈活性、可擴展性、可預測性、可靠性和經濟性的軟體和系統,本書及 ACE 工具包將使您在這些領域更有效率。即使在花了十多年時間開發 ACE 並使用它來構建網路軟體應用程式後,我發現我從這本書中學到了很多,我相信您也會如此。
--Douglas C. Schmidt,ACE 的發明者,前言中提到

這本書是每位 ACE 程式設計師的必備之作。對於初學者,它逐步解釋如何開始使用 ACE。對於更有經驗的程式設計師,它詳細說明了日常使用的功能,並且是一本完美的參考手冊。如果這本書幾年前就已經出版,那將為我節省很多時間!
--Johnny Willemsen,荷蘭 Remedy IT 的資深軟體工程師

我們擁有龐大的 C++ 代碼庫,依賴 ACE 來實現跨平台的客戶端-伺服器框架,以確保數據質量和數據整合。ACE 改善了我們的設計,並平滑了作業系統的特性,而不犧牲性能或靈活性。線上參考資料和印刷的「大圖」指南的結合對我們來說是不可或缺的,而《ACE 程式設計師指南》在我的辦公室中獲得了最高的地位。
--John Lilley,DataLever Corporation 的首席科學家

在 SITA 的空地部門,我們是航空業主要的通信服務供應商之一。我們大約在一年前開始使用 ACE,現在正在將大部分新的通信相關開發轉移到它上面。我可以說,使用這個工具包可以將我們這類應用程式的開發和測試時間至少減少 50%。
--Jean Millo,SITA 的資深架構師

自適應通信環境 (ACE) 是一個開源軟體工具包,旨在解決網路編程挑戰。它是用 C++ 編寫的,得到了 30 位核心開發者和 1,700 名貢獻者的幫助,這個可攜式中介軟體已經發展到封裝和增強一系列本地作業系統功能,這些功能對支持以性能為驅動的軟體系統至關重要。

《ACE 程式設計師指南》是一本實用的、動手操作的 ACE 指南,適合 C++ 程式設計師構建網路應用程式和下一代中介軟體。本書首先向初學者介紹 ACE,然後解釋如何利用設計模式、框架和 ACE 來生產有效且易於維護的軟體系統,從而減少時間和精力。本書還討論了編程輔助工具、進程間通信 (IPC) 問題、進程和線程管理、共享內存、ACE 服務配置器框架、計時器管理類、ACE 命名服務等內容。

隨附的 CD-ROM 包含完整的 ACE 工具包,包括適用於 Windows、Solaris 和 HP-UX 的可安裝套件;所有 ACE 類的完整參考文檔;以及書中每個示例的源代碼。

目錄

插圖。
表格。
前言。
序言。
I. ACE 基礎。
1. ACE 介紹。
ACE 的歷史。
ACE 的好處。
ACE 的組織。
模式、類庫和框架。
將您的代碼移植到多個作業系統。
平滑 C++ 編譯器之間的差異。
使用窄字符和寬字符。
尋找更多信息和支持的地方。
摘要。
2. 如何在您的程式中構建和使用 ACE。
關於 ACE 版本的說明。
ACE 發行版指南。
如何構建 ACE。
如何在您的應用程式中包含 ACE。
如何構建您的應用程式。
摘要。
3. 使用 ACE 日誌設施。
基本日誌和追蹤。
啟用和禁用日誌嚴重性。
自定義 ACE 日誌宏。
重定向日誌輸出。
使用回調。
日誌客戶端和伺服器守護進程。
LogManager 類。
使用 ACE 日誌策略的運行時配置。
摘要。
4. 收集運行時信息。
命令行參數和 ACE_Get_Opt。
訪問配置信息。
構建參數向量。
摘要。
5. ACE 容器。
容器概念。
序列容器。
關聯容器。
分配器。
摘要。
II. 進程間通信。
6. 基本 TCP/IP 套接字使用。
一個簡單的客戶端。
為客戶端增加穩健性。
構建伺服器。
摘要。
7. 處理事件和多個 I/O 流。
反應器框架概述。
處理多個 I/O 源。
信號。
通知。
計時器。
使用接受者-連接器框架。
反應器實現。
摘要。
8. 非同步 I/O 和 ACE Proactor 框架。
為什麼使用非同步 I/O?
如何發送和接收數據。
建立連接。
ACE_Proactor 完成多路復用器。
使用計時器。
其他 I/O 工廠類。
結合反應器和 Proactor 框架。
摘要。
9. 其他 IPC 類型。
使用 UDP/IP 的主機間 IPC。
主機內通信。
摘要。
III. 進程和線程管理。
10. 進程管理。
產生新進程。
使用 ACE_Process_Manager。
使用 ACE_Process_Mutex 進行同步。
摘要。
11. 信號。
使用包裝器。
事件處理器。
保護臨界區。
使用反應器進行信號管理。
摘要。
12. 基本多線程編程。
入門。
基本線程安全。
任務間通信。
摘要。
13. 線程管理。
線程類型。
優先級和調度類。
線程池。
使用 ACE_Thread_Manager 進行線程管理。
信號。
線程啟動鉤子。
取消。
摘要。
14. 線程安全和同步。
保護原語。
線程同步。
線程特定存儲。
摘要。
15. 活躍對象。
模式。
使用該模式。
摘要。
16. 線程池。
理解線程池。
半同步/半非同步模型。
領導者/追隨者模型。