SKIP THE SHIPPING
Use code NOSHIP during checkout to save 40% on eligible eBooks, now through January 5. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Here is the CORBA book that every C++ software engineer has been waiting for. Advanced CORBA® Programming with C++ provides designers and developers with the tools required to understand CORBA technology at the architectural, design, and source 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 industrial-strength 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 as potential 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.
Other highlights
Click below for Sample Chapter(s) related to this title:
Sample Chapter
6
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.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.