Web应用程序的文件系统最好的是什么?
我面临着与文件系统设计相关的问题,我非常感谢文件系统方面的任何专业意见以及在网络应用程序中上传文件所付出的努力。我们需要的是在两个或多个选项中决定如何设计文件系统结构,以及如何选择最佳的结构标准。
该系统是学术系统,允许用户将文件作为系统帖子中的附件上传。我们的重点是设计存储文件所需的文件系统的层次结构。请注意,系统将通过文件结构调整大量文件。
按照约定,找到了两种解决方案,将 URL 和文件属性存储在数据库中,并将文件存储在该层次结构中:
User -> xx_user -> posts -> xx_post -> files attached to xx_post
Class-> xx_class -> tasks -> xx_task -> files attached to xx_task
或
Tasks -> xx_task -> files attached to xx_task
Posts -> xx_post -> files attached to xx_post
注意:xx 表示 id
- 情况一:每个文件夹中的文件数量较少,但文件夹数量较多。
- 情况二:每个文件夹中的文件数量很大,但层次结构和文件夹数量减少
因此,哪一种是为 可扩展 Web 应用程序 实现此目的的最佳方法,请注意,这只是介绍为的文件系统的一部分例子。如果您选择其中之一,请向我解释为什么我应该在查找速度和性能方面选择它。
预先感谢您的帮助。
I'm facing problem related to file system design and I really appreciate the effort from any professional opinion in file system and upload files in web application. what we need is to decide between two or more option how to design the file system structure, and how to choose the best structure criteria.
the system is academic system that allow users to upload files as attachment within posts in the system. our focus is to design the hierarchy of the file system needed to store files. notice that the system will be adapting large amount of files through the file structure.
as agreed, two solution where found, storing URL and file attributes in DB, and storing the files in this hierarchy:
User -> xx_user -> posts -> xx_post -> files attached to xx_post
Class-> xx_class -> tasks -> xx_task -> files attached to xx_task
or
Tasks -> xx_task -> files attached to xx_task
Posts -> xx_post -> files attached to xx_post
note: xx means id
- In case one: small number of files in every folders but large number of folders.
- In case two: large number of files in every folders but reduced hierarchy and folders number
So, which one is the best approach for implementing this for Scalable Web Application , note this is only part of file system introduced as example. if you would choose one, please explain to me why should I go for it in terms of lookup speed and performance.
Thanks in advance for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论