rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9780201379273

Advanced CORBA® Programming with C++

by ;
  • ISBN13:

    9780201379273

  • ISBN10:

    0201379279

  • Edition: 1st
  • Format: Paperback
  • Copyright: 1999-02-17
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $79.99

Summary

Written for C++ practitioners, this book is the first to explore advanced Common Object Request Broker Architecture (CORBA) topics and techniques. Michi Henning and Steve Vinoski share the benefits of their extensive experience with CORBA programming, and arm the programmer with the skills necessary to overcome the intricate programming issues that arise in a real-world environment. By learning proven, hands-on explanations for building CORBA applications, the reader will be well on the way to building more successful distributed objects for industrial-strength development projects.

Author Biography

Michi Henning is the founder of Triodia Technologies in Brisbane, Australia, where he spends much of his time providing CORBA consulting and training to international customers. He has contributed to a number of OMG specifications, and is involved in ongoing CORBA-related research. Michi is also a member of the OMG's Core and C++ Revision Task Forces. Steve Vinoski is chief architect for IONA Technologies, Inc., where he guides the development of advanced CORBA-based products. He frequently presents CORBA C++ tutorials at technical conferences around the globe. In addition, Steve has coauthored several important OMG specifications, and is the chair of the OMG's C++ Revision Task Force.

Table of Contents

