Performance: accessing a .mp3 to get info or use an database?
I'm doing an project for a broadcasting radio. I've already configured the server and that st开发者_开发技巧uff, and now i'm writing the business layers for the website.
I need to manage directories with .mp3 files. I'll have sub directories for the genre, the type (set, music, etc) and so on.
My doubt if about the .mp3 files information. Should i store the information of .mp3 file (the length, quality, etc) on a database or access directly to the mp3 to read that information?
I'm asking this because the .mp3 files will be used for the playlists of the radio, and they also will be downloaded from users, so i don't know if in performance it's worst to access the file.
What do you think?
I was thinking to use RavenDB. For what i've read could be a good solution because it's a document database.
Thanks
Use a database.
You can access the metadata in an mp3 file to get the information for one item, but if you are searching for something then it's clearly not an option. Somebody has to create those playlists and he definitely needs search capabilities.
精彩评论