NTFS备用数据流 - 好还是坏主意? [英] NTFS Alternate Data Streams - Good or bad Idea?

查看:347
本文介绍了NTFS备用数据流 - 好还是坏主意?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想存储一些应用程序相关的元数据文件和NTFS备用数据流(AltDS),让我直接存储元数据的文件,而不是在一个单独的数据库中。

I would like to store some Application-Related Metadata for Files, and NTFS Alternate Data Streams (AltDS) would allow me to store this metadata directly on the files rather than in a separate database.

我不觉得这是一个好主意。我知道,这仅适用于NTFS,但至少如果用户拷贝/将文件移动到非NTFS驱动器,他们从Windows(是啊,是啊,没有人阅读警告,我知道)得到一个警告 -

I just don't feel like this is a good idea. I know that this only works on NTFS, but at least if the user copies/moves the files to a Non-NTFS drive they get a Warning from Windows (yeah, yeah, no one reads warnings, I know)-

但同时,存储在文件上附加的数据可能会变得非常浪费的,因为如果我的申请被卸载AltDS保持均匀。这就像十年前使用的注册表清洁工的人从注册表(当清洁剂清洗太多...和更不稳定)卸载程序,使他们的系统运行速度更快后删除无用的项目。

But also, storing additional data on a file can become very wasteful, as the AltDS stay even if my Application is uninstalled. It's like a decade ago when people used "Registry Cleaners" to remove useless entries from the registry after uninstalling a program to make their system run faster (and less stable when the cleaner cleaned too much...).

我只是不知道他们什么都可以的使用合理的呢?他们应该完全留给微软应用程序使用?或者是有某种共同的政策什么类型的应用程序可以使用它们(除了恶意软件)?

I just wonder what they can be reasonably used for? Should they be completely left for Microsoft Apps to use? Or is there some sort of common policy what types of apps may use them (apart from malware)?

编辑:的只是为了澄清什么的我的的想法。我在写一个小文件管理系统为自己的早期阶段。因为我希望有移动文件的自由,我想存储上的文件元数据,以便如果我移动/重命名/修改它们,我的应用程序仍可以识别它们。这既可以是整个元数据或只是一个GUID,与一个单独的数据库中运行。

Just to clarify what my idea was. I'm in the early stages of writing a small document management system for myself. Because I want to have the freedom to move files around, I want to store metadata on the file so that if I move/rename/modify them, my app still recognizes them. It could either be the entire Metadata or just a GUID that works with a separate database.

要总结点给出:

优点:


  • 元数据与文件移动,所以没有必要通过散列或文件名承认它

  • 适用于所有的文件类型,甚至.txt文件在哪里这是不可能的任何数据存储在文件本身

缺点:


  • 仅适用于NTFS这可能不是在未来的Windows版本的默认文件系统

    • 虽然这让我感到吃惊,如果MS不会自动转换他们,如果他们曾经得到的WinFS一起


    • 大多数U盘是FAT32。许多私人文件服务器是Linux系统。从互联网上下载一个文件应该只传输文件,但不流。简而言之:这是相当容易失去他们

    推荐答案

    这很难不约你存储数据的类型更多信息的话。你似乎了解一些涉及其使用的关注,所以我不知道我有多少帮助。这里有备用数据流我的总体思路,但是:

    It's hard to say without more information about the kind of data you're storing. You seem to be aware of some of the concerns involving their use, so I'm not sure how much I can help. Here's my general thoughts on alternate data streams, though:

    首先,因为你已经注意到,AD流仅适用于NTFS工作。如果有你需要存储在一个FAT文件系统元数据的任何机会,你需要某种形式的后备机制。现代PC将可能有NTFS格式化内置硬盘驱动器,但你遇到大​​多数USB闪存驱动器仍然是FAT格式。记住这一点,如果你的用户将被存储在闪存驱动器的数据文件。

    First of all, as you've noted, AD streams only work on NTFS. If there's any chance you'll need to store this metadata on a FAT filesystem, you'll need some kind of fallback mechanism. Modern PCs will probably have NTFS-formatted internal hard drives, but most USB flash drives you encounter are still FAT-formatted. Keep that in mind if your users will be storing data files on flash drives.

    除此之外,我想不出任何技术上的原因,以避免AD流,但我还是要小心使用他们。人们往往担心应用程序隐藏的数据从他们身上,无论意图。考虑索尼的rootkit惨败,等等。我不是说你的应用是近那样糟糕任何地方,但人们(尤其是不太精通技术)可能无法分辨出区别。不过,我将让他们可能对你的应用程序的有效使用。离开AD的问题背后流卸载之后还是很实在的,当然。你可能要考虑给人运行卸载程序运行一个程序来搜索自己的驱动器(S),并清理任何剩余流的选项。

    Aside from that, I can't think of any technological reasons to avoid AD streams, but I'd still be wary of using them. People tend to be nervous about applications that "hide" data from them, regardless of the intent. Consider the Sony rootkit fiasco, and so on. I'm not saying your application is anywhere near as bad as that, but people (especially the less tech-savvy) may not make out the distinction. Still, I will allow that they might have a valid use for your application. The problem of leaving the AD streams behind after uninstallation is still very real, of course. You might want to consider giving people running the uninstaller the option of running a program to search their drive(s) and clean up any remaining streams.

    另外,记得 KISS原则。是利用AD流的真正有效地解决您的应用程序的元数据存储问题,最简单的方法?如果是这样,也许公元流是一个好主意,但是,如果没有,我会认真考虑采取另一种方法。

    Also, remember the KISS principle. Is the use of AD streams really the simplest way to effectively solve your application's metadata storage problem? If so, maybe AD streams are a good idea, but, if not, I'd seriously consider taking another approach.

    这篇关于NTFS备用数据流 - 好还是坏主意?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