views:

60

answers:

2

I am working on an application that creates video files and stores them in a folder in the C:\ drive. I speculate that there will be a large number of these files in the future and we would run out of disk space at some point of time (on our VPS). When the time comes that we have to upgrade, we either plan to use one of the Cloud providers to store files or our existing provider can add another disk (say D:\ drive).

Either way, I would want to design the app now in a way that in future, moving to different locations would not be an issue and would be transparent to the end user.

The code that creates these files supports 2 ways:

myObj.SetOutputToDisk(<path to store>); or
myObj.SetOutputToMemoryStream(ms);

If we go with the Cloud architecture, I assume we might have the following combination:

  • Cloud Files + Existing VPS or
  • Cloud Files + Cloud Windows Server

Given the unknowns at this time, how would I go about designing this?

A: 

Serve the files up from a subdomain. Say: media.yourdomain.com.

That way, you can trivially repoint DNS records to the new storage provider at some point in the future.

Also, I'd recommend storing the media files on another physical disk to the OS disk. So have a D:\ drive and store the media there.

Wim Hollebrandse
A: 

You might want to look at the Managed Extensibility Framework as a way of adding extensions to your app for new storage methods without the need to rebuild the whole thing.

You need some way to record the storage location and method used, I'd expect some kind of database store that you could migrate to the cloud later if required.

Your question is very vague, you haven't put much work in yourself and as such you are unlikely to get the level of detail you are hoping for in the answers. At least try to implement the system and then ask specific questions around issues that you are having problems with.

Lazarus
I am sorry I am not being clear. That's mainly because I do not know what future holds for this application. For now, the way it works, I have a app root at C:\MyApp and the files are stored in C:\MyApp\Files\<sub dirs>\file