I'd give up Perl tomorrow if only...

Derek Thomson derek at wedgetail.com
Fri Jun 21 07:41:22 EDT 2002


Gerhard Häring wrote:

> 
>>[...] What we *really* need to do is dynamically create CORBA
>>interfaces for Perl modules, but that might be impossible given that
>>Perl is like Python in that module and class interfaces aren't
>>pre-declared :(
> 
> 
> Why is that a problem? Why not just override __getattr__ or its
> Perl-equivalent and switch to SOAP/XML-RPC instead of CORBA?

I'm not sure what you mean. The calls are coming from the client, 
remember. On the server (Perl side), you have to unmarshall the request, 
decide which object the request is for, unmarshall the method name and 
the arguments, then make the right method call on the correct object. I 
can't see AUTOLOAD (Perl's _getattr_ equivalent) entering into this 
process anywhere.

Besides, how do I deal with distributed object references, or map an 
object reference on the client to an object on the server in SOAP or 
XML-RPC? Lots of Perl modules create objects as you use them, as you 
would expect. Then there's the question of making invocations back to 
the client to support the push model common in serious distributed 
computing.

You need the infrastructure CORBA provides to do real distributed 
objects, as far as I can see. SOAP and XML-RPC alone are good only for 
fairly simple RPC, as they only specify a marshalling scheme.

To demonstrate this, I've used XML-RPC as a pluggable marshalling scheme 
for Fnorb. So, you're using the CORBA infrastructure (object adaptors, 
object references, connection management and so on), but you're 
communicating with XML on-the-wire. Best of both worlds?

Check it out on the Fnorb CVS repository. It's on the branch tagged 
xmlrpc. I may merge it into the trunk if enough people are keen. It's 
pretty nice, you can have some objects talking XMLRPC, and some 
CORBA-IIOP, and some talking both, without changing any implementation 
code at all.

> You're
> restricted to simple data types, then, but that would probably be the
> same for CORBA, right?

I can't recall how complex SOAP structures can be, but in CORBA-IIOP and 
XML-RPC you can represent arbitrarily complex structures, just as long 
as they're not self-referential i.e. only trees not graphs.

Regards,
Derek.




More information about the Python-list mailing list