Governance by those who do the work.

Wednesday, October 7, 2009

Search-paths considered harmful

It has been my experience that dynamic search-paths are disastrous for libraries on commercial and educational computer networks. The search-paths at these sites seem to only grow; paths to newer versions are placed ahead of older versions. It is not uncommon for half of the directories in a path to refer to non-existent directories or non-functioning host machines! The timeouts from hosed or inaccessible networked-file-systems can balloon into minutes the startup time for programs.

Furthermore, transient router outages can cause incompatible versions of libraries to be loaded which, in the Scheme or Lisp case, may not be noticed until the program has run for hours; but more likely will just cause a mysterious failure.

The SLIB Scheme Library's solution to this problem is to have an explicit command [(require 'new-catalog)], typically run after installations, write to a file an association list of features and resolved pathnames. SLIB sessions read this file and thereafter have instantaneous latency to library paths.

If the network can't reach a particular file, the session fails immediately or after the first timeout rather than conducting covert experiments on library version compatibility.

No comments: