[BioPython] biocorba progress
Brad Chapman
chapmanb@arches.uga.edu
Wed, 26 Apr 2000 09:51:20 -0400
Ewan wrote:
> Just popping over from bioperl. Just to say that bioperl biocorba
> server implementation is ticking along nicely. For the biojava and
> biopython project I'd encourage you to look at developing clients to
> these objects - this way you can bootstrap off the 'maturity' (aka -
> cruft) of bioperl, giving you access to sequence flat files and
> sequence databases automatically without going nuts over the quirks
> of sequence formats.
Hey, just wanted to keep you all up to date on the status of the
biopython-corba stuff. WRT the python client, I've been trying to keep
it up to date with the changes in the bioperl server, so right now it
is ready to run against the three servers available in
bioperl-corba-server. Unfortunately, it only works with one of
them (simpleseq.pl) :-< I know that the bioperl-corba-server module is
under heavy development/merging, so I didn't mess around with the
other two servers to figure out the problem. I just wanted to let the
bioperl guys know that you all can use the python client whenever you
are ready and then we can work on communication problems from both
ends :-) Everything is located in biopython cvs in the module
biopython-corba, and complete instructions are available in the README
(also now available in friendly html version :).
For everyone on the biopython side, I have fixed the corba stuff
so it now can use either Fnorb or omniORB. The code is designed to
work against the standard python mapping for corba and I provided
patches to make the output of Fnorb, which doesn't follow the mapping,
look like the correct thing. Again, there are tons of instructions in
the README. I also tried to work with ILU, but biocorba.idl causes the
ILU stubber to core dump as the result of a bug (I think) in the
stubber. So if anyone desperately wanted to use ILU, I submitted a
report to the proper place, so maybe it will eventually be okay :-)
There is also a minimal server implementation based off of
Andrew's sequence code, and the start of a 'Biopython lookalike'
interface so that Biopython-corba calls will look like Biopython
calls. I hope that we'll be able to use this lookalike interface to
develop the sequence class structure on top of the corba stuff, giving
us flexibility to design a good interface without having to write the
underlying code. Cool stuff!
I also have a python question for you all about the
implementation. The biocorba interface memory management system is
based on referencing and unreferencing objects across the corba
interface. Basically, the server creates a refrence to an object when
it passed it to the client. The client uses it up, and then calls
unref() to let the server know it is done with it. Then the server can
remove it and clean it up.
So, I'm trying to think about how to implement this in python but
am kind of stuck and not sure if I'm doing things right (I always rely
on python to take care of my garbage collection for me :-). Basically
what I was thinking about doing was:
1. Tie deletions of objects on the client side with calling an unref():
class ACorbaClass
def __del__(self):
call corba.unref()
continue deleting the object
But I'm not sure how to do the continuation of deletion...
2. On the Server side, tie the call to an unref with a call to delete
the object.
Is this a good pythonic way to do things? (or even a good way in
general? :).
Brad