[BioPython] idl/corba implementation ?'s
Brad Chapman
chapmanb@arches.uga.edu
Wed, 16 Feb 2000 15:09:45 -0500
Hello all!
I was just doing some thinking about IDL implementations, and had
some
implementation questions. I apologize if any of the following is
ignorant/uninformed; I'm still muddling my way into CORBA.
What I was thinking about was how to write the biopython corba
implementation so that a biopython user could write code that would
call up a perl server to
use (since I'm working on the biopython idl, but I hope this will
apply to any language). For instance, the current simpleseq.pl server
in the bioperl corba implementation reads a fasta file in from the
command line, and then uses this to create a PrimarySeq server
implementation that can be queried.
>From a python standpoint I would like to be able to type code
something
like the following:
# start up a perl corba server with my fasta file
perlServer = startPerlCorbaServer()
primarySequence = perlServer.getPrimarySeq(myfile.fasta)
# get information from the sequence
subSeq = primarySequence.get_subseq (1, 50)
....
Currently, it seems like the way to make users able to able to do this
would be to write biopython code that runs the 'simpleseq.pl <
myfile.fasta' command when a biopython user types in the above code,
and
then returns the object implementation from the server so that
primarySeq
interface commands can be run on it. Am I on the right track?
So if I'm not in left field, this would mean I'd need to do the
following things for the "wrapper" code that makes this kind of call
possible: First I'd need to check that the server started correctly
(ie.
the file is not bogus, the idl is compiled and able to be found by the
server, etc.) and return an error otherwise. Grab the IOR which is
written
to a file (or grab something from the naming service or whatever...)
and
convert this into the object reference and then return this.
So this led me to thinking--would it be useful to build a
factory-type
interface into the idl that returns references to "ready to go"
implementations when a file is passed to the interface to start.
interface BiocorbaFactory {
SeqDB get_SeqDB(in string file);
....
PrimarySeq get_PrimarySeq(in string file);
....
};
...Or something like this. It seems like this would make it easier to
return useful error messages to users (now we could distguish between
problems getting a BiocorbaFactory instance and problems with the
file) and
would allow us to only worry about a single IOR and server connection
(the
connection to the factory) instead of worrying about IORs for each
script
started.
Is this making any sense? Does anyone agree/heartily disagree? Am I
on the right track in terms of implementation? If not, could someone
throw me a lifeline :)
Anyways, thanks much for reading!
Brad