Issue 1669: Narrow Interop (interop) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: Narrowing is used in CORBA to check if an object reference obtained by a client is of the desired type, ie. supports a specific IDL interface that the client wants to use. The client program has static information about the interface it wants to use from the IDL specification. However, this is not enough as it must also be possible to invoke remote objects that support an IDL interface derived from the interface the client knows of. There are at least 4 possiblities how the type checking can be resolved (+ combinations of them): (i) Narrow makes a query to an interface repository. (ii) Narrow makes a call to the remote object. (iii) The object reference contains enough information, e.g. the whole interface type hierarchy that the remote object supports. (iv) There is no narrow; the type check is made when a request is received by the server-side ORB. Resolution: Revised Text: Actions taken: July 13, 1998: received issue February 17, 1999: closed issue Discussion: End of Annotations:===== ]Return-Path: From: hans.kneubuehl@ubs.com X-OpenMail-Hops: 2 Date: Sat, 11 Jul 1998 11:45:26 +0200 Subject: narrow interop TO: orb_revision@omg.org, interop@omg.org CC: juerg.wanner@ubs.com Narrowing is used in CORBA to check if an object reference obtained by a client is of the desired type, ie. supports a specific IDL interface that the client wants to use. The client program has static information about the interface it wants to use from the IDL specification. However, this is not enough as it must also be possible to invoke remote objects that support an IDL interface derived from the interface the client knows of. There are at least 4 possiblities how the type checking can be resolved (+ combinations of them): (i) Narrow makes a query to an interface repository. (ii) Narrow makes a call to the remote object. (iii) The object reference contains enough information, e.g. the whole interface type hierarchy that the remote object supports. (iv) There is no narrow; the type check is made when a request is received by the server-side ORB. ORB-interoperability -------------------------- A straight forward ORB-interoperability archicture is that different ORB domains interoperate via IIOP, each ORB domain has its own interface respository. Narrowing-interoperability could best be achieved by the possibility (ii). However, this requires that the narrow call is standardized as part of the GIOP/IIOP protocol which is currently not the case. Currently, there is no narrowing-interoperability between ORBs of different vendors, to my knowledge. Language mappings --------------------------- Narrowing calls should also be defined for non strong-typed languages. The narrow call offers a possibly remote type check to ensure that the target object supports the desired interface. The client might have to do a lot of computations before it invokes a target remote object. Therefore, in a clean architecture, the client must have the possibility to type check the object reference before it undertakes these computations. However, the current IDL to C and IDL to Smalltalk mappings don't include narrow calls. Regards Hans Return-Path: Sender: jon@floorboard.com Date: Sat, 11 Jul 1998 08:17:15 -0700 From: Jonathan Biggar To: hans.kneubuehl@ubs.com CC: orb_revision@omg.org, interop@omg.org, juerg.wanner@ubs.com Subject: Re: narrow interop References: hans.kneubuehl@ubs.com wrote: > > Narrowing is used in CORBA to check if an object reference obtained > by > a client is of the desired type, ie. supports a specific IDL > interface > that the client wants to use. > > The client program has static information about the interface it > wants > to use from the IDL specification. However, this is not enough as it > must also be possible to invoke remote objects that support an IDL > interface derived from the interface the client knows of. > > There are at least 4 possiblities how the type checking can be > resolved > (+ combinations of them): > > (i) Narrow makes a query to an interface repository. > (ii) Narrow makes a call to the remote object. > (iii) The object reference contains enough information, e.g. the > whole > interface type hierarchy that the remote object supports. > (iv) There is no narrow; the type check is made when a request is > received by the server-side ORB. > > ORB-interoperability > -------------------------- > A straight forward ORB-interoperability archicture is that different > ORB domains interoperate via IIOP, each ORB domain has its own > interface respository. Narrowing-interoperability could best be > achieved by the possibility (ii). However, this requires that the > narrow call is standardized as part of the GIOP/IIOP protocol which > is > currently not the case. Yes, there is a call to support narrowing: the is_a operation. This operation tells you whether the object is derived from a given interface, which is the essense of the narrowing operaiton. > Currently, there is no narrowing-interoperability between ORBs of > different vendors, to my knowledge. It is true that there are ORB versions out there that don't properly use is_a to perform narrowing. This is a bug in those implementations, not an interoperability problem. > Language mappings > --------------------------- > Narrowing calls should also be defined for non strong-typed > languages. > The narrow call offers a possibly remote type check to ensure that > the > target object supports the desired interface. The client might have > to > do a lot of computations before it invokes a target remote object. > Therefore, in a clean architecture, the client must have the > possibility to type check the object reference before it undertakes > these computations. However, the current IDL to C and IDL to > Smalltalk > mappings don't include narrow calls. Applications that desire a stronger check in these languages can call is_a directly. -- Jon Biggar Floorboard Software jon@floorboard.com jon@biggar.org Return-Path: Date: Sat, 11 Jul 1998 09:15:50 -0700 From: David Brownell To: hans.kneubuehl@ubs.com CC: orb_revision@omg.org, interop@omg.org, juerg.wanner@ubs.com Subject: Re: narrow interop References: hans.kneubuehl@ubs.com wrote: > > Narrowing-interoperability could best be > achieved by the possibility (ii). However, this requires that the > narrow call is standardized as part of the GIOP/IIOP protocol which > is > currently not the case. Hmm, it was there in GIOP 1.0 for this reason: "_is_a" is a method name built in to all GIOP protocol implementations, and of course the analagous "_interface" returns the InterfaceDef which can be used to implement "_is_a" more expensively. A usual, modulo bugs! - Dave