Advanced CORBA Programming with C++

Free Download

Authors:

Series: Addison-Wesley professional computing series

ISBN: 9780201379273, 0-201-37927-9

Size: 5 MB (5000290 bytes)

Pages: 885/885

File format:

Language:

Publishing Year:

Category:

Michi Henning, Steve Vinoski9780201379273, 0-201-37927-9

Written for the experienced C++ developer facing real-world CORBA for the first time, Advanced CORBA Programming with C++ is a useful guide to today’s most popular standard for distributed computing.After a quick tour of CORBA basics, the authors jump right in with a minimum skeleton application written in C++. From there, they provide truly extensive coverage of CORBA IDL, along with many tips for using IDL data types in C++. (They cover advanced features such as any, TypeCode, and DynAny later in the book.).Next the book unveils its sample application – a distributed climate control system. Material on the Portable Object Adapter and the Object Life Cycle, including garbage collection strategies, rounds out this section. Additional chapters examine the details of Object Request Brokers (ORBs), including Internet Inter-ORB Protocol (IIOP), repositories, and binding. The authors also present CORBA’s built-in APIs for Naming, Trading, and Event Services (including asynchronous event handling), which is most useful as reference material.Final sections examine strategies for better scalability, including multithreading and optimizing network traffic for CORBA objects. The authors provide numerous short excerpts of C++ code, though it must be said that much of this book is reference material rather than a hands-on programming tutorial.

Table of contents :
Advanced CORBA® Programming with C++……Page 1
Review……Page 3
Dedication……Page 6
Table of Contents……Page 7
Preface……Page 13
Scope of this Book……Page 14
Acknowledgments……Page 16
1.1 Introduction……Page 18
1.2 Organization of the Book……Page 20
1.5 Source Code Examples……Page 21
1.7 Contacting the Authors……Page 22
Part I: Introduction to CORBA……Page 23
2.1 Introduction……Page 24
2.2 The Object Management Group……Page 25
2.3 Concepts and Terminology……Page 28
2.4 CORBA Features……Page 29
2.5 Request Invocation……Page 36
2.6 General CORBA Application Development……Page 44
2.7 Summary……Page 45
3.2 Writing and Compiling an IDL Definition……Page 47
3.3 Writing and Compiling a Server……Page 48
3.4 Writing and Compiling a Client……Page 53
3.5 Running Client and Server……Page 55
3.6 Summary……Page 56
Part II: Core CORBA……Page 57
4.2 Introduction……Page 58
4.3 Compilation……Page 59
4.4 Source Files……Page 62
4.5 Lexical Rules……Page 63
4.6 Basic IDL Types……Page 64
4.7 User-Defined Types……Page 68
4.8 Interfaces and Operations……Page 81
4.9 User Exceptions……Page 89
4.10 System Exceptions……Page 93
4.11 System Exceptions or User Exceptions?……Page 95
4.12 Oneway Operations……Page 96
4.13 Contexts……Page 97
4.14 Attributes……Page 98
4.15 Modules……Page 100
4.16 Forward Declarations……Page 101
4.17 Inheritance……Page 103
4.18 Names and Scoping……Page 110
4.19 Repository Identifiers and pragma Directives……Page 113
4.21 Recent IDL Extensions……Page 117
4.22 Summary……Page 121
5.2 The Climate Control System……Page 122
5.3 IDL for the Climate Control System……Page 124
5.4 The Complete Specification……Page 129
6.2 Introduction……Page 131
6.3 Mapping for Identifiers……Page 132
6.4 Mapping for Modules……Page 133
6.6 Mapping for Basic Types……Page 135
6.7 Mapping for Constants……Page 138
6.8 Mapping for Enumerated Types……Page 140
6.9 Variable-Length Types and _var Types……Page 141
6.10 The String_var Wrapper Class……Page 145
6.12 Mapping for Fixed-Point Types……Page 157
6.13 Mapping for Structures……Page 161
6.14 Mapping for Sequences……Page 166
6.15 Mapping for Arrays……Page 183
6.16 Mapping for Unions……Page 185
6.17 Mapping for Recursive Structures and Unions……Page 192
6.19 User-Defined Types and _var Classes……Page 193
6.20 Summary……Page 203
7.3 Mapping for Interfaces……Page 204
7.4 Object Reference Types……Page 206
7.5 Life Cycle of Object References……Page 207
7.6 Semantics of _ptr References……Page 213
7.7 Pseudo-Objects……Page 220
7.8 ORB Initialization……Page 221
7.9 Initial References……Page 223
7.10 Stringified References……Page 227
7.11 The Object Pseudo-Interface……Page 229
7.12 _var References……Page 236
7.13 Mapping for Operations and Attributes……Page 247
7.14 Parameter Passing Rules……Page 249
7.15 Mapping for Exceptions……Page 278
7.17 Summary……Page 291
8.3 Overall Client Structure……Page 293
8.4 Included Files……Page 294
8.5 Helper Functions……Page 295
8.6 The main Program……Page 299
8.7 The Complete Client Code……Page 306
8.8 Summary……Page 310
9.2 Introduction……Page 313
9.3 Mapping for Interfaces……Page 314
9.4 Servant Classes……Page 316
9.5 Object Incarnation……Page 317
9.6 Server main……Page 318
9.7 Parameter Passing Rules……Page 320
9.8 Raising Exceptions……Page 336
9.9 Tie Classes……Page 341
9.10 Summary……Page 345
10.3 The Instrument Control Protocol API……Page 347
10.4 Designing the Thermometer Servant Class……Page 350
10.5 Implementing the Thermometer Servant Class……Page 352
10.6 Designing the Thermostat Servant Class……Page 355
10.7 Implementing the Thermostat Servant Class……Page 357
10.8 Designing the Controller Servant Class……Page 360
10.9 Implementing the Controller Servant Class……Page 362
10.10 Implementing the Server main Function……Page 366
10.11 The Complete Server Code……Page 368
10.12 Summary……Page 378
11.3 POA Fundamentals……Page 379
11.4 POA Policies……Page 382
11.5 POA Creation……Page 393
11.6 Servant IDL Type……Page 397
11.7 Object Creation and Activation……Page 400
11.8 Reference, ObjectId, and Servant……Page 436
11.9 Object Deactivation……Page 438
11.10 Request Flow Control……Page 440
11.11 ORB Event Handling……Page 445
11.12 POA Activation……Page 451
11.13 POA Destruction……Page 457
11.14 Applying POA Policies……Page 458
11.15 Summary……Page 466
12.2 Introduction……Page 468
12.3 Object Factories……Page 469
12.4 Destroying, Copying, and Moving Objects……Page 480
12.5 A Critique of the Life Cycle Service……Page 494
12.6 The Evictor Pattern……Page 499
12.7 Garbage Collection of Servants……Page 515
12.8 Garbage Collection of CORBA Objects……Page 523
12.9 Summary……Page 526
Part III: CORBA Mechanisms……Page 527
13.2 An Overview of GIOP……Page 528
13.3 Common Data Representation……Page 530
13.4 GIOP Message Formats……Page 533
13.5 GIOP Connection Management……Page 541
13.6 Detecting Disorderly Shutdown……Page 542
13.7 An Overview of IIOP……Page 543
13.8 Structure of an IOR……Page 545
13.9 Bidirectional IIOP……Page 547
13.10 Summary……Page 548
14.3 Direct Binding……Page 549
14.4 Indirect Binding via an Implementation Repository……Page 553
14.5 Migration, Reliability, Performance, and Scalability……Page 563
14.6 Activation Modes……Page 566
14.7 Race Conditions……Page 567
14.8 Security Considerations……Page 569
14.9 Summary……Page 572
Part VI: Dynamic CORBA……Page 574
15.2 Introduction……Page 575
15.3 Type any C++ Mapping……Page 578
15.4 Pitfalls in Type Definitions……Page 598
15.5 Summary……Page 599
16.3 The TypeCode Pseudo-Object……Page 600
16.4 C++ Mapping for the TypeCode Pseudo-Object……Page 609
16.5 Type Code Comparisons……Page 620
16.6 Type Code Constants……Page 626
16.7 Type Code Comparison for Type any……Page 629
16.8 Creating Type Codes Dynamically……Page 630
16.9 Summary……Page 638
17.2 Introduction……Page 639
17.3 The DynAny Interface……Page 640
17.4 C++ Mapping for DynAny……Page 653
17.5 Using DynAny for Generic Display……Page 663
17.6 Obtaining Type Information……Page 665
17.7 Summary……Page 667
18.3 Basic Concepts……Page 668
18.4 Structure of the Naming Service IDL……Page 670
18.5 Semantics of Names……Page 671
18.6 Naming Context IDL……Page 675
18.7 Iterators……Page 691
18.8 Pitfalls in the Naming Service……Page 699
18.10 Naming Service Tools……Page 700
18.11 What to Advertise……Page 701
18.13 Federated Naming……Page 702
18.14 Adding Naming to the Climate Control System……Page 706
18.15 Summary……Page 712
19.3 Trading Concepts and Terminology……Page 713
19.5 The Service Type Repository……Page 719
19.6 The Trader Interfaces……Page 735
19.7 Exporting Service Offers……Page 740
19.8 Withdrawing Service Offers……Page 746
19.9 Modifying Service Offers……Page 747
19.10 The Trader Constraint Language……Page 748
19.11 Importing Service Offers……Page 752
19.12 Bulk Withdrawal……Page 766
19.13 The Admin Interface……Page 767
19.14 Inspecting Service Offers……Page 769
19.15 Exporting Dynamic Properties……Page 770
19.16 Trader Federation……Page 773
19.18 Architectural Considerations……Page 784
19.19 What to Advertise……Page 786
19.20 Avoiding Duplicate Service Offers……Page 787
19.21 Adding Trading to the Climate Control System……Page 788
19.22 Summary……Page 792
20.3 Distributed Callbacks……Page 793
20.4 Event Service Basics……Page 799
20.5 Event Service Interfaces……Page 803
20.6 Implementing Consumers and Suppliers……Page 810
20.7 Choosing an Event Model……Page 821
20.8 Event Service Limitations……Page 823
20.9 Summary……Page 825
21.3 Motivation for Multithreaded Programs……Page 827
21.4 Fundamentals of Multithreaded Servers……Page 831
21.5 Multithreading Strategies……Page 837
21.6 Implementing a Multithreaded Server……Page 838
21.7 Servant Activators and the Evictor Pattern……Page 851
21.8 Summary……Page 852
22.3 Reducing Messaging Overhead……Page 853
22.4 Optimizing Server Implementations……Page 862
22.5 Federating Services……Page 864
22.6 Improving Physical Design……Page 865
22.7 Summary……Page 868
Appendix A. Source Code for the ICP Simulator……Page 869
Appendix B. CORBA Resources……Page 877
Bibliography……Page 880

Reviews

There are no reviews yet.

Be the first to review “Advanced CORBA Programming with C++”
Shopping Cart
Scroll to Top