source: main/trunk/greenstone2/runtime-src/src/corba/README@ 25232

Last change on this file since 25232 was 25232, checked in by ak19, 12 years ago

Adding a README file for the corba part of runtime-src so that corba-related work may be easier to figure out in future based on current experience in working with it.

File size: 8.9 KB
Line 
116 March 2011
2ak19
3
4----------------------------------------------------------------------------------------------------------------------------
5 Contents of this README file
6----------------------------------------------------------------------------------------------------------------------------
7
81. How to compile up Corba, including generating the helper files from the *.idl interface source file (corbaiface.idl):
92. How to run the corbaserver and the corbarecptldd (the client) against it
103. How to view the "IOR" value in the objid/ref file in a human-readable format
114. Suggestions for future testing
125. About Greenstone 2's java-client
13
14
15
16----------------------------------------------------------------------------------------------------------------------------
17 General information
18----------------------------------------------------------------------------------------------------------------------------
19
20This is the README that goes with the Greenstone Corba code, especially with the updates that have been made to it at this time.
21
22Many changes have been made to different parts of the corba code since we had to change over Mico's implementation of corba from version 2.3.5 to 2.3.13. Even Mico-2.3.13 required modifications to get it to compile as well as to compile with new versions of gcc (version 4.6.* as opposed to just 4.4.*).
23
24Further, in order to bring the corba code up-to-speed with the equivalent changes that had already been made to the rest of Greenstone runtime-src code, the corbaiface.idl file has been updated with new data structures and member variables to existing ones. Corresponding (de)serialisation functions and updates to processing code have been made to corbatext_t.h and *.mpp and corbaproto.mpp.
25
26With these changes, corba now compiles again at last (tested on Linux CentOS 64 bit machine), and when the "corbaserver" is run against the client "corbarecptldd" locally (on the same machine), things still work.
27The remote case is not working at present. However, we can't get the remote case to work for the hello-1 demo example found in Mico either, though that similarly works locally.
28Suggestions for future testing in this area are at the bottom.
29
30
31----------------------------------------------------------------------------------------------------------------------------
32 How to compile up Corba, including generating the helper files from the *.idl interface source file (corbaiface.idl):
33----------------------------------------------------------------------------------------------------------------------------
34
351. The helper files are now generated by a new target in the runtime-src/src/corba/Makefile.in which is dependent on the corbaiface.h and corbaiface.mpp files: if corbaiface.h is modified or corbaiface.mpp is missing, the IDL executable will be run over corbaiface.idl.
36
37You can touch the corba/corbaiface.idl (or else delete corbaiface.mpp, but not corbaiface.h!) and then run "make" again to re-run IDL and re-generate the necessary files.
38
392. Assuming the corbaiface.idl related files are up-to-date, as is the case when checking out from SVN at the time of writing, compilation of corba code will occur if greenstone is configured with the --enable-corba flag, followed by make and make install as usual.
40
41For example:
42
43greenstone2> ./configure --enable-apache-httpd --enable-corba --disable-wvware
44(wvware generally to be disabled when compiling on 64 bit linux)
45
46greenstone2> make
47
48greenstone2> make install
49
50Running "make install" copies the executables corbaserver and corbarecptldd (the client) into cgi-bin\linux
51
523. If you want to run Greenstone Mico's IDL executable over another *.idl file at any stage, you will need to set the PATH and LD_LIBRARY_PATH to contain the necessary locations to Greenstone's Mico first:
53
54> export PATH=/my/greenstone2/runtime-src/packages/mico/bin:$PATH
55> export LD_LIBRARY_PATH=/my/greenstone2/runtime-src/packages/mico/lib:$LD_LIBRARY_PATH
56
57Now you can run Mico's IDL over your *.idl interface file as follows:
58> idl <idl-options> <file.idl>
59
60
61
62----------------------------------------------------------------------------------------------------------------------------
63 How to run the corbaserver and the corbarecptldd (the client) against it
64----------------------------------------------------------------------------------------------------------------------------
65
661. Your Greenstone's CORBA should have been compiled up as explained above.
67
682. Open 2 x-terms. In both, you need set the LD_LIBRARY_PATH to Greenstone Mico's lib:
69> export LD_LIBRARY_PATH=/my/greenstone2/runtime-src/packages/mico/lib:$LD_LIBRARY_PATH
70
713. In the first x-term, run the server:
72
73/my/greenstone2>export LD_LIBRARY_PATH=/my/greenstone2/runtime-src/packages/mico/lib:$LD_LIBRARY_PATH
74/my/greenstone2>cd cgi-bin/linux
75/my/greenstone2/cgi-bin/linux>./corbaserver
76
77The server will now be listening. It will print out some stuff to the screen, but it will also have generated a file in /tmp called "localcorba.objid" containing the IOR value that clients need to use to connect to it.
78Greenstone does not at present make use of a NameService to resolve "where" the server is so that clients can know how to connect to them. Instead, the *.objid (or *.ref) file is shared about between client and server. The client uses the IOR value in this file to locate and communicate with the server.
79In Greenstone, the client program (corbarecptldd) EXPECTS the file to be in /tmp and to have the extension *.objid. The only thing it still requires is the name of the file, which is "localcorba" by default.
80Therefore:
81
824. In the second x-term, run the client corbarecptldd with this filename as parameter:
83/my/greenstone2> export LD_LIBRARY_PATH=/my/greenstone2/runtime-src/packages/mico/lib:$LD_LIBRARY_PATH
84/my/greenstone2> cd cgi-bin/linux
85/my/greenstone2/cgi-bin/linux>./corbarecptldd localcorba
86
87(Note: Do not give /tmp/localcorba.objid as parameter. No location or suffix is to be provided, and no other location or suffix will be accepted.)
88
89The client will print some headers and expect you to press Enter, after which it will print more HTML and then terminate.
90In the server's x-term, you will notice that it has processed the incoming request from the client's end by printing more stuff to the screen.
91
925. To quit the server, send Ctrl-C to the x-term wherein the server is run.
93
94
95
96----------------------------------------------------------------------------------------------------------------------------
97 How to view the "IOR" value in the objid/ref file in a human-readable format
98----------------------------------------------------------------------------------------------------------------------------
99
1001. Get opalOrb from http://sourceforge.net/projects/opalorb/files/
101
1022. Its Util/catior.pl file, when run over a file containing the IOR value, will print the contents in a human-readable format.
103
104The catior.pl script is explained at http://opalorb.sourceforge.net/Util/catior.pl.html
105
106Usage:
107~/Desktop> opalOrb/Util/catior.pl <IOR ref file>
108
109Example:
110~/Desktop> opalOrb/Util/catior.pl /tmp/localcorba.objid
111
112
113
114----------------------------------------------------------------------------------------------------------------------------
115 Suggestions for future testing
116----------------------------------------------------------------------------------------------------------------------------
117
118One idea is to try out another example found at http://www.mario-konrad.ch/wiki/doku.php?id=programming:corba:connect_orbs
119which makes use of a NameServer and which may work when client and server run remote from each other.
120
121I was unable to test this, since the example code at the link didn't compile (after commenting out the need for omniORB and restricting code to Mico). The compilation process failed looking for a file Cos*, which was not in the Mico 2.3.13 installation. Perhaps the example work with an older version of Mico like 2.3.5.
122
123
124
125----------------------------------------------------------------------------------------------------------------------------
126 About Greenstone 2's java-client
127----------------------------------------------------------------------------------------------------------------------------
128
1291. The gs2-java-client can be obtained from Greenstone's SVN repository. It's README file is http://trac.greenstone.org/browser/other-projects/gs2-java-client/trunk/README
130
1312. It will not work at present, its code not having been updated to work with the changes mentioned at the start of this file.
132The first thing that will need to change is its outdated *.idl. This needs to be replaced with an replica of Greenstone 2's runtime-src/src/corba/corbaiface.idl
133
1343. Having updated the corbaiface.idl file in the java-client, the (de)serialisation code for the member variables in this must be brought up to speed, just as Greenstone's corbaproto.mpp file was changed. Refer to this file (runtime-src/src/corba/corbaproto.mpp and possible corbatext_t.h and corbatext_t.mpp for ideas on the changes that need to be made.)
135
136A ticket has been added to the Greenstone SVN about how the gs2-java-client needs to be updated.
137
138
139
Note: See TracBrowser for help on using the repository browser.