Preface xvii
Chapter 1 Introduction
1(6)
1.1 Introduction
1(2)
1.2 Organization of the Book
3(1)
1.3 CORBA Version
4(1)
1.4 Typographical Conventions
5(1)
1.5 Source Code Examples
5(1)
1.6 Vendor Dependencies
6(1)
1.7 Contacting the Authors
6(1)
Part I Introduction to CORBA 7(42)
Chapter 2 An Overview of CORBA
9(28)
2.1 Introduction
9(2)
2.2 The Object Management Group
11(3)
2.3 Concepts and Terminology
14(1)
2.4 CORBA Features
15(8)
2.5 Request Invocation
23(10)
2.6 General CORBA Application Development
33(2)
2.7 Summary
35(2)
Chapter 3 A Minimal CORBA Application
37(12)
3.1 Chapter Overview
37(1)
3.2 Writing and Compiling an IDL Definition
37(2)
3.3 Writing and Compiling a Server
39(5)
3.4 Writing and Compiling a Client
44(3)
3.5 Running Client and Server
47(1)
3.6 Summary
48(1)
Part II Core CORBA 49(554)
Chapter 4 The OMG Interface Definition Language
51(76)
4.1 Chapter Overview
51(1)
4.2 Introduction
51(1)
4.3 Compilation
52(4)
4.4 Source Files
56(1)
4.5 Lexical Rules
57(2)
4.6 Basic IDL Types
59(3)
4.7 User-Defined Types
62(15)
4.8 Interfaces and Operations
77(11)
4.9 User Exceptions
88(3)
4.10 System Exceptions
91(3)
4.11 System Exceptions or User Exceptions?
94(1)
4.12 Oneway Operations
95(2)
4.13 Contexts
97(1)
4.14 Attributes
98(2)
4.15 Modules
100(2)
4.16 Forward Declarations
102(1)
4.17 Inheritance
103(9)
4.18 Names and Scoping
112(4)
4.19 Repository Identifiers and pragma Directives
116(4)
4.20 Standard Include Files
120(1)
4.21 Recent IDL Extensions
121(4)
4.22 Summary
125(2)
Chapter 5 IDL for a Climate Control System
127(12)
5.1 Chapter Overview
127(1)
5.2 The Climate Control System
127(3)
5.3 IDL for the Climate Control System
130(6)
5.4 The Complete Specification
136(3)
Chapter 6 Basic IDL-to-C++ Mapping
139(84)
6.1 Chapter Overview
139(1)
6.2 Introduction
140(1)
6.3 Mapping for Identifiers
141(1)
6.4 Mapping for Modules
142(2)
6.5 The CORBA Module
144(1)
6.6 Mapping for Basic Types
144(4)
6.7 Mapping for Constants
148(2)
6.8 Mapping for Enumerated Types
150(1)
6.9 Variable-Length Types and_var Types
151(5)
6.10 The String_var Wrapper Class
156(13)
6.11 Mapping for Wide Strings
169(1)
6.12 Mapping for Fixed-Point Types
169(4)
6.13 Mapping for Structures
173(6)
6.14 Mapping for Sequences
179(19)
6.15 Mapping for Arrays
198(3)
6.16 Mapping for Unions
201(8)
6.17 Mapping for Recursive Structures and Unions
209(1)
6.18 Mapping for Type Definitions
210(1)
6.19 User-Defined Types and_var Classes
211(11)
6.20 Summary
222(1)
Chapter 7 Client-Side C++ Mapping
223(102)
7.1 Chapter Overview
223(1)
7.2 Introduction
223(1)
7.3 Mapping for Interfaces
224(1)
7.4 Object Reference Types
225(2)
7.5 Life Cycle of Object References
227(7)
7.6 Semantics of_ptr References
234(7)
7.7 Pseudo-Objects
241(1)
7.8 ORB Initialization
242(3)
7.9 Initial References
245(4)
7.10 Stringified References
249(2)
7.11 The Object Pseudo-Interface
251(8)
7.12 _var References
259(12)
7.13 Mapping for Operations and Attributes
271(3)
7.14 Parameter Passing Rules
274(33)
7.15 Mapping for Exceptions
307(15)
7.16 Mapping for Contexts
322(1)
7.17 Summary
323(2)
Chapter 8 Developing a Client for the Climate Control System
325(24)
8.1 Chapter Overview
325(1)
8.2 Introduction
325(1)
8.3 Overall Client Structure
326(1)
8.4 Included Files
327(1)
8.5 Helper Functions
328(5)
8.6 The main Program
333(8)
8.7 The Complete Client Code
341(5)
8.8 Summary
346(3)
Chapter 9 Server-Side C++ Mapping
349(40)
9.1 Chapter Overview
349(1)
9.2 Introduction
349(2)
9.3 Mapping for Interfaces
351(2)
9.4 Servant Classes
353(2)
9.5 Object Incarnation
355(1)
9.6 Server main
356(2)
9.7 Parameter Passing Rules
358(18)
9.8 Raising Exceptions
376(6)
9.9 Tie Classes
382(5)
9.10 Summary
387(2)
Chapter 10 Developing a Server for the Climate Control System
389(40)
10.1 Chapter Overview
389(1)
10.2 Introduction
389(1)
10.3 The Instrument Control Protocol API
390(3)
10.4 Designing the Thermometer Servant Class
393(3)
10.5 Implementing the Thermometer Servant Class
396(3)
10.6 Designing the Thermostat Servant Class
399(3)
10.7 Implementing the Thermostat Servant Class
402(3)
10.8 Designing the Controller Servant Class
405(2)
10.9 Implementing the Controller Servant Class
407(6)
10.10 Implementing the Server main Function
413(1)
10.11 The Complete Server Code
414(13)
10.12 Summary
427(2)
Chapter 11 The Portable Object Adapter
429(104)
11.1 Chapter Overview
429(1)
11.2 Introduction
430(1)
11.3 POA Fundamentals
430(4)
11.4 POA Policies
434(13)
11.5 POA Creation
447(4)
11.6 Servant IDL Type
451(4)
11.7 Object Creation and Activation
455(41)
11.8 Reference, ObjectId, and Servant
496(3)
11.9 Object Deactivation
499(3)
11.10 Request Flow Control
502(4)
11.11 ORB Event Handling
506(8)
11.12 POA Activation
514(6)
11.13 POA Destruction
520(2)
11.14 Applying POA Policies
522(9)
11.15 Summary
531(2)
Chapter 12 Object Life Cycle
533(70)
12.1 Chapter Overview
533(1)
12.2 Introduction
533(1)
12.3 Object Factories
534(14)
12.4 Destroying, Copying, and Moving Objects
548(16)
12.5 A Critique of the Life Cycle Service
564(6)
12.6 The Evictor Pattern
570(19)
12.7 Garbage Collection of Servants
589(9)
12.8 Garbage Collection of CORBA Objects
598(2)
12.9 Summary
600(3)
Part III CORBA Mechanisms 603(58)
Chapter 13 GIOP, IIOP, and IORs
605(26)
13.1 Chapter Overview
605(1)
13.2 An Overview of GIOP
606(1)
13.3 Common Data Representation
607(5)
13.4 GIOP Message Formats
612(9)
13.5 GIOP Connection Management
621(2)
13.6 Detecting Disorderly Shutdown
623(1)
13.7 An Overview of IIOP
624(2)
13.8 Structure of an IOR
626(3)
13.9 Bidirectional IIOP
629(1)
13.10 Summary
630(1)
Chapter 14 Implementation Repositories and Binding
631(30)
14.1 Chapter Overview
631(1)
14.2 Binding Modes
631(1)
14.3 Direct Binding
632(4)
14.4 Indirect Binding via an Implementation Repository
636(12)
14.5 Migration, Reliability, Performance, and Scalability
648(4)
14.6 Activation Modes
652(1)
14.7 Race Conditions
653(3)
14.8 Security Considerations
656(3)
14.9 Summary
659(2)
Part IV Dynamic CORBA 661(108)
Chapter 15 C++ Mapping for Type any
663(28)
15.1 Chapter Overview
663(1)
15.2 Introduction
663(4)
15.3 Type any C++ Mapping
667(22)
15.4 Pitfalls in Type Definitions
689(1)
15.5 Summary
690(1)
Chapter 16 Type Codes
691(46)
16.1 Chapter Overview
691(1)
16.2 Introduction
692(1)
16.3 The TypeCode Pseudo-Object
692(11)
16.4 C++ Mapping for the TypeCode Pseudo-Object
703(12)
16.5 Type Code Comparisons
715(6)
16.6 Type Code Constants
721(4)
16.7 Type Code Comparison for Type any
725(2)
16.8 Creating Type Codes Dynamically
727(9)
16.9 Summary
736(1)
Chapter 17 Type DynAny
737(32)
17.1 Chapter Overview
737(1)
17.2 Introduction
737(1)
17.3 The DynAny Interface
738(12)
17.4 C++ Mapping for the DynAny Pseudo-Object
750(13)
17.5 Using DynAny for Generic Display
763(3)
17.6 Obtaining Type Information
766(2)
17.7 Summary
768(1)
Part V CORBAservices 769(196)
Chapter 18 The OMG Naming Service
771(56)
18.1 Chapter Overview
771(1)
18.2 Introduction
771(1)
18.3 Basic Concepts
772(2)
18.4 Structure of the Naming Service IDL
774(1)
18.5 Semantics of Names
775(5)
18.6 Naming Context IDL
780(20)
18.7 Iterators
800(8)
18.8 Pitfalls in the Naming Service
808(2)
18.9 The Names Library
810(1)
18.10 Naming Service Tools
810(1)
18.11 What to Advertise
811(1)
18.12 When to Advertise
812(1)
18.13 Federated Naming
813(4)
18.14 Adding Naming to the Climate Control System
817(7)
18.15 Summary
824(3)
Chapter 19 The OMG Trading Service
827(96)
19.1 Chapter Overview
827(1)
19.2 Introduction
828(1)
19.3 Trading Concepts and Terminology
828(6)
19.4 IDL Overview
834(1)
19.5 The Service Type Repository
835(19)
19.6 The Trader Interfaces
854(6)
19.7 Exporting Service Offers
860(6)
19.8 Withdrawing Service Offers
866(1)
19.9 Modifying Service Offers
867(2)
19.10 The Trader Constraint Language
869(4)
19.11 Importing Service Offers
873(17)
19.12 Bulk Withdrawal
890(1)
19.13 The Admin Interface
891(3)
19.14 Inspecting Service Offers
894(1)
19.15 Exporting Dynamic Properties
894(4)
19.16 Trader Federation
898(13)
19.17 Trader Tools
911(1)
19.18 Architectural Considerations
911(2)
19.19 What to Advertise
913(1)
19.20 Avoiding Duplicate Service Offers
914(1)
19.21 Adding Trading to the Climate Control System
915(5)
19.22 Summary
920(3)
Chapter 20 The OMG Event Service
923(42)
20.1 Chapter Overview
923(1)
20.2 Introduction
923(1)
20.3 Distributed Callbacks
924(7)
20.4 Event Service Basics
931(5)
20.5 Event Service Interfaces
936(9)
20.6 Implementing Consumers and Suppliers
945(13)
20.7 Choosing an Event Model
958(3)
20.8 Event Service Limitations
961(2)
20.9 Summary
963(2)
Part VI Power CORBA 965(54)
Chapter 21 Multithreaded Applications
967(32)
21.1 Chapter Overview
967(1)
21.2 Introduction
967(1)
21.3 Motivation for Multithreaded Programs
968(4)
21.4 Fundamentals of Multithreaded Servers
972(8)
21.5 Multithreading Strategies
980(1)
21.6 Implementing a Multithreaded Server
981(15)
21.7 Servant Activators and the Evictor Pattern
996(1)
21.8 Summary
997(2)
Chapter 22 Performance, Scalability, and Maintainability
999(20)
22.1 Chapter Overview
999(1)
22.2 Introduction
999(1)
22.3 Reducing Messaging Overhead
1000(11)
22.4 Optimizing Server Implementations
1011(2)
22.5 Federating Services
1013(1)
22.6 Improving Physical Design
1014(3)
22.7 Summary
1017(2)
Appendix A Source Code for the ICP Simulator 1019(12)
A.1 Overview 1019(1)
A.2 Transient Simulator Code 1019(7)
A.3 Persistent Simulator Code 1026(5)
Appendix B CORBA Resources 1031(4)
B.1 World Wide Web 1031(1)
B.2 Newsgroups 1032(1)
B.3 Mailing Lists 1032(1)
B.4 Magazines 1033(2)
Bibliography 1035(8)
Index 1043

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

