Table of Contents
Overview
A file registry service is a simple store of key-value pairs where keys are files (i.e., wrench::WorkflowFile
) and values are Storage Services (i.e., wrench::StorageService
). It is used to keep track of the location of file copies. In real-world deployments, this service is often called a "replica catalog".
Creating a file registry service
In WRENCH, a file registry service is defined by the wrench::FileRegistryService
class, an instantiation of which requires the following parameters:
- The name of a host on which to start the service (this is the entry point to the service);
- Maps (
std::map
) of configurable properties (wrench::NetworkProximityServiceProperty
) and configurable message payloads (wrench::NetworkProximityServiceMessagePayload
).
The example below shows how to create an instance that runs on host "ReplicaCatalog". The service's properties are customized to specify that it takes 0.1 (simulated) seconds for the service to lookup an entry in its database.
File registry service properties
The properties that can be configured for a file registry service include:
wrench::FileRegistryService::LOOKUP_COMPUTE_COST
Using a file registry service
Adding/removing an entry to a file registry service is done as follows:
Retrieving all entries for a given file is done as follows:
If a network proximity service is running, it is possible to retrieve entries for a file sorted by non-decreasing proximity from some reference host. Returned entries are stored in a (sorted) std::map
where the keys are network distances to the reference host. For instance: