[ensembl-dev] Perl BLOBs in the ensembl compara database

Nathan Johnson njohnson at ebi.ac.uk
Mon Jan 24 21:13:57 GMT 2011


Just to chime in on this a little late.

As Kathryn said, we try and use a defined endian(little/v) encoding  
where possible. However due to the lack of standards perl doesn't  
support float encoding apart from 'native' format, so this is indeed  
dependent on our architecture.  This means usage of some of our BLOB  
data would require a little preprocessing to reverse the order.

IEE754 does seem like a potential fix/standard for this, so we will  
take a look to see if this is appropriate.  However, a quick google  
search tells me that IEE754 does not guarantee 'verbatim' decoding due  
to the fact that the native memory representative is not part of the  
standard.

Thanks

Nathan


On 24 Jan 2011, at 13:25, Keith James wrote:

>>>>>> "Paul" == Paul Flicek <flicek at ebi.ac.uk> writes:
>
>    Paul> Although we do the best we can to make everything
>    Paul> accessible, making everything completely independent of the
>    Paul> architecture that we run on is not really feasible given our
>    Paul> level of funding, priorities, etc.
>
>    Paul> Our goal with the database and API code is to serve
>    Paul> bioinformaticians wanting to do biological analysis (rather
>    Paul> than those wanting to write alternate API implementations
>    Paul> :).
>
>    Paul> That said, in the medium term we will take a look at ways
>    Paul> that we can further generalise the code and how to access
>    Paul> the data.
>
> I've been lurking on this thread, but thought I'd butt in with an
> observation. Would explicity using IEEE 754 floats be an answer?
>
> http://en.wikipedia.org/wiki/IEEE754
>
> It's fairly straightforward to implement from scratch, given the
> spec. (I've done this for another language). It also gets you such
> niceties as NaNs and infinity, if you choose to handle them.
>
> You'd still need to document which endianess is used, but it would
> become independent of the platform.
>
> Keith
>
> -- 
> Keith James Ph.D. <kdj at sanger.ac.uk> - http://github.com/keithj
>
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev





More information about the Dev mailing list