{Notes to self, programming, technology, linux, windows, git} U {Papers, reviews, games, coffee, tabletennis, ramblings} = {things worth saving}

Monday, March 16, 2009

On CORBA : ORB Comparison - Orbix vs TAO

Introduction

This post describes installation, configuration guides for the CORBA ORBs IONA ORBIX Java ORB and PrismTech OpenFusion TAO C++ ORB. Test-programs using the client/server paradigm have been implemented for each ORB where a client calls a method on a servant 1000 times. In each case the duration of these calls were timed and the results are concluded upon at the end. Test-implementation of Java IDL as well as MiddCor C# ORB were used for comparison with no guides provided.

ORBIX Java ORB

Features

  • Interoperable CORBA Naming Service and load balancing extensions
  • CORBA 2.6-compliant (w. early support of CORBA 3.0 features)
  • Bidirectional GIOP for server callbacks
  • CORBA Reflection and dynamic type support


Installation and configuration

The installation and configuration procedure for the ORBIX Java Orb includes the following two steps:

  1. Installation of the ORB and services (optional) via the supplied GUI.
  2. Configuration of a domain which includes setting up ports, load balancing etc.
Before you start, you will need to download the ORB itself from IONA (http://www.iona.com) (registration is required), as well as request a license-key, which will be sent by email immediately.

  1. Go to IONA and create an account.
  2. Go to downloads and select ”Standard Orb”.
  3. Accept Terms. In the right column titled ”Obtain License” select ”Get your license”, new window will open, close it after mail has been sent.
  4. Select OS of choice from ”Download kit” column. Save the ORB!
  5. Unzip content to folder of choice.

A short and precise step-by-step installation and configuration guide can be found at IONA (http://www.iona.com/support/docs/orbix/6.3/install guide/index.htm). Installation is completed by following the steps in the sections ”Launching the installer” and ”Installing with the GUI”. Configuration is completed by following the steps in the section ”Configuring your environment”.

Example use

After installing and configuring your environment, the installer will have generated a script that sets up necessary environment variables. This script is located in /IONA/etc/bin and named _env.bat.

If you chose it during the installation, the installer also generated a script in the same directory that allows you to start selected services through a script. ORBIX includes some useful utilities for generating code that, by hand, can be tedious and error-prone. The utility idlgen uses what IONA calls ”genies”, and will from an IDL file, generate client/server skeletons as well as an ant-build file used by IONAs own ant utility : itant.

By running the idlgen command: idlgen java poa genie.tcl -all -jP my_package hello.idl. The -all parameter will ensure that idlgen generates server/client/ant-buildscript. No stubs have been generated for the IDL just yet. This is done by running itant build_all in the base-dir where you ran idlgen. This will call the idl enterpreter and generate stubs and also modify the build-script to include tasks that will start both server and client.

This example use is simplified, and through the idlgen command it is possible to configure the generated code to support certain POA policies, use of naming server, among other things.

Running the test code

  1. Extract the file orbix test.zip somewhere.
  2. In a command prompt, execute the environment script generated by the ORBIX installerfor your domain.
  3. In a command prompt, traverse to the extraction dir and type itant build all. Then type itant runserver.
  4. In a new command prompt, traverse to the extraction dir and type itant runclient.



OpenFusion TAO ORB

Orb installation

Sign up for an account at PrismTech (http://www.prismtech.com) before proceeding. This is necessary in order to download the Orb. When this is done follow these steps in order to install the orb successfully:

  1. Download the OpenFusion TAO orb for the windows XP platform.
  2. Unzip the orb files in a directory of your choice, eg. C:\Orbs\TAO.
  3. In order for the orb to operate correctly three environment variables must be set. First enter the environment variables configuration by right clicking ”My Computer” and selecting properties. Then switch to the ”Advanced” tab and select ”Environment variables”.
  4. Create a new variable called ACE ROOT and set the value to the install dir of the orb, in this case C:\Orbs\TAO
  5. Create another variable called TAO ROOT and set the value to the install dir of the orb, also C:\Orbs\TAO
  6. The last variable is called TAO IDL and this must point to the tao idl.exe file in the bin directory of the orb installation, in this case C:\Orbs\TAO\bin\tao idl.exe
  7. Lastly expand the PATH variable to include the bin and the lib directory of orb installation. The path would then look like this: ;C:\Orbs\TAO\bin;C:\Orbs\TAO\lib
The orbs should now be installed and be ready for use in any VC++ 6.0 solution. Note that the above installation guide assumes the target OS is a Windows OS. If this however is not the case, refer to the accompanying orb documentation.

Issues

It is important to know that this release of the OpenFusion TAO orb only supports Microsoft Visual Studio C++ 6.0. It was not possible to get it working under the newer release Visual Studio 2005. The reason for this is probably that the compilers from these two release are somewhat different. Since the release of Visual Studio 6.0 .Net framework support has been added to the compilers and this might have some effect when linking with the orb libraries. It was also not possible to get a debug version running with the TAO orb, since the release we were able to acquire only contained the release libraries and not the debug libraries.

Running the test code

The supplied test code performs a simple test. It transmits a short string from a client to a server and then back again 1000 times and calculates the amount of time this took. It is primarily to determine if the orb is working and if it is, how fast it is to get some comparison data. The following steps will explain how to perform the test. Beware that the supplied code will only work if compiled with the VC++ 6.0 compiler.

  1. Open the solution file in VC++ 6.0 and compile a release version of the server and the client.
  2. Open a command prompt and navigate to where the server executable is located and type in ”server -o registry.ior”.
  3. Open another command prompt and navigate to where the client executable is located and type in ”client -f registry.ior”.
  4. The test runs and the client prints out how long it took to perform the 1000 calls.
  5. Terminate the server.


Conclusions

The clients send and receive simple and the tests were executed 7 times and a mean value of the resulting execution times was found.

MiddCor : 319.7 ms
ORBIX : 553.8 ms
JAVA IDL : 1583.8 ms
TAO: 348.6ms

In the cases of the Java based ORBs, the first executions of the test resulted in high execution times possibly due to something VM related. In the cases of the C++ and C# based ORBs, execution times were somewhat steady through all executions

No comments:

Followers