[rrd-developers] implementing portable format

Tobias Oetiker tobi at oetiker.ch
Tue Apr 7 21:08:02 CEST 2009


Kevin,

Today kevin brintnall wrote:

> On Tue, Apr 07, 2009 at 08:12:26PM +0200, Bernhard Reutner-Fischer wrote:
> > On Sat, Nov 01, 2008 at 10:08:06AM +0100, Tobias Oetiker wrote:
> >
> > >This sounds like quite a bit of added complexity. It would
> > >require us to be able to convert from all platforms to all other
> > >platforms ... I have the feeling that adding one new format with
> > >the ability to read the old one already puts quite something on our
> > >plate.
> >
> > Why didn't we use htonl(), ntohl() etc, btw?
> >
> > It's not that converting between "host" and "network" byte order is
> > something new, ISTR..
> >
> > This means that we just store the data in network byte order on disk
> > and read it back with ntohl(), ntohs(). This should result in
> > much reduced pain, i would say.
>
> Given the various machine architectures (now and future), and the various
> packing strategies employed by all the compilers out there, it makes sense
> to use 64-bit values.  Is there a standard ntohl() equivalent for 64-bits?
>
> Most of the work is in ensuring that all accesses to the file use the
> proper xtoy() and ytox()...  not actually picking the function.

my vision is that we create accessor functions for the individual
parts of the rrd file format, the number of input formats supported
is basically just a 'fleissarbeit' as we say in german, given the
structure if the accessors is chosen such that they can be easily
enhanced for different architectures ...

cheers
tobi

>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list