wrench::FileRegistryService

class FileRegistryService : public wrench::Service

A file registry service (a.k.a. replica catalog) that holds a database of which files are available at which storage services. Specifically, the database holds a set of <file, storage service> entries. A WMS can add, lookup, and remove entries at will from this database.

Public Functions

FileRegistryService(const std::string &hostname, const WRENCH_PROPERTY_COLLECTION_TYPE &property_list = {}, const WRENCH_MESSAGE_PAYLOAD_COLLECTION_TYPE &messagepayload_list = {})

Constructor.

Parameters:
  • hostname – the hostname on which to start the service

  • property_list – a property list ({} means “use all defaults”)

  • messagepayload_list – a message payload list ({} means “use all defaults”)

void addEntry(const std::shared_ptr<FileLocation> &location)

Add an entry.

Parameters:

location – a file location

std::set<std::shared_ptr<FileLocation>> lookupEntry(const std::shared_ptr<DataFile> &file)

Lookup entries for a file.

Parameters:

file – the file to lookup

Returns:

The list locations for the file

std::map<double, std::shared_ptr<FileLocation>> lookupEntry(const std::shared_ptr<DataFile> &file, const std::string &reference_host, const std::shared_ptr<NetworkProximityService> &network_proximity_service)

Lookup entries for a file, including for each entry a network distance from a reference host (as determined by a network proximity service)

Parameters:
  • file – the file to lookup

  • reference_host – reference host from which network proximity values are to be measured

  • network_proximity_service – the network proximity service to use

Returns:

a map of <distance , file location> pairs

void removeEntry(const std::shared_ptr<FileLocation> &location)

Remove an entry.

Parameters:

location – a file location