A
A
Artem Nemtsov2019-08-09 08:30:23
.NET
Artem Nemtsov, 2019-08-09 08:30:23

How to organize the storage of audio files for a server project?

Hello!
Using the ASP.NET.CORE technology with MVC, you need to develop a server for listening to audio files that will be used by many users. How to properly organize the storage of audio files?
There are several options:
1) Store audio in folders, storing path values ​​in the database (Which is not correct in my opinion!)
2) Store in a NO-SQL database, such as MongoDB. If you choose this path, is it possible to conveniently use only this database to run the entire server, without an additional sql database, such as Postgres, etc.
3) Use a third party server like Minio.
4) Another option
Please suggest your own version and write why this is the best way to organize the storage of audio files for this project.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
ArgosX, 2019-08-09
@ArtemNemtsov

1) Store audio in folders, saving path values ​​in the database (Which is not correct in my opinion!)
It is your opinion that is not correct

R
raiboon, 2019-08-09
@raiboon

Simply storing on hard drives is inconvenient and not very reliable.
Whom did ceph, minio, Gridfs, riakcs, etc develop for?
In general, if possible, then s3 or analogues from competitors are better.
But if you want to have full control over the infrastructure, then just choose the right solution.

R
Roman Mirilaczvili, 2019-08-09
@2ord

Storing audio files locally on the server in a separate folder is a poorly scalable solution, although it will do for a start.
As raiboon pointed out , it's better to use the S3 protocol. Cloud hosting is better, because you still need to properly distribute content so that a separate server (or servers) responsible for distributing content is responsible for distributing content, and all this is quickly scalable. The business logic of the web application will then be located separately from the content delivery servers.
When creating an audio file object, you can generate a GUID and use it as an identifier to search the collection. A separate component may be responsible for building the path to the file object in S3 by the GUID you are looking for, it will also include the bucket , region.
The path prefix will be constant, like this:
Suffix - <GUID>
If you do everything a little (at home), then you can store files in the DBMS, of course. Files are best served by a caching server: Nginx, Varnish, etc. When choosing Minio, RiakCS, Ceph, deployment and support of the infrastructure falls on the shoulders of the system. admin and this must be taken into account.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question