开发者

what's the best for File System of Web application?

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开发者_Python百科 go for it in terms of lookup speed and performance.

Thanks in advance for the help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