是否可以通过符号链接到Blob数据

是否可以通过符号链接到Blob数据

本文介绍了使用Azure存储来避免重复的Blob时,是否可以通过符号链接到Blob数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到这样的情况:用户将文件附加到应用程序中,然后将这些文件持久存储到Azure Blob存储中,很有可能会出现重复项,并且我想采用一种解决方案,其中重复项避免斑点.

I have a situation where a user is attaching files within an application, these files are then persisted to Azure Blob storage, there is a reasonable likelihood that there are going to be duplicates and I want to put in place a solution where duplicate blobs are avoided.

我的第一个想法是将blob命名为 filename_hash ,但这仅捕获了一部分重复项,然后接下来想到了 filesize_hash .

My first thought is to just name the blob as filename_hash but that only captures a subset of duplicates, then filesize_hash was then next thought.

尽管这样做似乎使我失去了Blob存储来表示文件层次结构中位置的灵活性,请参见:

In doing this though it seems like I am losing some of the flexibility of the blob storage to represent the position in a hierarchy of the file, see: Windows Azure: How to create sub directory in a blob container

所以我一直在寻找是否有一种方法可以创建一个引用该blob数据的blob,即某些用于符号链接,但找不到我想要的东西.

So I was looking to see if there was a way to create a blob that referenced the blob data i.e. some for of symbolic link but couldn't find what I wanted.

我缺少什么吗?还是应该使用 filesize_hash 方法并使用替代方法存储层次结构.

Am I missing something or should I just go with filesize_hash method and store my hierarchy using an alternative method.

推荐答案

不,没有符号链接(来源: http://social.msdn.microsoft.com/Forums/vi-VN/windowsazuredata/thread/6e5fa93a-0d09-44a8-82cf-a3403a695922 ).

No, there's no symbolic links (source: http://social.msdn.microsoft.com/Forums/vi-VN/windowsazuredata/thread/6e5fa93a-0d09-44a8-82cf-a3403a695922).

一个好的解决方案取决于文件的预期大小和重复项的数量.如果不会有太多重复项,或者文件很小,那么使用它实际上可能会更快,更便宜-与开发成本相比,每月每GB 0.15美元不是什么大笔钱! (这就是我们采用的方法.)

A good solution depends on the anticipated size of the files and the number of duplicates. If there aren't going to be many duplicates, or the files are small, then it may actually be quicker and cheaper to live with it - $0.15 per gigabyte per month is not a great deal to pay, compared to the development cost! (That's the approach we're taking.)

如果值得删除重复项,我将使用表存储在文件名和数据的实际位置之间创建某种重定向.然后,我将执行客户端重定向,以重定向客户端的浏览器以下载正确的版本.

If it was worthwhile to remove duplicates I'd use table storage to create some kind of redirection between the file name and the actual location of the data. I'd then do a client-side redirect to redirect the client's browser to download the proper version.

如果这样做,您将希望保留文件名(因为这对用户是可见的),但是您可以根据需要调用文件夹"位置.

If you do this you'll want to preserve the file name (as that will be what's visible to the user) but you can call the "folder" location what you want.

这篇关于使用Azure存储来避免重复的Blob时,是否可以通过符号链接到Blob数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 20:41