You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Tomaz Muraus (JIRA)" <ji...@apache.org> on 2012/12/30 00:42:13 UTC

[dev] [jira] [Commented] (LIBCLOUD-273) Provide hash values for local storage

    [ https://issues.apache.org/jira/browse/LIBCLOUD-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13541022#comment-13541022 ] 

Tomaz Muraus commented on LIBCLOUD-273:
---------------------------------------

Local storage driver is not really meant (or should be) used for anything other than playing with the API and testing it so number 1 seems good enough to me.

                
> Provide hash values for local storage
> -------------------------------------
>
>                 Key: LIBCLOUD-273
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-273
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Storage
>            Reporter: Mahendra M
>            Priority: Minor
>         Attachments: local_hash.diff
>
>
> This patch provides a 'hash' value for the stored object.
> There are two approaches possible.
> 1) For every object stored / downloaded, calculate the MD5 hash on the fly. Store the cache info in a folder '.hash' - which is excluded from the content listing. Use this cached value in the future. If file time-stamp changes, update the cache
> 2) Just provide a MD5 hash of the stat.st_mtime of the file.
> Approach (1) will give a true hash of the object.
> Approach (2) will give an indication about changes in the object. Like an ETag.
> Approach (2) is similar to how S3 storage works. The hash returned by S3 is not the content digest. It is just  an ETag. So, in local storage, we can take Approach (2).
> We can migrate to Approach (1) in the future, if required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Re: [dev] [jira] [Commented] (LIBCLOUD-273) Provide hash values for local storage

Posted by Mahendra M <ma...@gmail.com>.
On Sun, Dec 30, 2012 at 5:12 AM, Tomaz Muraus (JIRA) <ji...@apache.org>wrote:

> Local storage driver is not really meant (or should be) used for anything
> other than playing with the API and testing it so number 1 seems good
> enough to me.


Actually, we do use local storage in production.

We have a streaming video hosting product which can be deployed on a cloud
or within a data center.
The admin can configure storage locations (for each user), via a Django
Admin form - which has three fields.
Provider : [dropdown of available libcloud storage providers]
Username : [text]
Access key : [text]

By allowing local storage, we are able to keep:
1) code very simple for deploying on local Data Center and Cloud. NFS/Samba
mounted storage are also shown up under 'local'
2) code very simple for hybrid deployments (some users on local, some over
cloud)
3) configuration options very simple and easy to use.

Till date, it has worked very well for us, and I believe it will help other
libcloud users too, specially for cases like ours.

Regards,
Mahendra