Advanced CORBA Programming with C++ (Paperback)
暫譯: 進階 CORBA 程式設計與 C++

Michi Henning, Steve Vinoski

  • 出版商: Addison Wesley
  • 出版日期: 1999-02-17
  • 售價: $3,230
  • 貴賓價: 9.5$3,069
  • 語言: 英文
  • 頁數: 1120
  • 裝訂: Paperback
  • ISBN: 0201379279
  • ISBN-13: 9780201379273
  • 相關分類: C++ 程式語言
  • 已絕版

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

商品描述

 

Description

 

This book provides designers and developers the tools required to understand CORBA technology at the architectural, design, and code levels.This book offers hands-on explanations for building efficient applications, as well as lucid examples that provide practical advice on avoiding costly mistakes. With this book as a guide, programmers will find the support they need to successfully undertake CORBA development projects. The content is systematically arranged and presented so the book may be used as both a tutorial and a reference. The rich example programs in this definitive text show CORBA developers how to write clearer code that is more maintainable, portable, and efficient. The authors' detailed coverage of the IDL-to-C++ mapping moves beyond the mechanics of the APIs to discuss topics such aspotential pitfalls and efficiency. An in-depth presentation of the new Portable Object Adapter (POA) explains how to take advantage of its numerous features to create scalable and high-performance servers. In addition, detailed discussion of advanced topics, such as garbage collection and multithreading, provides developers with the knowledge they need to write commercial applications.

Back to Top


Appropriate Courses

CORBA/COM, Software Engineering--Advanced.

Back to Top

 

Features

  • In-depth coverage of IDL, including common idioms and design trade-offs.
  • Complete and detailed explanations of the Life Cycle, Naming, Trading, and Event Services.
  • Discussion of IIOP and implementation repositories.
  • Insight into the dynamic aspects of CORBA, such as dynamic typing and the new DynAny interfaces.
  • Advice on selecting appropriate application architectures and designs.
  • Detailed, portable, and vendor-independent source code.

Back to Top

 

Table Of Contents

 

Preface.
1. Introduction.

 

Introduction.
Organization of the Book.
CORBA Version.
Typographical Conventions.
Source Code Examples.
Vendor Dependencies.
Contacting the Authors.
 

I. INTRODUCTION TO CORBA.

 

 


2. An Overview of CORBA.

 

Introduction.
The Object Management Group.
Concepts and Terminology.
CORBA Features.
Request Invocation.
General CORBA Application Development.
Summary.


3. A Minimal CORBA Application.

 

 

Chapter Overview.
Writing and Compiling an IDL Definition.
Writing and Compiling a Server.
Writing and Compiling a Client.
Running Client and Server.
Summary.
 

II. CORE CORBA.

 

 


4. The OMG Interface Definition Language.

 

 

Chapter Overview.
Introduction.
Compilation.
Source Files.
Lexical Rules.
Basic IDL Types.
User-Defined Types.
Interfaces and Operations.
User Exceptions.
System Exceptions.
System Exceptions or User Exceptions?
Oneway Operations.
Contexts.
Attributes.
Modules.
Forward Declarations.
Inheritance.
Names and Scoping.
Repository Identifiers and pragma Directives.
Standard Include Files.
Recent IDL Extensions.
Summary.


5. IDL for a Climate Control System.

 

 

Chapter Overview.
The Climate Control System.
IDL for the Climate Control System.
The Complete Specification.


6. Basic IDL-to-C++ Mapping.

 

 

Chapter Overview.
Introduction.
Mapping for Identifiers.
Mapping for Modules.
The CORBA Module.
Mapping for Basic Types.
Mapping for Constants.
Mapping for Enumerated Types.
Variable-Length Types and _var Types.
The String_var Wrapper Class.
Mapping for Wide Strings.
Mapping for Fixed-Point Types.
Mapping for Structures.
Mapping for Sequences.
Mapping for Arrays.
Mapping for Unions.
Mapping for Recursive Structures and Unions.
Mapping for Type Definitions.
User-Defined Types and _var Classes.
Summary.


7. Client-Side C++ Mapping.

 

 

Chapter Overview.
Introduction.
Mapping for Interfaces.
Object Reference Types.
Life Cycle of Object References.
Semantics of _ptr References.
Pseudo-Objects.
ORB Initialization.
Initial References.
Stringified References.
The Object Pseudo-Interface.
_var References.
Mapping for Operations and Attributes.
Parameter Passing Rules.
Mapping for Exceptions.
Mapping for Contexts.
Summary.


8.Developing a Client for the Climate Control System.

 

 

Chapter Overview.
Introduction.
Overall Client Structure.
Included Files.
Helper Functions.
The main Program.
The Complete Client Code.
Summary.


9. Server-Side C++ Mapping.

 

 

Chapter Overview.
Introduction.
Mapping for Interfaces.
Servant Classes.
Object Incarnation.
Server main.
Parameter Passing Rules.
Raising Exceptions.
Tie Classes.
Summary.


