Strategies for Elimination of Virtual Functions

After spending a bit of time looking over the IIOP 1.4 code again, I've settled on the following strategies to eliminate unnecessary virtual functions from the code.

Eliminate COM support.

After conversations with David Brownell, it appears that COM support was added as an exercise for him and as a vehicle for understanding how a CORBA/COM bridge might work. This exercise led to SunSoft's eventual proposal for the interoperability of the two.

Since we don't need this interoperability, elimination of this can only help us.

Specifically, inheritance from IUnknown, calls to QueryInterface(), and the like will be removed.

A challenge here is that the IUnknown interface specifies methods for reference counting objects. These will have to be duplicated. Fortunately, we have pre-COM-ified code available, which shows that

all use reference counting to one degree or another.

We still must support some sort of reference counting semantics, though perhaps doing it through an inherited interface is not best for our purposes. Rather than use AddRef and Release ala COM, I have chosen to use hold and release.

Upon removal of IUnknown, the following cropped up:

Eliminate STUB_Object.

In our original distribution, STUB_Object did not exist, and IIOP_Object existed as _ObjectRef. STUB_Object was added in order to support the integration of multiple IIOP-like protocols. But, we don't need that (we're interested in performance, remember?), so we'll merge the two and worry about extensability later. I doubt this will be a problem since RIOP is a transparent extension to IIOP.


Chris Cleeland
Last modified: Wed Mar 19 15:44:32 CST