The CTP FileStorageService Web Server
This article describes the web server which is included in the CTP FileStorageService. The primary intended audience for this article is programmers who wish to write applications to access stored objects, but the article may also be useful for CTP administrators. A prerequisite for fully understanding this article is The Clinical Trial Processor.
1 The FileStorageService
The FileStorageService is a CTP pipeline stage which stores objects in a file storage device. Files are stored in a hierarchy of directories, grouping objects by study. An object is associated with a study by its study UID.
As described indescribed in The Clinical Trial Processor, CTP manages four types of objects:
- DicomObject
- XmlObject
- ZipObject
- FileObject
The first three contain unique identifiers for the study and for the object itself. The FileObject, which contains data of unknown format, cannot provide either a study UID or an object UID, so the FileStorageService assigns a FileObject to a study called "__bullpen" and assigns a unique filename to the object, which is used as its object UID.
The type attribute of the FileStorageService determines the directory structure above the study directories.
- At the top, there may be one or more directories which are called FileSystems. Objects (and their studies) are assigned to a FileSystem based on the fs-name-tag attribute. If the fs-name-tag attribute is supplied in the configuration, a DicomObject is interrogated for the contents of the corresponding element and the contents are used as the name of the FileSystem. If no fs-name-tag is supplied in the configuration, the FileStorageService assigns all objects to the "__default" FileSystem.
- If the type attribute is supplied in the configuration, studies are divided among intermediate directories based on the date on which the study was received:
- type="year" creates one level of directories based on the year.
- type="month" creates one level of directories based on the year, and within each year, a level based on the month within the year.
- type="week" creates one level of directories based on the year, and within each year, a level based on the week number within the year.
The purpose of the type attribute is to allow FileStorageServices to handle a large number of objects without any directory growing too large for the operating system to handle efficiently.
2 The FileStorageService Web Server
The port attribute, when present in the configuration element of the FileStorageService, starts a web server. This web server is independent of the one which CTP always provides to allow the operation of the system to be monitored.
The root directory of the web server is the same as the root directory of the FileStorageService. can serve files from any directory below