Table of Contents
Overview
A Simple storage service is the simplest possible abstraction for a service that can store and provide workflow files. It has a certain storage capacity, and provides write, read, and delete operations on files. Writes and Reads can be done synchronously or asynchronously. In addition, higher-level semantics such as copying a file directly from a storage service to another are provided.
Creating a Simple storage service
In WRENCH, a Simple storage service represents a storage service (wrench::StorageService
), which is defined by the wrench::SimpleStorage
class. An instantiation of a Simple storage service requires the following parameters:
- The name of a host on which to start the service (this is the entry point to the service);
- A capacity in bytes;
- Maps (
std::map
) of configurable properties (wrench::BatchServiceProperty
) and configurable message payloads (wrench::BatchServiceMessagePayload
).
The example below shows how to create an instance of a Simple storage service that runs on host "Gateway", has access to 64TiB of storage. Furthermore, the number of maximum concurrent data connections supported by the service is configured to be 8:
Using a simple storage service
One can interact directly with a simple storage service to check whether the service hosts a particular file or to delete a file:
While there are few other direct interactions are possible (see the documentation of the wrench::StorageService
and wrench::SimpleStorageService
classes), many interactions are via a data movement manager (an instance of the wrench::DataMovementManager
class). This is a helper process that makes it possible interact asynchronously and transparently with storage services. For instance, here is an example of a synchronous file copy:
The above call blocks until the file copy has completed. An asynchronous file copy would work as follows:
See the documentation of the wrench::DataMovementManager
class for all available API methods.