Hi folks,
I'm looking at adding multi-file uploading to our ASP.NET MVC
web application. I am going to use the 3rd Party Multi-File uploader Aurigma to handle the actual uploading.
Once each file is 100% received by the web server, it needs to be checked for the following
- is it an image or video.
- if it's an image, does it need to be resized? if so, resize.
- if it's a video, we need to re-encode it to flash (unfortunately.. bring on html5 :) )
- finally, store on S3 amazon.
So i know how to do most of steps 1 to 4 - that's not the question.
My question is: how should I really be handling this workflow? Especially if i get a bulk of media at once -> after all, this is a multi-file uploader :) I don't want to have lots of media getting processed at once (eg. 5 video's getting encoded to flash..).
So I thought i might have MSMQ
installed and when each file gets 100% recieved, then pop it into MSMQ
. That way, only one item is getting processed at once. The cost of this, is that if there's a lot of expensive processing, the queue might actually start to get a few items in there ... and there will be some waiting period from the time an item is uploaded to the site, until it's actually 100% processed. We can easily handle this in the UI to tell them it's not finished yet.
So - does this sound like an OK way to handle this problem?
Secondly, this is in a web farm scenario .. so installation / deployment / maintenance needs to be considered.
Would love to see what other people are thinking.