My task is to develop an Image server, that will:
- load images from disk
- resize it, according to HTTP parameter
- apply one or more watermarks to the original image
The question is what technology should I use, I am going to do it with IHttpHandler, but I wonder if using IHttpAsyncHandler will be faster for this scenario?
Can I benefit from processing images asynchronously in IHttpHandler?
Also maybe I should consider some high level framework e.g. NancyFx or just return the images from controller (MVC2)?
Asynchronous IO does not make IO faster in any way. It unblocks a thread while that IO runs. All CPU work that is being performed is not impacted at all.
In some cases it is a good idea to use async IO to unblock threads, in others it is a waste of dev time with no benefit to customers whatsoever. Do you expect a high number of concurrent image downloads (like 100 (at the same time!))? Then async IO can be of benefit.
Probably, you should not be using
IHttpHandlerfor anything. Use MVC.