[Biojava-l] BioSQL transaction control

mark.schreiber at group.novartis.com mark.schreiber at group.novartis.com
Sun May 23 21:09:43 EDT 2004


Hi Thomas -

Probably having a single BioSQLSequenceDB on the central appserver is the 
way to go as long as everything is synchronized. Ihave to say the client 
server idea sounds good though. Could possible make a SessionBean that 
looks like a SequenceDB, let the server sort out all the transaction 
control! I might play with that idea for a while and see how it works.

- Mark





Thomas Down <td2 at sanger.ac.uk>
Sent by: biojava-l-bounces at portal.open-bio.org
05/21/2004 04:34 PM

 
        To:     Mark Schreiber/GP/Novartis at PH
        cc:     biojava-l at open-bio.org
        Subject:        Re: [Biojava-l] BioSQL transaction control



On 21 May 2004, at 06:55, mark.schreiber at group.novartis.com wrote:

> Hi -
>
> I'm going to start using BioSQL fairly intensively soon and I was
> wondering at what level the biojava bindings to biosql control
> transactions. Specifically: if I get a reference to a Sequence object 
> from
> my SequenceDB does that reference lock the underlying entry (entries) 
> in
> the database or does it just give me a local copy to play with and then
> release the lock on the DB?

Neither.

The code supports lazy loading, otherwise it would be easy to make it 
explode on anything remotely resembling a large sequence, so the 
Sequence objects you get back are dependent on the database.  On the 
other hand, the schema is too complex to realistically consider 
"locking" a sequence.  So you should only really have one 
BioSQLSequenceDB accessing a database at a given time.

If you need multiple applications accessing the database at once, can 
you put them all in a single appserver so that they can share a single 
BioSQLSequenceDB?  Otherwise, reasonable options are:

     - Having one server export an object-oriented view of the 
BioSQLSequenceDB to other application (Corba/SOAP/RMI/whatever). 
[Aside: it would be really nice to have some kind of client-server view 
on BioJava.  If this was biojava-specific rather than trying to make it 
an interoperability point (like BioCorba/bsane/etc.) it might actually 
be usable]

     - When you need a sequence, lock the database, get the sequence out 
of BioSQL, copy it into an in-memory object, then release the lock.

     - Hack the BioSQL code to disable lazy loading.

Without knowing a lot more about your applications, I'm not really in a 
position to say which of these are more appropriate.

       Thomas.

_______________________________________________
Biojava-l mailing list  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l





More information about the Biojava-l mailing list