Mailing List Archive

CORBA IDL AND SCRIPTS
Hi All,
Hi. I was looking for someone to speak to regarding a few questions
that I had about IDL. I would be glad if someone can aswer my
question:

a) Given that we are moving towards CORBA, we would like to specify all
our interfaces ( all of them not
necessarily pertaining to client/server) in IDL. i.e., the
interfaces we specify must be capable of being used
by CORBA (which is OK) AND be available in any scripting language -
PERL, PYTHON, TCL etc. I recently
evaluated an open system tool called SWIG (Simplfied Wrapper and
Interface Generator) that allows one
to define classes or C-functions in an interface file (with ANSI
C/C++ syntax). After the SWIG generator
is run on the interface, it outputs the bindings required for a
particular target scripting language - tcl,
python, perl, etc. These interface defined classes/functions are
then directly available in the target scripting
language. For instance, if example.i contained a function "int
fact(int);" and example.c contained the
implementation for the function, running SWIG on example.i will
produce a wrapper file that, when
built together with the implementation file, makes the function
available in the target scripting language.
Thats SWIG in a nutshell and fits well with our needs.

Now, with CORBA's IDL in the picture, we are faced with defining
client/server interfaces in CORBA
specific IDL. But, we'd like to define ALL interfaces - be it
scripting languare interfaces, CORBA interfaces
- in ONE type of IDL and generate either a) Scriping language
bindings or b) CORBA client/server bindings.
This allows for consistency in interface definition even for
disparate usage of these interfaces.

My question is: Is there any support for generating Scripting
language bindings from CORBA IDL or a
translator (less preferable) that can translate from CORBA IDL to a
scripting language IDL ??

I realize that I may have to direct these questions to the
appropriate CORBA implementation Vendor.
But, I figured I would turn turn here for any suggestions!

Thanks a million!
Sunil .
satyan@ppllc.com
CORBA IDL AND SCRIPTS [ In reply to ]
> My question is: Is there any support for generating Scripting
> language bindings from CORBA IDL or a
> translator (less preferable) that can translate from CORBA IDL to a
> scripting language IDL ??

Any scripting language that has a binding to the CORBA Dynamic
Invocation Interface (DII) and Interface Repository (IR) can
safely invoke operations on CORBA objects without knowing their
types at compile time. If you make all the APIs you want to be
scriptable available through an ORB then the scripting interfaces
will be available "for free".

Cheers,
Nat.

--
+------------------------------------------+---------------------+
| Name: Nat Pryce MEng ACGI | Dept. of Computing, |
| Email: np2@doc.ic.ac.uk | Imperial College, |
| Tel: +44 (0)171 594 8394 | 180 Queen's Gate, |
| Fax: +44 (0)171 581 8024 | London SW7 2BZ, |
| WWW: http://www-dse.doc.ic.ac.uk/~np2 | United Kingdom |
+------------------------------------------+---------------------+
CORBA IDL AND SCRIPTS [ In reply to ]
IDL support is available for both Python and Perl. That is, you can
take your IDL specs and generate scripting-language support for the
types and interfacees specified in that IDL. With systems like ILU, you
can do the same sort of thing that SWIG does -- link your C (or other
language) code with your Python, glued together automatically by code
generated by ILU from your IDL. There's an example of doing this in the
examples/multlang directory of the ILU source release.

More ILU info at ftp://ftp.parc.xerox.com/pub/ilu/ilu.html.

Bill
CORBA IDL AND SCRIPTS [ In reply to ]
Take a look at the Fnorb Python ORB (www.dstc.edu.au/Fnorb/), with it
you can take your CORBA IDL files, pass it to fnidl, and generate
Python skeleton and stubs. Then you can very very quickly write CORBA
client/server with Python.

A+

Laurent.

On Fri, 30 Apr 1999 12:53:59 -0400, Sunil Satyan <satyan@ppllc.com>
wrote:

>: Hi All,
>: Hi. I was looking for someone to speak to regarding a few questions
>: that I had about IDL. I would be glad if someone can aswer my
>: question:
...
>: My question is: Is there any support for generating Scripting
>: language bindings from CORBA IDL or a
>: translator (less preferable) that can translate from CORBA IDL to a
>: scripting language IDL ??
>:
>: I realize that I may have to direct these questions to the
>: appropriate CORBA implementation Vendor.
>: But, I figured I would turn turn here for any suggestions!
>:
>: Thanks a million!
>: Sunil .
>: satyan@ppllc.com
>:

---
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email : pointal@lure.u-psud.fr ou lpointal@planete.net