10. Developing a Server for the Climate Control System.

 

 

Chapter Overview.
Introduction.
The Instrument Control Protocol API.
Designing the Thermometer Servant Class.
Implementing the Thermometer Servant Class.
Designing the Thermostat Servant Class.
Implementing the Thermostat Servant Class.
Designing the Controller Servant Class.
Implementing the Controller Servant Class.
Implementing the Server Main Function.
The Complete Server Code.
Summary.


11. The Portable Object Adapter.

 

 

Chapter Overview.
Introduction.
POA Fundamentals.
POA Policies.
POA Creation.
Servant IDL Type.
Object Creation and Activation.
Reference, ObjectId, and Servant.
Object Deactivation.
Request Flow Control.
ORB Event Handling.
POA Activation.
POA Destruction.
Applying POA Policies.
Summary.


12. Object Life Cycle.

 

 

Chapter Overview.
Introduction.
Object Factories.
Destroying, Copying, and Moving Objects.
A Critique of the Life Cycle Service.
The Evictor Pattern.
Garbage Collection of Servants.
Garbage Collection of CORBA Objects.
Summary.
 

III. CORBA MECHANISMS.

 

 


13. GIOP, IIOP, and IORs.

 

 

Chapter Overview.
An Overview of GIOP.
Common Data Representation.
GIOP Message Formats.
GIOP Connection Management.
Detecting Disorderly Shutdown.
An Overview of IIOP.
Structure of an IOR.
Bidirectional IIOP.
Summary.


14. Implementation Repositories and Binding.

 

 

Chapter Overview.
Binding Modes.
Direct Binding.
Indirect Binding via an Implementation Repository.
Migration, Reliability, Performance, and Scalability.
Activation Modes.
Race Conditions.
Security Considerations.
Summary.
 

IV. DYNAMIC CORBA.

 

 


15. C++ Mapping for Type Any.

 

 

Chapter Overview.
Introduction.
Type Any C++ Mapping.
Pitfalls in Type Definitions.
Summary.


16. Type Codes.

 

 

Chapter Overview.
Introduction.
The TypeCode Pseudo-Object.
C++ Mapping for the TypeCode Pseudo-Object.
Type Code Comparisons.
Type Code Constants.
Type Code Comparison for Type Any.
Creating Type Codes Dynamically.
Summary.


17. Type DynAny.

 

 

Chapter Overview.
Introduction.
The DynAny Interface.
C++ Mapping for the DynAny Pseudo-Object.
Using DynAny for Generic Display.
Obtaining Type Information.
Summary.
 

V. CORBASERVICES.

 

 


18. The OMG Naming Service.

 

 

Chapter Overview.
Introduction.
Basic Concepts.
Structure of the Naming Service IDL.
Semantics of Names.
Naming Context IDL.
Iterators.
Pitfalls in the Naming Service.
The Names Library.
Naming Service Tools.
What to Advertise.
When to Advertise.
Federated Naming.
Adding Naming to the Climate Control System.
Summary.


19. The OMG Trading Service.

 

 

Chapter Overview.
Introduction.
Trading Concepts and Terminology.
IDL Overview.
The Service Type Repository.
The Trader Interfaces.
Exporting Service Offers.
Withdrawing Service Offers.
Modifying Service Offers.
The Trader Constraint Language.
Importing Service Offers.
Bulk Withdrawal.
The Admin Interface.
Inspecting Service Offers.
Exporting Dynamic Properties.
Trader Federation.
Trader Tools.
Architectural Considerations.
What to Advertise.
Avoiding Duplicate Service Offers.
Adding Trading to the Climate Control System.
Summary.


20. The OMG Event Service.

 

 

Chapter Overview.
Introduction.
Distributed Callbacks.
Event Service Basics.
Event Service Interfaces.
Implementing Consumers and Suppliers.
Choosing an Event Model.
Event Service Limitations.
Summary.
 

VI. POWER CORBA.

 

 


21. Multithreaded Applications.

 

 

Chapter Overview.
Introduction.
Motivation for Multithreaded Programs.
Fundamentals of Multithreaded Servers.
Multithreading Strategies.
Implementing a Multithreaded Server.
Servant Activators and the Evictor Pattern.
Summary.


22. Performance, Scalability, and Maintainability.

 

 

Chapter Overview.
Introduction.
Reducing Messaging Overhead.
Optimizing Server Implementations.
Federating Services.
Improving Physical Design.
Summary.


Appendix A: Source Code for the ICP Simulator.

 

 

Overview.
Transient Simulator Code.
Persistent Simulator Code.


Appendix B: CORBA Resources.

 

 

World Wide Web.
Newsgroups.
Mailing Lists.
Magazines.


Bibliography.
Index. 0201379279T10252001


Back to Top

 

 

商品描述(中文翻譯)

描述

