p.s., Re: FileField

On Fri, 29 Aug 2003, Bill Hibbard wrote:

> > I'm looking for an efficient way to store data on disk for quick access
> > via VisAD. My data look something like:
> >
> >    time -> ( (x,y,z) -> (a,b,c) )
> >
> > and I'd like to cache a subset of the time samples for optimal performace.
> >
> > I assume I want to use FileField (or FileFlatField?) but I'm not sure
> > how to proceed.
>
> You can ignore FileField unless you plan to create a new
> implementation of Form that manages data caching between
> disk and memory.

Since you do say 'I'd like to cache a subset of the time samples'
let me add that you can accomplish this using VisADSerialForm as
I discuss below, by saving each time sample as an independent
Data object with MathType ( (x,y,z) -> (a,b,c) ).

> > I intend to have a "server" with a large amount of data
> > available via RemoteDataReferences. I'd populate the server by reading
> > in data the usual way then dumping them to files. One big question is
> > how should I create those files and read them. Should I use VisAD
> > serialized or binary format (via VisADForm) or should I roll my own
> > format and maybe use java.nio's memory-mapped IO?
>
> For fastest performance I recommend VisADSerialForm, as long
> as your Data objects fit in memory. Note that constructing a
> VisADSerialForm is the same as constructing a VisADForm with
> the 'boolean allowBinary' argument = false. These save Data
> using Java serialization. It wouldn't be hard to write a new
> Form that combined Java serialization with java.nio's
> memory-mapped IO. Your new Form would have open() and save()
> methods that modified the logic of the saveSerial() and
> readSerial() methods of VisADForm.java to use java.nio.
>
> > It would help if I understood the difference between a Form (e.g.
> > VisADForm) and a FileAccessor.
>
> You can ignore FileAccessor unless you plan to create a new
> implementation of Form that explicitly manages the locations
> of sub-objects in disk files. If you are using Java
> serialization you can ignore FileAccessor and FileField.
>
> Good luck,
> Bill


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: