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(std::string hostname, WRENCH_PROPERTY_COLLECTION_TYPE property_list = {}, WRENCH_MESSAGE_PAYLOADCOLLECTION_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<DataFile> &file, std::shared_ptr<FileLocation> location)

Add an entry.

Parameters
  • file – a file

  • location – a file location

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

Lookup entries for a file.

Parameters

file – the file to lookup

Throws
Returns

The list locations for the file

std::map<double, std::shared_ptr<FileLocation>> lookupEntry(std::shared_ptr<DataFile> file, std::string reference_host, 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<DataFile> &file, const std::shared_ptr<FileLocation> &location)

Remove an entry.

Parameters
  • file – a file

  • location – a file location

Throws