So how are ORB (Object Request Broker) method invocations different from RPCs (remote procedure calls)? The mechanisms are similar, but there are important differences. With an RPC, you call a specific function (the data is separate). In contrast, with an ORB, you're calling a method within a specific object. Different object classes may respond to the same method invocation differently through the magic of polymorphism. Each object manages its own private instance data, so a method invocation affects data on a per-instance basis.
ORB method invocations have scalpel-like precision--the call gets to a specific object that controls specific data, and that implements the function in its own class-specific
way. In contrast, RPC calls have no specificity. All the functions with the same name get implemented the same way. No differentiated service here. Of course, the ORB is often built on top of an RPC service, so you can end up paying a performance penalty for this extra level of service. (Note, though, that within a single address space, ORBs can dispatch methods almost as fast as C++ virtual function calls, so they can be useful for small objects as well as larger ones.) The ORB's overhead is worth every penny it costs if you're really exploiting the differentiation that distributed objects can offer. Otherwise you just bought yourself another layer of middleware, with all the costs and headaches that come with it.
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it
is
theoretical--and no language better exemplifies this than C++.
BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin,
and dozens of other CMP publications—bringing
you critical news and information about wireless communication,
computer security, software development, embedded systems,
and more!