[omniORB] Python/C++ bridge

Renzo Tomaselli renzo.tomaselli@tecnotp.it
Tue, 23 May 2000 12:51:48 +0200


Duncan,
        yes, I need to run both runtimes in the same process. That's because
I have some implementation services which need to be colocated with clients
for performance reasons (cache, transactions, etc.). Since *all* my services
are dynamic loadable modules (dll/shlib) already developed in C++, I
designed a specific loader service to manage the entire move, being itself a
C++ CORBA implementation with its own set of interfaces. But it's special
because each client process must implicitely link it in order to have other
services colocated within its address space. Such a loader hides all
platform-dependent tricks about loading/unloading modules and other stuff.
And this is done by exporting a single root object, acting much the same as
the naming service root context.
All of this should be true for a Python client as well, and this raises the
issue about how getting at this root object from the Python side.
Using the naming service as a bridge is not enough, since something must
ensure a proper linking of the loader dll into the Python client process.
I think using a string-converted object ref. should work well, once it is
returned from a Python extension library wrapping my actual loader service.
Thanks,
            Renzo

-----Original Message-----
From: Duncan Grisby <dgrisby@uk.research.att.com>
To: Renzo Tomaselli <renzo.tomaselli@tecnotp.it>
Cc: Omniorb list <omniorb-list@uk.research.att.com>
Date: martedl 23 maggio 2000 11:19
Subject: Re: [omniORB] Python/C++ bridge


>On Thursday 11 May, "Renzo Tomaselli" wrote:
>
>>     being not a Python expert, I'm trying to integrate some Python
>> client-side code with an existing C++ architecture based on OmniORB 2.8.
>
>Sorry I didn't reply sooner. I don't quite follow what you are trying
>to do. It sounds like you are trying to run omniORB with C++ and
>Python objects in the same process. That works fine, as long as you
>can get object references from one language to the other. There is no
>direct way to do that, but you can do it via object_to_string() in one
>language followed by string_to_object() in the other.
>
>Does that help answer your question?  If not, can you give some more
>details of what you're trying to do?
>
>Cheers,
>
>Duncan.
>
>--
> -- Duncan Grisby  \  Research Engineer  --
>  -- AT&T Laboratories Cambridge          --
>   -- http://www.uk.research.att.com/~dpg1 --