Iterator/size() (was: [Biocorba-l] BSANE and bioCORBA)

Dickson, Mike mdickson@netgenics.com
Fri, 1 Jun 2001 11:59:04 -0400


Having a size() method is fine by me.  Its usually a pain to do with a JDBC
driver because there's no easy way to get the size of a ResultSet.  We could
always make size a "hint" and allow an implementation to throw and exception
(CORBA_NO_IMPLEMENT?) as Martin indicates.

Mike

> -----Original Message-----
> From: Juha Muilu [mailto:muilu@ebi.ac.uk]
> Sent: Friday, June 01, 2001 11:47 AM
> To: Martin Senger
> Cc: Alan Robinson; biocorba-l@biocorba.org
> Subject: Re: Iterator/size() (was: [Biocorba-l] BSANE and bioCORBA)
> 
> 
> Martin Senger wrote:
> > 
> > >
> > > Perhaps the size() method should not be in the iterator.
> > >
> >    Definitely my opinion.
> > 
> > >
> > > The method can be a pain as you said, because server impl 
> must scan all
> > > the elements (e.g.. annotations in this case).
> > >
> >    But it's a must (IMHO). I cannot imagine to implement 
> robust clients
> > without being able to know first what I can get back. But 
> if you feel that
> > such features would be long and difficult for some server 
> implementation,
> > put there an exception (not_coutable, not_known, not_implemented,
> > whatsever).
> >
> 
> I agree with you and I like to have the "size" thing there. Either in
> the iterator or in the entity who use the iterator (latter is
> preferably. See how the iterators are currently used)
> 
> Some have raised the issue that it can be tricky to implement on the
> server side... As you said it must be implemented somehow. Having
> exception there just would encourage to bad coding.
>  
> >    Martin
> > 
> > --
> > Martin Senger
> > 
> > EMBL Outstation - Hinxton                Senger@EBI.ac.uk
> > European Bioinformatics Institute        Phone: (+44) 1223 494636
> > Wellcome Trust Genome Campus             (Switchboard:     494444)
> > Hinxton                                  Fax  : (+44) 1223 494468
> > Cambridge CB10 1SD
> > United Kingdom                           
> http://industry.ebi.ac.uk/~senger
> 
> -- 
>  
> +--------------------------------------------------------------------+
>  |Juha Muilu, Ph.D., EMBL Outstation| Email:  muilu@ebi.ac.uk 
>         |
>  |European Bioinformatics Institute | Phone:  +44 (0)1223 494 
> 624     |
>  |Wellcome Trust Genome Campus      | Fax:    +44 (0)1223 494 
> 468     |
>  |Hinxton, Cambridge CB10 1SD, UK   | 
> http://industry.ebi.ac.uk/~muilu|
>  
> +--------------------------------------------------------------------+
> _______________________________________________
> Biocorba-l mailing list
> Biocorba-l@biocorba.org
> http://www.biocorba.org/mailman/listinfo/biocorba-l
>