I've been focusing on creating personal files server that may go ahead and take load removed from the main website, and serve images/files over the internet towards the client.
Primary goals from the file server:
- Remove load from primary server hosting the website
- Reuse the present web server code base and steer clear of duplication of code/logic for better maintainability
- Being scalable for growing downloads
- Hide real download url path from user
By continuing to keep above in your mind, i possibly could develop two approaches. Sequence diagram representation of these two processes for easy understanding [apologies for that skewed utilization of sequence diagram]. Neither from the approaches would satisfy my goals.
Which of those approaches can you recommend thinking about my goals?
It is possible to better third approach?
A few of the variations, i possibly could think about:
- Approach #1 would lead to copying BL code leading to maintainability issues
- Approach #2 would reuse code and centralize BL reducing maintainability issues
- Approach #1 would reduce network calls while #2 increases them
The idea of file servers, scalability of downloads, bandwidth distribution have had the experience for some time now. Please share your ideas!
Approach #1 looks very attractive because it takes the burden from the primary server completely. The only real problem to deal with in #1 may be the code duplication and maintainability issues. This may be overcome by getting only one work for BL/DAC composed of the functionality needed by both web service and file server. And, reference the set up/library both in web service and file server projects. Now, there's just one BL/DAC code to keep as well as eliminates the network calls in approach #2.
By serving images/files towards the client, I suppose you mean static files css, js etc.
More often than not, an easy solution is the greatest solution. Just host them on the different server within different subdomin, i.e. http://content.mydomain.com/img/abc.digital. You can host them in a data center on devoted server giving your perforamace (near to the backbone), you can load balance the url by have 2+ servers at 2+ different data centers, providing you with resilliance and scalability.
You maintence task will be getting todo look for a replace when marketing your website to reside to exchange dev/uat content pathways using the live content path (tho you'd just have todo this in css files while you could keep pathways for content used within aspx files as config data).