Image Recommendations

  • Thread starter Thread starter Brent
  • Start date Start date
B

Brent

Hi eveyrone. I am writing a client/server application that has to deal with
displaying images to the user. The user will have the ability to add images
to entries. Ok im kind of looking for a best practice here on what to do
with the images. I am using SQL Server 2005 and i know that i do not want to
store the images in blog fields in sql server. That is a definite. What
other choices do i have here? Maybe you can binary serialize the image and
use either remoting or web services to send the image over the wire and
store it in a directory. The directory location would be located in sql
server. This seems like a plausable solution but seems quite messy. What
other solutions are there? What solution do you think is the best? If i end
up doing the solution i came up with then i would have to include that part
in the database transaction and it could be asynchronous because if the
saving of the image fails i also want to fail the transaction. Just looking
for some ideas here guys. I didn't know what other newsgroup would be
fitting since this is a general question.

Thanks,
Brent
 
Because of database caching. Unless things have changed with SQL Server 2005
from 2000 anything you retrieve is cached. This is pretty much global to all
databases that live on that instance of sql server. Now do you want large
images being cached and taking up precious cache space? I think this would
be a poor use of sql servers cache space and could possibly really hurt how
much your application could scale. I want my cache to only hold non-binary
data. I don't want a huge image to wipe out my data cache. Yes im sure in a
lot of systems it wouldn't cause a problem but i generally like to follow a
best practice senario.

Brent
 
In that case, you will need to wrap both the database update and file
update in a single transaction scope. Since there is no automatic
rollback for file updates, you will have to create a compensation to
rollback the file changes if a rollback occurs.

Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
 
Back
Top