Selective replication

If an application requires selective export, like exporting only approved articles, additional tools will be needed. In near future, Repligard will support such functionalities by itself.

The CVS version of Repligard has basic support for this feature. Users can specify these rules in the configuration file. However, Repligard will only check the syntax, but will not act on the rules yet. These are called export hooks and might even appear before Midgard 1.4.2 release.

Export hook is the Repligard term for little scripts that can be used to select which objects to replicate. Export hooks are specific to a object type, and only one hook can be used for each type. The export hook will be executed for each object of that type, and will return either 1 or 0, for "let's export" or "don't export". Example:


<exportHook type="article">
<![CDATA[
   if (object["approved"]) {
         return 0;
   }
   return 1;
]]>
</exportHook>

The example uses pseudocode. Each article would be passed through the script, and the script would receive the objects as associative arrays.

The language used can be any which Repligard has bindings for. The first binding will be for the S-Lang language, which has a C-like syntax. The script will not be able to communicate with the operating system for security reasons, but only have access to a limited range of libraries, like regular expression matching. This will be determined in the language binding.

This functionality should be available in the near future, probably not later than early fall 2001.