FILM: the NDB CORBA Server (release 20030908) C++ client README This is a sample NDB CORBA client expressed in C++. Since CORBA is language-independent, it can be written in any language for which CORBA bindings exist, notably C++, Python, or Java. Currently, we support two open-source C++ implementations of CORBA, MICO and omniORB. We support two versions of GCC, 2.95.3 and 3.3. For omniORB, the client also runs on a broken old Red Hat gcc 2.96, but we don't recommend it, and it is unsupported by MICO. This package consists of the following files: -- README this file -- some.idl CORBA IDL specification for MacroMolecular Structure, as implemented by the NDB CORBA server -- idl2C/- This directory contains a sample result of IDL-to-C++ run on our IDL. You don't need it and should be able to recreate it with your own ORB's IDL-to-C++ compiler -- .h and .C sources for the ORB-independent C++ client and ORB-specific wrappers Here's how to install and run the client: -- Get the omniORB or MICO MICO: www.mico.org We tested with version 2.3.10. Standard install. Then, in your home directory, create the file ~/.micorc: -ORBNamingAddr inet:pdb-bioshark-7.rutgers.edu:2809 omniORB: www.omniorb-support.com We tested with version is 4.0.2. You need to enable all of the Corba Services by editing the file omniORB-4.0.2 omniORB-4.0.2/src/services/mklib/libdefs.mk as follows: replace # All the interfaces: #COS_INTERFACES = $(COS_ALL_INT) # Or just the Notification interfaces: COS_INTERFACES = $(TIMEBASE_INT) $(COS_EVT_INT) $(COS_NFY_INT) $(COS_LCB_INT) by # All the interfaces: COS_INTERFACES = $(COS_ALL_INT) # Or just the Notification interfaces: #COS_INTERFACES = $(TIMEBASE_INT) $(COS_EVT_INT) $(COS_NFY_INT) $(COS_LCB_INT) Copy the config file to /etc/omniORB.cfg there, edit/uncomment the following: InitRef = NameService=corbaname::pdb-bioshark-7.rutgers.edu giopMaxMsgSize = 2097152 # 2 MBytes The first line is where the server is, the second increases the maximum CORBA package size so we can send a really large molecule, such as a ribosome. -- Create the C++ client directory and Unpack the client tarball there. We use ~/cs/some, and following it will require less changes in make files: mkdir ~/cs/some cd !$ tar zxf /path/to/film.client.C++-.tar.gz -- Build and install Brad Appleton's Options Used to easily parse command line arguments in C++. mkdir ~/net cd !$ wget http://www.cmcrossroads.com/bradapp/ftp/src/libs/C++/Options.tar.gz mkdir -p ~/src/Options cd !$ tar zxf ~/net/Options.tar.gz patch -p1 ~/net/film.client.C++-20030908.tar.gz make su # they go into /usr/local by default make install -- Build the client Edit the make files to set the specified variables in their respective files as shown, or according to your local conventions: mk/Extern.mk: LIB_CXX = /usr/local LIB_CXX_INCLUDE = -I$(LIB_CXX)/include LIB_CXX_CCV = $(LIB_CXX)/lib mk/CC.gcc.mk: GCC_DIR = /usr mk/Orb.mk: ORB_BASE = /usr/local Makefile: #SUBDIRS = $(BIOLGEN_DIR) -- comment out make mkdirs make main client -- Run the client! bin/main -i If you cannot edit ~/.micorc or /etc/omniORB.cfg, you can repoint it to another Naming Service with the following options: MICO: -ORBNamingAddr inet:hostname.com:port omniORB: -ORBInitRef NameService=corbaname::hostname.com:port (If the port is 2809, it can be omitted for omniORB.) FEEDBACK -------- Send all questions, patches, improvements and suggestions for the client to: Dr. John Westbrook Alexy Khrabrov -- $Id$