[Explain CORBA.]
Acronym for Common Object Request Broker Architecture.
Links to the OMG's CORBA FAQ [L1 ] and to some more technical information [L2 ].
The basic idea of CORBA is that you have objects whose interfaces are described in IDL, the Interface Definition Language. This looks similar to a C++, Java or even incr Tcl class declaration, e.g.
interface Toaster { exception Fire {}; readonly attribute long crumbs; void toast (in long nslices) raises (Fire); void clean (); };
Objects are addressed by object references, which encapsulate information like host name and port number. Once you have an object reference, you can invoke methods on the object; in Tcl, using Combat, this looks like
set toaster [corba::string_to_object $reference] $toaster toast 10 $toaster clean
The ORB (Object Request Broker) interprets these object references, locates the implementation, packages the parameters, and does all the communication. Remote invocations happen very transparently this way.
Because of standard protocols (IIOP), all CORBA-based programs can interoperate smoothly, no matter the vendor or language. There are official language mappings for C, C++, Java, Ada, Smalltalk, Lisp, COBOL, Python and IDLScript. Unofficial mappings exist for Tcl, Perl, PHP and many others.
Many projects binding Tcl to CORBA have been done [L3 ]. Much the most polished of these is Frank Pilhofer's Combat. Frank's thinking of writing his own IDL parser.
Although Tcl has a modest standing in the CORBA community, despite Frank's valiant efforts, it's a key technology for market leader IONA Technologies, especially in CGT.
HD: My project connects Tcl to CORBA indirectly using TclBlend. There are various pros and cons to doing this. More info at the Ninth Annual Tcl/Tk Conference.
Simplifying drastically, you need to do:
package require java set props [java::call System getProperties] # This assumes you are using inprise orb $props put "org.omg.CORBA.ORBClass" "com.inprise.vbroker.orb.ORB" $props put "org.omg.CORBA.ORBSingletonClass" \ "com.inprise.vbroker.orb.ORB" set orb [java::call org.omg.CORBA.ORB init \ [java::new {String[]} 0] $props] # Create an object reference set ref [$orb string_to_object $IOR] # Cast the reference to the desired type. set objRef [java::call $helperClass narrow $ref]
You can now invoke operations on $objRef.
Combat offers a pure-tcl CORBA package at http://www.fpx.de/Combat/
[ TclDII, Torb [L4 ], TclIop ]
[ http://www.primaryinterface.com/ ? ] escargo 18 Nov 2005 - There's no there there, and the Wayback machine can't seem to find much either. Just goes to show how badly Javascript-based sites degrade over time.
"The Rise and Fall of Corba" [L5 ]
Despite all the doomsayers and the continuing chase for the next "best" technology, CORBA is still very much alive and kicking, even if it does not always grip headlines. See, for example, this presentation [L6 ] by OCI. It may not be a one size fits all solution, it may not be sexy, it may have a steep learning curve, and some of its tools may suck (Tcl-based tools excluded, of course), but it is certaily mature, stable, reliable, heterogeneous, and fast, in the hands of capable engineers.