The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

WebService::CEPH::FileShadow

Child class of WebService::CEPH.

Constructor parameters are the same as for WebService::CEPH, plus there are mode and fs_shadow_path parameters: mode - 's3' or 's3-fs' or 'fs'

fs_shadow_path - path to the file system, points to the directory, the final slash is optional.

In s3 mode, everything works like WebService :: CEPH, the files are downloaded and uploaded to the CEPH using the s3 protocol.

In the 's3-fs' mode when uploading a file, a copy of file is created in the file system. First, the file is uploaded to s3, then to the file system and if an exception was thrown at that time, the previous step would not be canceled. If a download fails in 's3-fs' mode, no failover on the file system is made. In the 'fs' mode, file upload and download is made using only file system, not S3.

Metainformation (x-amz-meta-md5, content-type in the file system is not saved). In the download_to_file, upload_from_file methods in the fs mode, working with local files is done as much as possible compatible with the 's3' mode (umask permissions when creating files, truncate and seek modes when working with filehandles).

The object key name can not contain characters that are insecure for the file system (for example '../', '/ ..') otherwise there will be an exception thrown. However, it is the caller that is really responsible for security.