"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "libdap-3.8.2/README.AIS" of archive libdap-3.8.2.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 Notes for the prototype AIS implementation:
    2 
    3 Current for version 3.7.6 (12 March 2007)
    4 
    5 How to use the AIS. These notes correspond to the prototype AIS developed in
    6 March 2003. This version of the AIS works for DAS objects only.
    7 
    8 The AIS uses a configuration file which holds the mappings between a primary
    9 data source (aka a DODS server) and one or more AIS resources. The
   10 configuration file to use is named in the .dodsrc file using the AIS_DATABASE
   11 property.
   12 
   13 The AIS configuration file is described by src/dap/ais_database.dtd. A short
   14 file looks like:
   15 
   16     <?xml version="1.0" encoding="US-ASCII" standalone="no"?>
   17     <!DOCTYPE ais SYSTEM "http://www.opendap.org/ais/ais_database.dtd">
   18 
   19     <ais xmlns="http://xml.opendap.org/ais">
   20 
   21     <entry>
   22     <primary url="http://localhost/dods-test/nph-dods/data/nc/fnoc1.nc"/>
   23     <ancillary url="http://localhost/ais/fnoc1.nc.das"/>
   24     </entry>
   25 
   26     <entry>
   27     <primary url="http://localhost/dods-test/nph-dods/data/nc/fnoc2.nc"/>
   28     <ancillary rule="replace" url="ais_testsuite/fnoc2_replace.das"/>
   29     </entry>
   30 
   31     </ais>
   32 
   33 Each entry must have one <primary> element and may have one or more
   34 <ancillary> elements. The <ancillary> elements are applied in the order they
   35 are listed. The 'rule' attribute of <ancillary> determines how each AIS
   36 resource is combined with the primary resource. By default, attributes in the
   37 AIS resource are combined so that they overwrite existing attributes. If
   38 there's no conflict, the new attribute is added. This applies to containers
   39 as well as single attributes. The replace rule causes the AIS resource
   40 attributes to completely replace those of the primary resource. If the
   41 fallback rule is specified, the AIS resource's attributes are used only if
   42 the primary resource has *no* attributes.
   43 
   44 How to use the AIS: 
   45 
   46 Keep in mind that this is a prototype and is far, far from
   47 'feature-complete.'
   48 
   49 There are two ways to use the AIS right now. First you can use geturl's new
   50 -A option. This option tells geturl that when it gets a DAS object, it should
   51 merge into that object any AIS resources listed for the URL in the current
   52 AIS database (found in the .dodsrc file).
   53 
   54 Second you can program with the AIS. The class AISConnect can be used as a
   55 replacement for Connect. This class subclasses Connect and adds the capacity
   56 to use the AIS subsystem I've built. The AIS itself is contained in the
   57 classes AISMerge, AISDatabaseParser and AISResources.
   58 
   59 *****************************************************************************
   60 
   61 Here are some notes I made while I wrote the code:
   62 
   63 * AISConnect does not implement clones for Connect's deprecated methods.
   64   Should it? Maybe it's time to let those go...
   65 
   66 * What happens when the same primary (data) source is listed more than once
   67   in the database?
   68 
   69 * What about primary sources that are regular expressions? Right now lookup
   70   is ln(N) where N is the number of entries. Regexps make this linear in N.
   71   Bummer. I can use two databases, et c. but it gets messy very fast. So are
   72   wild cards important (it doesn't have to be regexps, those are just really
   73   easy to implement...)?
   74 
   75 * I've changed the meaning of 'fallback' so that it works for a whole group
   76   of attributes rather than each individual attribute. My guess is that this
   77   will be really unpopular. But it was easy to code and I'm not convinced
   78   that fallback resources really make that much sense in practice.
   79 
   80 * I think that for client-side AIS stuff, the code should be able to read
   81   from a remote XML file to get the database. Not hard to code. But I wonder
   82   how useful it would be? It might be cool because a client could get the
   83   benefit of a remote server but do all the work locally. That would
   84   'distribute the AIS processing/network load.'
   85 
   86 * How will we handle multiple AIS databases? I think this could be really
   87   important. I like the AIS-in-the-configuration-file less and less, until I
   88   think about trying to get people to buy into enveloped URLs...
   89 
   90 * Is the database file simple enough for people to write by hand? (and one
   91   look and you can see why we're going to need wildcards... imagine 20K
   92   URLs).
   93 
   94 * I still need to write a bunch more tests.
   95 
   96 * I need to hack some code to do the AIS-in-the-URL thing. I figured out how
   97   to handle that without doing the entire ex pr parse on the client, at least
   98   for the DAS version ... haven't thought about the DDS & DataDDS much.
   99 
  100 * I need to code some serious integration tests. Most of the AIS-specific
  101   code has unit tests (except for AISConnect, which is barely different from
  102   the AISMerge Test unit tests).