Review:Advanced CORBA Programming with C++
Michi Henning doesn't know it, but he answered dozens of questions for me over the years through the archives of his hundreds of Usenet posts on dejanews. In fact, more often than not if I'm looking for information on CORBA I'll add his email address to the authors field and go straight to the authority.
With that in mind, I was quite anxious to see their book, and quite impatient when its date was pushed back a couple times. To say that these two are qualified to write on the subject is a huge understatement. Whether or not they could write a book of the magnitude that they attempted with a consistent level of accuracy and readability was another question.
Great Thud Value The first thing to know about this book is that it isn't for wimps. Which is to say that at ~1100 pages it will take a bit of effort to haul this puppy around. My laptop bag is going to be very happy to not be porting this tome around once this review is sent off to Hemos. This is one intimidating book to heft as you decide whether or not to buy your copy. For this reason, I suggest buying it through Amazon. By the time you lift it for the first time it will already be paid for and you can get on with the business of learning more about CORBA instead of wondering if you will ever get through it all. Style Lots of people have a word processor, but these two really lived up to my expectations for an accessable text. Their writing style is non-professorial and never talks down to the reader. It is clear they know their topic like a politician knows a contributor, but they also seem to still enjoy what they do. Many times reading advanced topic books it seems like the author is just waddling through in order to get publicity, a paycheck or a resume item. These guys write on the subject as if they are glad to be working with the stuff. So what's in it for me? The world of CORBA. Nothing less can tell you what the information in this book is. There is simply nothing else on it's level. Once you start sifting through this one, make sure to check out Steve Vinoski's and Michi Henning's web pages for pointers to even more information. Organization The book is partitioned into major topic areas with chapters within each. The title of the book announces the intention to focus on advances topics and, while a novice programmer would have trouble with it, a competent C++ programmer with any network experience would have little difficulty jumping in and starting with just this book. That said, it does get deep pretty quickly.
The entire book is very example heavy and the first part starts the trend with an introduction to CORBA. They walk through a simple application, presenting only the IDL and code needed to get it to compile and run. After reading this section you still feel like your in deep water then take a step back and get a more introductory book to work through first. Part I is probably sufficient to get experienced programmers up and running though.
Part II focuses on the programmers interface to CORBA, IDL and the C++ mapping. These chapters reveal the flavor of the rest of the book. Highly detailed, yet emminently readable. In particular their intermingling of the technical issues with occasional paragraphs about the workings of the standards committee and the motivations behind the design are quite elucidating. It's one thing to understand the standard, but understanding it's foundation, motivation and direction is very important to becoming one of the greats.
Part III covers the "under the hood" aspects of how CORBA communicates between applications. These chapters are insteresting, but rarely come up in normal programming. The only possible use that comes to mind is perhaps in difficult to diagnose problems between vendors. These chapter provide plenty of background and details to point fingers at the right folks.
Part IV is a look at dynamic CORBA. Dynamic CORBA allows compliant applications to assemble the structures needed to communicate with servers that were unavailable, undeveloped or not even thought of at the time the client was compiled. Like Part III this section is more useful to those with fairly specific needs.
Part V delves back into more commonly used aspects of CORBA, the services. Very few CORBA systems are implemented without the naming service and as the state of the art matures more are using trading and events also. These are all well covered, including a smattering of OMG politics.
Part VI looks superficially like a heavyweight section, but even though it is hidden in the back, it's a gold mine of information. Folks implementing there first systems of any scale should make certain to read this section to assure that they don't go down a path that is difficult to recover from later.
This book is worth the price of admission and then some.
You can pick this book up at Amazon.
Table of contents- 1) Introduction
- Part I Introduction to CORBA
- 2) An Overview of CORBA
- 3) A Minimal CORBA Application
- Part II Cora CORBA
- 4) The OMG Interface Definition Language
- 5) IDL for a Climate Control System
- 6) Basic IDL-to-C++ Mapping
- 7) Client-Side C++ Mapping
- 8) Developing a Client for the Climate Control System
- 9) Server-Side C++ Mapping
- 10) Developing a Server for the Climate Control System
- 11) The Portable Object Adapter
- 12) Object Life Cycle
- Part III CORBA Mechanisms
- 13) GIOP, IIOP, and IORs
- 14) Implementation Repositories and Binding
- Part IV Dynamic CORBA
- 15) C++ Mapping for Type any
- 16) Type Codes
- 17) Type DynAny
- Part V CORBA Services
- 18) The OMG Naming Service
- 19) The OMG Trading Service
- 20) The OMG Event Service
- Part VI Power CORBA
- 21) Multithreaded Applications
- 22) Performance, Scalability, and Maintainability
I don't know what gave you that impression. Writing CORBA in anything but an object-oriented programming langauge is an extremely difficult thing to do because the CORBA bindings for things like C try to emulate OOP.
C++ itself is a fine language. It's been proven that above about 50k lines of code, C++ is far more efficient to work in than C and simply easier to understand.
What really bugs me are the people who say C++ is complex because it features things like operator overloading. This always struck me as funny, just because a feature exists doesn't mean you have to use it.
And C++ is well accepted. BeOS uses it as it's primary application development language as does Windows. Until recently C++ was horrible to develop for under Unix because of the poor compiler support, but Egcs has changed that.
Now I don't want to start a language war, but really... is there any real reason why C++ is a bad language or is it because you simply don't understand it?
--
The world is neither black nor white nor good nor evil, only many shades of CowboyNeal.
When you pass a message to a program it can do any complex task you want. Only the app code will be more explicit (i.e. you will see that you are doing a network operation, rather than pretend that it's a function call).
A Web server is a simpler thing that exposes an interface to the network (http/XML) and various programs can communicate with it using messages that are readable by humans (to an extend).
Why not imbed an http interface into an app and use it along with XML for message formatting for communications.
Just the fact that you need IDL is wrong. IDL is completely backwards. You describe your interface in IDL, then compile it to generate code that describes the interface in your favorite language - the same information in two places. Shouldn't the interface be generated from your sources so that it exists in just one place?
What exactly do you use CORBA for in Berlin? D-n-D?
...richie - It is a good day to code.
Is there any good reason to use CORBA instead of simpler things, like http protocol and (let's say) XML?
XML is a static data format (yes, XSL adds some rather interesting "intelligent" transformation capabilities, but even so). Similarly, HTTP is a (relatively) simple (mostly) unidirectional data transfer protocol. I really don't understand how either can be compared to a distributed object model. Their uses, capabilities and so forth are entirely different.
The whole CORBA thing feels too complex for the simple tasks its trying to acomplished.
What simple tasks? CORBA is not primarily a standard for document interchange, it's a standard for allowing distributed objects to communicate to implement arbitrary functionalities (which may or may not have anything to do with documents, as such). Although, I wouldn't be very inclined to use it for most web stuff, if that's what you mean.
In any case, the uses to which CORBA is most successfuly put are certainly not simple -- take the Berlin project, for example. I really don't see how XML and HTTP would be suitable for implementing a desktop environment.
---
DNA just wants to be free...
For those of you who aren't fans of C++ but would like to learn CORBA, I still recommend purchasing this book. The explanation of features and architecture is simply splendid. A copy of this book and the chapter of the OMG CORBA spec corresponding to your preferred language will do wonders.
There are only two kinds of programming languages: those people always bitch about and those nobody uses.