且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

NTFS备用数据流 - 好还是坏主意?

更新时间:2022-11-02 23:06:34

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

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.