My first CodePlex Project is an attempt to bring iOS streaming and resuming downloads to ASP.NET MVC.
In my previous post I discussed how I’d hacked together a quick solution to bring resuming download capability to dynamic MVC content. Though I got some credit on StackOverflow for coming up with that solution I wasn’t terribly happy with how patched together it was and how little support it had for the fully HTTP protocol specification for Content-Range requests.
I mulled it over for awhile and did some searching and finally came up with more information about the specification, applications that use it and examples of how to solve the problem for static files. The best solution I found was an adaptation of a conversion. Rather than further tweaking the solution and trying to force it to fit in the context of an ASP.NET MVC application framework I decided to do a clean implementation using the framework features.
I thought my initial instinct about the design was correct: use an ActionFilter to examine the request headers for a partial data request and a custom Result to output the data and necessary headers. I kept this structure but expanded on how I parsed the ranges and output different results based on the request. The new design would remove almost all of the effort required for a developer to implement the solution.
In the end the new solution took a little over a day to implement and get working with an iPad streaming a video. After a few more hours of tweaking I think I arrived at a better and cleaner solution that should be easily extensible without requiring any modification in order to be useful for common scenarios. It was also more dynamic and more capable than the original solution by adding support for multiple ranges in a single request and adjusted the output result to suit the request without requiring higher-level intervention.
I think it’s a pretty good solution and it could be helpful to someone. I would like to see it extended and become even more useful. The only way I could realistically see this happening is to make the source publicly available and see how it matures. So with that in mind, I took the plunge and I now have my first CodePlex project.
Please be kind. This is my first project. I look forward to see how it’s received and whether other people find it useful!