Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2008, 03:58 AM
Authorized User
 
Join Date: Apr 2006
Posts: 79
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to anujrathi Send a message via MSN to anujrathi Send a message via Yahoo to anujrathi
Default Images in database

Hi Experts,
          We are going to create Photo Printing & Social Networking site like Shutterfly.com,picsqare.com,kodakgallery.com,faceb ook.com.

Everything is running fine. But Now I am facing some problems.

When user Upload several(no limit) his/her Photo(s), I save those photo in Sql Server Database in Image datatype. & we are saving three sizes of every image. (one is original, second is thumbnail size & third one is larger then thumbnail and smaller then original)

I have some reason to save Images in sql Server.
1. In database it will take a little bit storage space.
2. We can take backup easilly of whole data.

but the main issue in this process is that we have to create images in everypage, everytime with the help of HttpHandler from byte array to image(.net datatype). & this will be a costly process when traffic will increase.

So now i am thinking to save uploaded images in our web server & image path in sql server database.
But in this process,there is an issue related to Image size. Because If save image physically then it will take its original size(may be in MB). Means if there are 1000 users & each user upload 20 MB data then it will take more then 1000x20 MB data.(because we have to save three sizes).

Facebook saves 5 sizes of every image. But i dont know that how they are saving images(in database or in web server).

Pls guide me experts !

Regards,
Anuj Rathi
 
Old January 22nd, 2008, 05:28 AM
Authorized User
 
Join Date: Sep 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check out asynchronous HTTP handler

http://msdn2.microsoft.com/en-us/library/system.web.ihttpasynchandler(VS.80).aspx

I think it should alleviate your pains a little. Then there's possibility to use separate caching servers to cache images. At least I've header so, I've never done it myself. I found this article with google, maybe it helps.

http://msdn.microsoft.com/msdnmag/is...s/default.aspx

Also you could check out how the big boys do it. I think I once saw an article how MySpace handles it's enormous data flow. Couldn't find it in Google though.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Images from and Save Images to a Database cyndie VB.NET 2 August 17th, 2008 06:42 AM
Images to Database Eyob_the_pro C# 3 January 10th, 2007 01:52 PM
Images in Database ldoodle Classic ASP Databases 0 April 24th, 2006 03:28 AM
Images in a database rayncarnation Access 1 October 15th, 2005 02:30 PM
images and database Lucian Ion Classic ASP Databases 0 July 1st, 2005 11:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.