本書為設計師和開發人員提供了理解CORBA技術所需的工具,涵蓋架構、設計和程式碼層面。本書提供了構建高效應用程式的實作說明,以及清晰的範例,提供實用建議以避免代價高昂的錯誤。以本書為指導,程式設計師將找到成功進行CORBA開發專案所需的支持。內容系統性地安排和呈現,因此本書可用作教學和參考。這本權威文本中的豐富範例程式展示了CORBA開發人員如何編寫更清晰、可維護、可攜帶且高效的程式碼。作者對IDL到C++映射的詳細說明超越了API的機制,討論了潛在的陷阱和效率等主題。對新的可攜式物件適配器(Portable Object Adapter, POA)的深入介紹解釋了如何利用其眾多特性來創建可擴展和高效能的伺服器。此外,對於垃圾回收和多執行緒等進階主題的詳細討論,為開發人員提供了撰寫商業應用程式所需的知識。

適合的課程

CORBA/COM,軟體工程--進階。

特點

- 深入涵蓋IDL,包括常見的慣用語和設計權衡。
- 完整且詳細的生命週期、命名、交易和事件服務的解釋。
- 討論IIOP和實作庫。
- 對CORBA的動態特性(如動態類型和新的DynAny介面)的見解。
- 有關選擇適當應用架構和設計的建議。
- 詳細、可攜帶且不依賴供應商的原始碼。

目錄

前言。
1. 介紹。

介紹。
本書組織。
CORBA版本。
排版慣例。
原始碼範例。
供應商依賴。
聯絡作者。

I. CORBA介紹。

2. CORBA概述。

介紹。
物件管理組織。
概念和術語。
CORBA特性。
請求調用。
一般CORBA應用開發。
總結。

3. 最小CORBA應用。

章節概述。
撰寫和編譯IDL定義。
撰寫和編譯伺服器。
撰寫和編譯客戶端。
運行客戶端和伺服器。
總結。

II. 核心CORBA。

4. OMG介面定義語言。

章節概述。
介紹。
編譯。
原始檔案。
詞法規則。
基本IDL類型。
使用者定義類型。
介面和操作。
使用者例外。
系統例外。
系統例外或使用者例外?
單向操作。
上下文。
屬性。
模組。
前向聲明。
繼承。
名稱和範圍。
庫識別符和pragma指令。
標準包含檔案。
最近的IDL擴展。
總結。

5. 氣候控制系統的IDL。

章節概述。
氣候控制系統。
氣候控制系統的IDL。
完整規範。

6. 基本IDL到C++的映射。

章節概述。
介紹。
標識符的映射。
模組的映射。
CORBA模組。
基本類型的映射。
常數的映射。
列舉類型的映射。
可變長度類型和_var類型。
String_var包裝類。
寬字串的映射。
定點類型的映射。
結構的映射。
序列的映射。
陣列的映射。
聯合的映射。
遞歸結構和聯合的映射。
類型定義的映射。
使用者定義類型和_var類別。
總結。

7. 客戶端C++映射。

章節概述。
介紹。
介面的映射。
物件參考類型。
物件參考的生命週期。
_ptr參考的語義。
偽物件。
ORB初始化。
初始參考。
字串化參考。
物件偽介面。
_var參考。
操作和屬性的映射。
參數傳遞規則。
例外的映射。
上下文的映射。
總結。

8. 為氣候控制系統開發客戶端。

章節概述。
介紹。
整體客戶端結構。
包含的檔案。
輔助函數。
主程式。
完整的客戶端程式碼。
總結。

9. 伺服器端C++映射。

章節概述。
介紹。
介面的映射。
服務類別。
物件實例化。
伺服器主程式。
參數傳遞規則。
引發例外。
Tie類別。
總結。

10. 為氣候控制系統開發伺服器。

章節概述。
介紹。
儀器控制協定API。
設計溫度計服務類別。
實作溫度計服務類別。
設計恆溫器服務類別。
實作恆溫器服務類別。
設計控制器服務類別。
實作控制器服務類別。
實作伺服器Main函數。
完整的伺服器程式碼。
總結。

11. 可攜式物件適配器。

章節概述。
介紹。
POA基本原理。
POA政策。
POA創建。
Servant IDL類型。
物件創建和啟用。
參考、ObjectId和Servant。
物件停用。
請求流控制。
ORB事件處理。
POA啟用。
POA銷毀。
應用POA政策。
總結。

12. 物件生命週期。

章節概述。
介紹。
物件工廠。
銷毀、複製和移動物件。
對生命週期服務的批評。
驅逐者模式。
服務的垃圾回收。
CORBA物件的垃圾回收。
總結。

III. CORBA機制。

13. GIOP、IIOP和IORs。

章節概述。
GIOP概述。
通用數據表示。
GIOP消息格式。
GIOP連接管理。
檢測無序關閉。
IIOP概述。
IOR的結構。
雙向IIOP。
總結。

14. 實作庫和綁定。