VoCacheDir

From PDP/Grid Wiki
Revision as of 12:41, 3 February 2009 by Davidg@nikhef.nl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The VO Cache Directory (VOCD) is a site service to allow users in a VO to cache data on a system (worker node or site) in a location where it may remain after the user's job has finished. It is intended to improve the performance and reduce network load where many jobs of the same user, or the same VO, intensively use the same worker node or site.

Locating the VO Cache Directory

The VO cache directory may be located anywhere on the file system. An environment variable "VO_voname_CACHE_DIR" will be set by the site in the job's environment to point to this directory. voname is the registered name of the VO in the VOID card or site-local equivalent thereof.

If VO_voname_CACHE_DIR is NOT defined, but VO_CACHE_DIR IS defined, then the directory pointed to by VO_CACHE_DIR MAY be used to cache VO data.

The VOCV MAY be local to the worker node or MAY be located on a shared file system.

Persistency semantics

The site DOES NOT guarantee any particular life time of the files stored in the VO Cache Directory. Files in the VOCD are treated as independent units and MAY be removed at any time.

The VO Cache Directory is a file oriented cache. This means that each file in the Cache is assessed individually, and files may be retained or removed on a file per file basis. No assumptions must be made that files put in the cache at the same time, or accessed at the same time, will have the same life time.

Storing data in the cache

The Cache Directory SHOULD be writable by all users in the VO, and MAY be writable by anybody in the world. The VOCD will be 'sticky', meaning that files written by user "A" CANNOT be removed by user "B" (like /tmp). Since the VOCD is writable by more than one user, processes loading data into the cache MUST protect against common race conditions.


Using data in the cache

Since the cache MAY be used by more than one user, the user's application SHOULD make sure that a file in the cache with a particular name actually corresponds to the desired file. Uniqueness of names MUST NOT be assumed to be guaranteed by the site.

Once opened, the files in the VOCD will obey the Unix semantics for the accessibility for open files. This means that as long as a file remains opened by a process, the process that has the file open will be able to read the contents of the file, but once the process closes the file, the content will be removed as well. The directory reference to the file MAY be removed at any time, so closing the file and re-opening it by name will not work.