[Bioperl-l] LWP in Bio::DB::GenBank.pm

Aaron J Mackey ajm6q@virginia.edu
Sat, 25 Nov 2000 14:34:05 -0500 (EST)


Sorry, should have been more specific:

From the perldoc pages of LWP::UserAgent:

       The request() method can process the content of the
       response in one of three ways: in core, into a file, or
       into repeated calls to a subroutine.  You choose which one
       by the kind of value passed as the second argument to
       request().

Seems like the callback should be usable here in order to enable
streaming, pipe-lined processing.

-Aaron

On Sat, 25 Nov 2000, Aaron J Mackey wrote:

>
> LWP::Request is capable of returning a filehandle/stream ... read the
> documentation.
>
> -Aaron
>
> On Fri, 24 Nov 2000, Hilmar Lapp wrote:
>
> > Due to the migration of DB::GenBank.pm to using LWP for making the
> > queries, the result is retrieved as one string. This can be a bad idea,
> > especially if the user requested batch retrieval of a number of
> > sequences, and each of them is large (there is even not a chance to
> > process these one after the other, with disposing of each sequence once
> > it is processed). That is, there is also no chance for a
> > large-seq-specialized class to hook in, and any processing will only
> > start after everything has been downloaded (and slurped into memory).
> >
> > We need to decide whether we want to particularly discourage asking for
> > a number of sequences simultaneously, or whether there is a possibility
> > to return a true stream.
> >
> > 	Hilmar
> >
>
>

-- 
 o ~   ~   ~   ~   ~   ~  o
/ Aaron J Mackey           \
\  Dr. Pearson Laboratory  /
 \ University of Virginia  \
 /  (804) 924-2821          \
 \  amackey@virginia.edu    /
  o ~   ~   ~   ~   ~   ~  o