For years, both of us have been (and still are) teaching CORBA programming with C++ to software engineers all over the world. One of the most frequently asked questions in our courses is, ''Where can I find a book that covers all this?'' Although many books have been written about CORBA, most of them focus on high-level concepts and do not address the needs of software engineers. Even though CORBA is conceptually simple, the devil lies in the detail. Or, more bluntly, books focusing on high-level concepts are of little use when you must find out why your program is dumping core. To be sure, there are resources available about CORBA, such as newsgroups, Web pages, and the Object Management Group (OMG) specifications. However, none of them really meets the needs of a programmer who must get the code to work (and preferably by yesterday). We wrote this book so that there would finally be a tutorial and reference that covers CORBA programming with C++ at the level of detail required for real-life software development. (And, of course, we wrote it so that we would have a good answer for our students.) Writing such a book is a tall order. Explaining the CORBA specification and APIs is one thing, and it's a necessary part of the book. However, knowing the various APIs will not, by itself, make you a competent programmer (only a knowledgeable one). To be competent, you need not only knowledge of the mechanics of the platform but also an understanding of how the different features interact. You must combine them effectively to end up with an application that performs and scales well and is maintainable, extensible, portable, and deployable. To help you become competent (as opposed to merely knowledgeable), we go beyond the basics in a number of ways. For one thing, we provide advice as to what we consider good (and bad) design, and we make no attempt to hide problems with CORBA (which, like any other complex software system, has its share of wrinkles). Second, we go beyond the APIs by explaining some of CORBA's internal mechanisms. Even though you can use an ORB without knowing what goes on under the hood, it is useful to understand these mechanisms because they have a profound influence on how well (or how poorly) an application will perform. Third, we devote considerable space to a discussion of the merits of various design decisions; typically, when a design provides a gain in one area it also involves a loss in another. Understanding these trade-offs is crucial to building successful applications. And fourth, where appropriate, we make recommendations so that you are not left without guidance. Inevitably, our approach required us to make value judgments, and, just as inevitably, a number of people will disagree with at least some of the recommendations we make. Whether you agree or disagree with us, you should still profit from our approach: if you agree, you can stick to the advice we give; if you disagree, the discussion will have at least encouraged you to think about the topic and form your own opinion. Either way, you are better off than you would be with a book that just dumps the facts on you without providing the deeper insight required to use them. Prerequisites This book is not a beginner's book, in the sense that we do not devote much space to explaining the structure of the OMG or the pecification adoption process. We also do not provide a high-level overview of the architectural goals of CORBA or all its services and facilities (see 31 for a high-level overview). Instead, we assume that you want to know how to write real CORBA applications with C++. Despite the lack of overview material, you should be able to follow the material even if you have never seen CORBA before. If you have experience in network programming or have used another RPC platform, you will find it easy to pick things up as you go. Much of this book consists of source code, so we expect you to

Rewards Program