Difference between revisions of "ViSUS configuration file"

From
Jump to: navigation, search
m (Configuration File Location)
(Configuration Options)
Line 10: Line 10:
  
 
== Configuration Options ==
 
== Configuration Options ==
 +
 +
A simple ViSUS configuration file would look like the following
 +
 +
<pre>
 +
<?xml version="1.0" ?>
 +
 +
<visus>
 +
 +
    <!-- Local dataset -->
 +
    <dataset name="my_dataset" url="file:///Users/username/data/my_dataset.idx" permissions="public"/>
 +
 +
    <!-- Remote dataset -->
 +
    <dataset name="2kbit1" url="http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1" permissions="public">
 +
 +
    <!-- Saved scene -->
 +
    <scene url="file:///Users/username/data/my_scene.xml" permissions="public"/>
 +
 +
</visus>
 +
</pre>
 +
 +
An important feature of the ViSUS framework is the ''caching''. Data streamed from the server can be cached on disk for later faster access.
 +
'''Note''': when frequent and fast access is required for specific dataset, enabling the ''caching'' is highly recommended.
 +
 +
To enable this feature for a specific dataset we can define a dataset in the configuration file as following:
 +
 +
<pre>
 +
  <dataset name="2kbit1" url="http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1" permissions="public">
 +
    <access name="Multiplex" type="multiplex">
 +
      <access name="cache"  type="disk" chmod="rw" url="$(VisusCacheDirectory)/2kbit1/visus.idx" />
 +
      <access name="source" type="network" chmod="r" compression="zip" />
 +
    </access>
 +
  </dataset>
 +
</pre>
 +
 +
With these lines of code we created two layers of data access the first from the disk (e.g. the cache) and the other from the network.
 +
This will allow the application to search first on the disk for the requested data and in case of ''miss'' the request will be forwarded to the network.
 +
At the same time any data requested to the network layer will be cached on disk (at the specified URL).

Revision as of 22:04, 31 July 2017

Configuration File Location

The software's current strategy is to search the following locations in this order:

  1. location specified by --visus-config command line parameter
  2. current working directory
  3. visus user directory (note: itunes-accessible documents directory on ios)
  4. resources directory (e.g. osx/ios bundle, same as cwd on other platforms)
  5. hardcoded path provided at compile time (e.g. for mod_visus default)
  6. executable directory (very unusual deployment, but it doesn't hurt anything)

Configuration Options

A simple ViSUS configuration file would look like the following

<?xml version="1.0" ?>

<visus>

    <!-- Local dataset --> 
    <dataset name="my_dataset" url="file:///Users/username/data/my_dataset.idx" permissions="public"/>

    <!-- Remote dataset -->
    <dataset name="2kbit1" url="http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1" permissions="public">

    <!-- Saved scene -->
    <scene url="file:///Users/username/data/my_scene.xml" permissions="public"/>

</visus>

An important feature of the ViSUS framework is the caching. Data streamed from the server can be cached on disk for later faster access. Note: when frequent and fast access is required for specific dataset, enabling the caching is highly recommended.

To enable this feature for a specific dataset we can define a dataset in the configuration file as following:

  <dataset name="2kbit1" url="http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1" permissions="public">
     <access name="Multiplex" type="multiplex">
       <access name="cache"  type="disk" chmod="rw" url="$(VisusCacheDirectory)/2kbit1/visus.idx" />
       <access name="source" type="network" chmod="r" compression="zip" />
     </access> 
  </dataset> 

With these lines of code we created two layers of data access the first from the disk (e.g. the cache) and the other from the network. This will allow the application to search first on the disk for the requested data and in case of miss the request will be forwarded to the network. At the same time any data requested to the network layer will be cached on disk (at the specified URL).