(The Combat Logo)

CORBA Scripting with Tcl

Version 0.8.1

Table of Contents


Introduction


Combat is a CORBA Object Request Broker that allows the implementation of CORBA clients and servers in the Tcl programming language.

On the client side, Combat is not only useful to easily test-drive existing CORBA servers, including the ability for rapid prototyping or to interactively interface with servers from a console, but makes Tcl an exciting language for distributed programming. Also, Tk allows to quickly develop attractive user interfaces accessing CORBA services. Server-side scripting using [incr Tcl] classes also offers a wide range of possibilities.

Combat is compatible with the CORBA 3.0 specification including the IIOP protocol, and has been tested to interoperate with a wide range of open-source and commercial ORBs, including MICO, TAO and ORBexpress.

Combat is written in pure Tcl, allowing it to run on all platforms supported by Tcl, which is a much wider range than supported by any other ORB.

Combat applications can be trivially packaged as Starkits or Starpacks for cross-platform distribution.


Features


Combat has the following features:


Example


(Banking Client on Linux) (Banking Client on Windows)
CORBA Client running on Linux and Windows
Using the exact same 327 lines of source code.
Many CORBA tutorials use the "Banking" example: Assume that the bank is an object that allows you to open an account. An account is another object with methods to deposit, to withdraw, and to check your balance.

In CORBA, the interfaces of both objects are declared in the Interface Description Language (IDL). In this example, the IDL file would look like:

  interface Account {
    void deposit (unsigned long amount);
    void withdraw (unsigned long amount);
    long balance ();
  };

  interface Bank {
    Account create ();
  };
The contents of this IDL file is the "contract" between the client and the server. Now, assuming that a server that implements the Bank interface is running, and that its stringified object reference (also known as "IOR" -- the long string of hexadecimal digits) exists in the file Bank.ior in the current directory, a sample session in Tcl using Combat could look like this:
  set Bank [corba::string_to_object file://[pwd]/Bank.ior]
  set Account [$Bank create]
  $Account deposit 700
  $Account withdraw 450
  puts "Current balance is [$Account balance]."
  Current balance is 250.
You can find a more complete version of the Banking example in Combat's source code distribution. Or you can download the client and server applications for Windows (1500kB) or Linux/x86 (2200kB) (binary-only, built as Tcl Starpacks). For a cross-platform demonstration, start the server on one host and copy the "Bank.ior" file to the client's directory.


Download Combat


Combat

Documentation

idl2tcl For Windows

Combat's source code package above includes the "idl2tcl" application, which is used to process IDL files into type information that Combat can load into its Interface Repository.

"idl2tcl" requires an ORB that implements a CORBA Interface Repository and that provides an IDL compiler to load IDL files into that Interface Repository.

For convenience, you can download this binary package of idl2tcl that includes a ready-to-run idl2tcl executable for the Windows console and a pre-built version of MICO.

The output from idl2tcl is not platform-specific, so you can use this Windows build of idl2tcl even when developing for other platforms.

If you can not or do not want to use this Windows build of idl2tcl, you can use the idl2tcl application from the Combat distribution with a suitable natively-installed ORB. Both MICO and TAO are supported. Other ORBs may work but are untested.

Other Downloads


External Links



Reports of Projects using Combat


Unfortunately, there is little feedback on the usage of Open Source tools. Most feedback happens in case of issues, so getting little feedback indicates either little use or that it works flawlessly. With Combat, there is reason to suspect the latter. From my contacts, I know that Combat is in active use at companies such as JPL, NASA or Alcatel. Sometimes I also google for references to Combat (or its earlier incarnation, TclMico), getting surprisingly many hits. Here are some publically available references:

Please send an email if you or your company would like to be listed here.


History


Combat was born in 1998 as TclMico, a C++ package that tied into MICO's Dynamic Invocation Interface (DII), and later the Dynamic Skeleton Interface (DSI) to provide Tcl client- and server-side functionality.

When the DynamicAny interface was added to CORBA and obsoleted the use of MICO's proprietary features, TclMico was ported to other ORBs, which propmted the name change from TclMico to Combat in 2000.

However, with a matrix of ORBs, ORB versions, and platforms to support, maintenance of Combat proved difficult.

The idea of a pure-Tcl version of Combat was conceived early, but did take a while to implement. Combat version 0.7 was released in late 2001 as both "Combat/C++" and "Combat/Tcl" with near equivalent functionality.

Both versions received a few patches but proved very robust for a wide range of applications. But in "real life", while Combat/C++ may have been generally faster, Combat/Tcl proved much easier to work with, and soon development work concentrated on the Tcl version. Ultimately, I decided to retire Combat/C++. (For reference, here is Combat/C++ 0.7.3, the last version of Combat/C++.)

Version 0.8 took over the name "Combat" without the "/Tcl" qualifier.


Licensing


Combat is distributed under the terms of the BSD license (the same license that Tcl comes with).

Combat is distributed without any support or warranty for its fitness.


Powered by Tcl Uses Combat Powered by [incr Tcl]


(FPX Logo)

Frank Pilhofer, combat -AT- fpx.de