Re: [ACFUG Discuss] Image from DB
And the point of doing this is? You wouldn't be saving any real bandwidth by doing it in a single request. The size of the data is the size of the data, regardless of the number of requests. You'd just be saving requests. Shawn Gorrell Web Development Applications Architect Federal Reserve Bank - Atlanta Office (404) 498-8449 Derrick Peavy <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 09:34 AM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
RE: [ACFUG Discuss] Image from DB
I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
RE: [ACFUG Discuss] Image from DB
I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
RE: [ACFUG Discuss] Image from DB
"Consider it an experiment - I know that it may seem a bit silly." "Fennell, Mark P." <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 10:21 AM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
RE: [ACFUG Discuss] Image from DB
Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 10:22 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
Re: [ACFUG Discuss] Image from DB
This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with a foreign key that you would only use for that web service. Now for the webservice, wouldn't you want to return the lowest common denomenator of data? If you are returning HTML or something that needs to reference the image, it is acceptable to have a reference with an absolute URL back to your server. The benefit here is that the web service is consumed quicker, but the page load would be based on the network retrieving the data. In addition, you would want inside of your web service a way not to return the image that would even speed up the browsing unless the user really wants the image. Teddy On 1/18/07, Fennell, Mark P. <[EMAIL PROTECTED]> wrote: I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of *John Mason *Sent:* Thursday, January 18, 2007 10:16 AM *To:* discussion@acfug.org *Subject:* RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Peavy *Sent:* Thursday, January 18, 2007 9:35 AM *To:* discussion@acfug.org *Subject:* [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ *Derrick Peavy* *Sales and Web Services * *Universal Advertising* *Phone: 404-786-5036* *Fax: 404-370-0470 * http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com *___* - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform<http://www.acfug.org/?fa=login.edituserform> For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com/> - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform<http://www.acfug.org/?fa=login.edituserform> For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com/> - -- Adobe Certified ColdFusion MX 7 Developer Atlanta CFUG (ACFUG): http://www.acfug.org - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
Re: [ACFUG Discuss] Image from DB
Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with a foreign key that you would only use for that web service. Now for the webservice, wouldn't you want to return the lowest common denomenator of data? If you are returning HTML or something that needs to reference the image, it is acceptable to have a reference with an absolute URL back to your server. The benefit here is that the web service is consumed quicker, but the page load would be based on the network retrieving the data. In addition, you would want inside of your web service a way not to return the image that would even speed up the browsing unless the user really wants the image. Teddy On 1/18/07, Fennell, Mark P. <[EMAIL PROTECTED]> wrote: I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString (), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink - - To unsubscribe from this list, manage your profile @ http://www.acfug.org
RE: [ACFUG Discuss] Image from DB
Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with a foreign key that you would only use for that web service. Now for the webservice, wouldn't you want to return the lowest common denomenator of data? If you are returning HTML or something that needs to reference the image, it is acceptable to have a reference with an absolute URL back to your server. The benefit here is that the web service is consumed quicker, but the page load would be based on the network retrieving the data. In addition, you would want inside of your web service a way not to return the image that would even speed up the browsing unless the user really wants the image. Teddy On 1/18/07, Fennell, Mark P. <[EMAIL PROTECTED]> wrote: I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.unive
RE: [ACFUG Discuss] Image from DB
In that case, why not save the entire page html, images, etc. in the database then use one cfquery and one cfoutput with a cfcontent type=text/html...? And with equal respect and forgiveness, an experiment without a why or what if, is little more than a stunt. It's usually easier to find a solution if you can identify the problem, pose the hypothesis, conduct the experiment and then extrapolate a conclusion. :) mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with a foreign key that you would only use for that web service. Now for the webservice, wouldn't you want to return the lowest common denomenator of data? If you are returning HTML or something that needs to reference the image, it is acceptable to have a reference with an absolute URL back to your server. The benefit here is that the web service is consumed quicker, but the page load would be based on the network retrieving the data. In addition, you would want inside of your web service a way not to return the image that would even speed up the browsing unless the user really wants the image. Teddy On 1/18/07, Fennell, Mark P. < [EMAIL PROTECTED]> wrote: I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services U
RE: [ACFUG Discuss] Image from DB
Additionally, I think HTTP 1.1 allows connection keep-alives so that you only make one http call for the entire page. Right? mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 12:03 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with a foreign key that you would only use for that web service. Now for the webservice, wouldn't you want to return the lowest common denomenator of data? If you are returning HTML or something that needs to reference the image, it is acceptable to have a reference with an absolute URL back to your server. The benefit here is that the web service is consumed quicker, but the page load would be based on the network retrieving the data. In addition, you would want inside of your web service a way not to return the image that would even speed up the browsing unless the user really wants the image. Teddy On 1/18/07, Fennell, Mark P. < [EMAIL PROTECTED]> wrote: I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an erro
RE: [ACFUG Discuss] Image from DB
Yes, you only need the server to run http 1.1 which most do. Also the browser should be able to accept that (which most do) and the browser has to not send a close command which at times they do. A lot of things are controlled by the user in this situation. Whether accepting a open keep-alive http connection or http compression. Lucky a lot of this is already taken care of from the server end. Storing the images in the db or on the file system isn't going to change anything there and the end client browser really for the most part doesn't care. John _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 12:07 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Additionally, I think HTTP 1.1 allows connection keep-alives so that you only make one http call for the entire page. Right? mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 12:03 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with a foreign key that you would only use for that web service. Now for the webservice, wouldn't you want to return the lowest common denomenator of data? If you are returning HTML or something that needs to reference the image, it is acceptable to have a reference with an absolute URL back to your server. The benefit here is that the web service is consumed quicker, but the page load would be based on the network retrieving the data. In addition, you would want inside of your web service a way not to return the image that would even speed up the browsing unless the user really wants the image. Teddy On 1/18/07, Fennell, Mark P. <[EMAIL PROTECTED]> wrote: I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to
Re: [ACFUG Discuss] Image from DB
Thank you again - everyone! I think (by virtue of forcing the question), that the answer is that what I want to do is not really worth it or might best be done with the keep-alive option. The goal, again a theoretical one, is to reduce the number of http requests as that really is the biggest bottleneck on line these days (files needed to construct one page, images, external Jscript, Google ads, and scripts, etc.). An interesting article: http://ajaxian.com/archives/yahoo-performance- engineers-discuss-what-the-8020-rule-tells-us-about-reducing-http- requests As I have reduced my https request I have seen faster page loads via third party testing. But at this point, I think I am as far as can be reasonably done. The reason I don't like the CFCONTENT option is that in fact the entire page output does have to be sent. I cannot simply include a CFM file which retrieves the image and puts it in the page as the rest of the page does not process after the CFCONTENT. As for putting the entire page in the DB, no, I think that's not appropriate. Just thought, maybe someone had done this and that you could spit out 1.5 or 4.4 k images just like data and speed things up. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 12:45 PM, John Mason wrote: Yes, you only need the server to run http 1.1 which most do. Also the browser should be able to accept that (which most do) and the browser has to not send a close command which at times they do. A lot of things are controlled by the user in this situation. Whether accepting a open keep-alive http connection or http compression. Lucky a lot of this is already taken care of from the server end. Storing the images in the db or on the file system isn't going to change anything there and the end client browser really for the most part doesn't care. John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 12:07 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Additionally, I think HTTP 1.1 allows connection keep-alives so that you only make one http call for the entire page. Right? mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 12:03 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with a foreign key that you would only use for that web service. Now for the webservice, wouldn't you want to return the lowest common denomenator of data? If you are returning HTML or something that needs to reference the image, it is acceptable to have a reference with an absolute URL back to your server. The benefit here is that the web service is consumed quicker, but the page load would be based on the network retrieving the data. In addition, y
Re: [ACFUG Discuss] Image from DB
On 1/18/07, Derrick Peavy <[EMAIL PROTECTED]> wrote: Thank you again - everyone! I think (by virtue of forcing the question), that the answer is that what I want to do is not really worth it or might best be done with the keep-alive option. The goal, again a theoretical one, is to reduce the number of http requests as that really is the biggest bottleneck on line these days (files needed to construct one page, images, external Jscript, Google ads, and scripts, etc.). An interesting article: http://ajaxian.com/archives/yahoo-performance-engineers-discuss-what-the-8020-rule-tells-us-about-reducing-http-requests As I have reduced my https request I have seen faster page loads via third party testing. But at this point, I think I am as far as can be reasonably done. The reason I don't like the CFCONTENT option is that in fact the entire page output does have to be sent. I cannot simply include a CFM file which retrieves the image and puts it in the page as the rest of the page does not process after the CFCONTENT. As for putting the entire page in the DB, no, I think that's not appropriate. Just thought, maybe someone had done this and that you could spit out 1.5or 4.4 k images just like data and speed things up. I'm no reader of RPCs on HTTP or anything, but this does not sound possible. What it sounds like you are trying to do is deliver the binary data for a image inline with the HTML. To the best of my knowledge that isn't a reality. For emails maybe, but not a web browser. _ *Derrick Peavy* *Sales and Web Services * *Universal Advertising* *Phone: 404-786-5036* *Fax: 404-370-0470 * http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com *___* On Jan 18, 2007, at 12:45 PM, John Mason wrote: Yes, you only need the server to run http 1.1 which most do. Also the browser should be able to accept that (which most do) and the browser has to not send a close command which at times they do. A lot of things are controlled by the user in this situation. Whether accepting a open keep-alive http connection or http compression. Lucky a lot of this is already taken care of from the server end. Storing the images in the db or on the file system isn't going to change anything there and the end client browser really for the most part doesn't care. John -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>] *On Behalf Of *Fennell, Mark P. *Sent:* Thursday, January 18, 2007 12:07 PM *To:* discussion@acfug.org *Subject:* RE: [ACFUG Discuss] Image from DB Additionally, I think HTTP 1.1 allows connection keep-alives so that you only make one http call for the entire page. Right? mf -Original Message- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>]*On Behalf Of *John Mason *Sent:* Thursday, January 18, 2007 12:03 PM *To:* discussion@acfug.org *Subject:* RE: [ACFUG Discuss] Image from DB Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>] *On Behalf Of *Derrick Peavy *Sent:* Thursday, January 18, 2007 11:56 AM *To:* discussion@acfug.org *Subject:* Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ *Derrick Peavy* *Sales and Web Services * *Universal Advertising* *Phone: 404-786-5036* *Fax: 404-370-0470 * http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com *___* On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one technique to reduce up front cost of a BLOB and that is to have a BLOB table. The table would not be a part of the primary table, so you would not intefere with indexing and collation. You would have a normalized table with
Re: [ACFUG Discuss] Image from DB
Douglas, yep. You nailed it. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 1:38 PM, Douglas Knudsen wrote: On 1/18/07, Derrick Peavy <[EMAIL PROTECTED]> wrote: Thank you again - everyone! I think (by virtue of forcing the question), that the answer is that what I want to do is not really worth it or might best be done with the keep-alive option. The goal, again a theoretical one, is to reduce the number of http requests as that really is the biggest bottleneck on line these days (files needed to construct one page, images, external Jscript, Google ads, and scripts, etc.). An interesting article: http://ajaxian.com/archives/yahoo- performance-engineers-discuss-what-the-8020-rule-tells-us-about- reducing-http-requests As I have reduced my https request I have seen faster page loads via third party testing. But at this point, I think I am as far as can be reasonably done. The reason I don't like the CFCONTENT option is that in fact the entire page output does have to be sent. I cannot simply include a CFM file which retrieves the image and puts it in the page as the rest of the page does not process after the CFCONTENT. As for putting the entire page in the DB, no, I think that's not appropriate. Just thought, maybe someone had done this and that you could spit out 1.5 or 4.4 k images just like data and speed things up. I'm no reader of RPCs on HTTP or anything, but this does not sound possible. What it sounds like you are trying to do is deliver the binary data for a image inline with the HTML. To the best of my knowledge that isn't a reality. For emails maybe, but not a web browser. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 12:45 PM, John Mason wrote: Yes, you only need the server to run http 1.1 which most do. Also the browser should be able to accept that (which most do) and the browser has to not send a close command which at times they do. A lot of things are controlled by the user in this situation. Whether accepting a open keep-alive http connection or http compression. Lucky a lot of this is already taken care of from the server end. Storing the images in the db or on the file system isn't going to change anything there and the end client browser really for the most part doesn't care. John From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 12:07 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Additionally, I think HTTP 1.1 allows connection keep-alives so that you only make one http call for the entire page. Right? mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 12:03 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL? Any takers for that? _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 10:32 AM, Teddy Payne wrote: This seems to be asked often about images and BLOBs. I know you are testing an idea out and maybe you can get it to work somehow, but from a data perspective you just don't want to use a BLOB. There is only one tec
RE: [ACFUG Discuss] Image from DB
Right--so to be clear Derrick is looking to not use the tag but to instead use some other mechanism such that the image isn't a separate file that is referenced (as is the case with the tag) but is actually part of the HTML itself. I don't know a technique for that--does anyone else? Josh _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 2:24 PM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Douglas, yep. You nailed it. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 1:38 PM, Douglas Knudsen wrote: On 1/18/07, Derrick Peavy <[EMAIL PROTECTED]> wrote: Thank you again - everyone! I think (by virtue of forcing the question), that the answer is that what I want to do is not really worth it or might best be done with the keep-alive option. The goal, again a theoretical one, is to reduce the number of http requests as that really is the biggest bottleneck on line these days (files needed to construct one page, images, external Jscript, Google ads, and scripts, etc.). An interesting article: http://ajaxian.com/archives/yahoo-performance-engineers-discuss-what-the-802 0-rule-tells-us-about-reducing-http-requests As I have reduced my https request I have seen faster page loads via third party testing. But at this point, I think I am as far as can be reasonably done. The reason I don't like the CFCONTENT option is that in fact the entire page output does have to be sent. I cannot simply include a CFM file which retrieves the image and puts it in the page as the rest of the page does not process after the CFCONTENT. As for putting the entire page in the DB, no, I think that's not appropriate. Just thought, maybe someone had done this and that you could spit out 1.5 or 4.4 k images just like data and speed things up. I'm no reader of RPCs on HTTP or anything, but this does not sound possible. What it sounds like you are trying to do is deliver the binary data for a image inline with the HTML. To the best of my knowledge that isn't a reality. For emails maybe, but not a web browser. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 12:45 PM, John Mason wrote: Yes, you only need the server to run http 1.1 which most do. Also the browser should be able to accept that (which most do) and the browser has to not send a close command which at times they do. A lot of things are controlled by the user in this situation. Whether accepting a open keep-alive http connection or http compression. Lucky a lot of this is already taken care of from the server end. Storing the images in the db or on the file system isn't going to change anything there and the end client browser really for the most part doesn't care. John _ From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 12:07 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Additionally, I think HTTP 1.1 allows connection keep-alives so that you only make one http call for the entire page. Right? mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 12:03 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," please forgive, but the "Why" of why I want to do this is not part of the answer. 2. Don't really need a discussion about the database design or benefits of A or B 3. Looking for an answer to the question - How to get image in DB, image out of DB, using CF and MySQL
RE: [ACFUG Discuss] Image from DB
Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using , you can implement all the same security you would for any other resource your app serves up. Josh _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:27 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 10:22 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Arch
RE: [ACFUG Discuss] Image from DB
I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using , you can implement all the same security you would for any other resource your app serves up. Josh _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:27 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 10:22 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ---
RE: [ACFUG Discuss] Image from DB
Let me preface this with, I know squat about the server realm. But would Flash or an applet get you anywhere? Some sort of caching? Just throwing some thoughts out there. mcg Josh Adams <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 02:35 PM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject RE: [ACFUG Discuss] Image from DB Right--so to be clear Derrick is looking to not use the tag but to instead use some other mechanism such that the image isn't a separate file that is referenced (as is the case with the tag) but is actually part of the HTML itself. I don't know a technique for that--does anyone else? Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 2:24 PM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Douglas, yep. You nailed it. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 1:38 PM, Douglas Knudsen wrote: On 1/18/07, Derrick Peavy <[EMAIL PROTECTED]> wrote: Thank you again - everyone! I think (by virtue of forcing the question), that the answer is that what I want to do is not really worth it or might best be done with the keep-alive option. The goal, again a theoretical one, is to reduce the number of http requests as that really is the biggest bottleneck on line these days (files needed to construct one page, images, external Jscript, Google ads, and scripts, etc.). An interesting article: http://ajaxian.com/archives/yahoo-performance-engineers-discuss-what-the-8020-rule-tells-us-about-reducing-http-requests As I have reduced my https request I have seen faster page loads via third party testing. But at this point, I think I am as far as can be reasonably done. The reason I don't like the CFCONTENT option is that in fact the entire page output does have to be sent. I cannot simply include a CFM file which retrieves the image and puts it in the page as the rest of the page does not process after the CFCONTENT. As for putting the entire page in the DB, no, I think that's not appropriate. Just thought, maybe someone had done this and that you could spit out 1.5 or 4.4 k images just like data and speed things up. I'm no reader of RPCs on HTTP or anything, but this does not sound possible. What it sounds like you are trying to do is deliver the binary data for a image inline with the HTML. To the best of my knowledge that isn't a reality. For emails maybe, but not a web browser. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 12:45 PM, John Mason wrote: Yes, you only need the server to run http 1.1 which most do. Also the browser should be able to accept that (which most do) and the browser has to not send a close command which at times they do. A lot of things are controlled by the user in this situation. Whether accepting a open keep-alive http connection or http compression. Lucky a lot of this is already taken care of from the server end. Storing the images in the db or on the file system isn't going to change anything there and the end client browser really for the most part doesn't care. John From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 12:07 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Additionally, I think HTTP 1.1 allows connection keep-alives so that you only make one http call for the entire page. Right? mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 12:03 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Don't get me wrong, I understand it's an experiement and it's fun to try. 1. You're not actually reducing your http requests. <-- My main point with this. 3. You can save the image data in the database as a BLOB and output it onto a page. You'll need to use cfcontent to set the precise MIME type. If you're using IIS 6, the MIME types are much more strict than they use to be. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 11:56 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB Kindly, and with respect to everyone that replied: 1. As I stated, the goal is to reduce http requests, not file sizes. And "this is an experiment," pleas
RE: [ACFUG Discuss] Image from DB
Yes and I've seen a situation where images needed security; it is due to the site's purpose in life. *cough* Tommy *cough* mcg John Mason <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 02:49 PM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using , you can implement all the same security you would for any other resource your app serves up. Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:27 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 10:22 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ - To uns
Re: [ACFUG Discuss] Image from DB
in this case I'd suggest implementing J2EE container security. You can secure any resource this way. DK On 1/18/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: Yes and I've seen a situation where images needed security; it is due to the site's purpose in life. *cough* Tommy *cough* mcg *John Mason <[EMAIL PROTECTED]>* Sent by: [EMAIL PROTECTED] 01/18/2007 02:49 PM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] <[EMAIL PROTECTED]> -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Josh Adams * Sent:* Thursday, January 18, 2007 2:42 PM* To:* [EMAIL PROTECTED] Subject:* RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using , you can implement all the same security you would for any other resource your app serves up. Josh -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *John Mason * Sent:* Thursday, January 18, 2007 10:27 AM* To:* [EMAIL PROTECTED] Subject:* RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Fennell, Mark P.* Sent:* Thursday, January 18, 2007 10:22 AM* To:* [EMAIL PROTECTED] Subject:* RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message-* From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of *John Mason* Sent:* Thursday, January 18, 2007 10:16 AM* To:* [EMAIL PROTECTED] Subject:* RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] <[EMAIL PROTECTED]> -- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Derrick Peavy* Sent:* Thursday, January 18, 2007 9:35 AM* To:* [EMAIL PROTECTED] Subject:* [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFC
RE: [ACFUG Discuss] Image from DB
There are lots of ways to secure images that are delivered from the file system, just as there are lots of ways to secure images delivered out of the DB. The point is that if you're already using a security mechanism created in CFML, then if you deliver an image (be it out of a DB or off a non-web-accessible location of the file system) via CFML, you can use that same security mechanism. Again, it's about not reinventing the wheel. Still, that doesn't mean it's the best approach for all situations. Josh _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Thursday, January 18, 2007 3:13 PM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Image from DB in this case I'd suggest implementing J2EE container security. You can secure any resource this way. DK On 1/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Yes and I've seen a situation where images needed security; it is due to the site's purpose in life. *cough* Tommy *cough* mcg John Mason <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 02:49 PM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using , you can implement all the same security you would for any other resource your app serves up. Josh _ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:27 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John _ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 10:22 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ]On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf
RE: [ACFUG Discuss] Image from DB
Sure it's data management. You could keep text data on the file system too but you typically don't--unless maybe it's a lot of text, right? Images are no different--if they're not that big, why complicate matters by storing them on the file system? You're already having to do a DB lookup to know what to retrieve--that's the crucial difference between "page furniture" and data. But whatever. Josh _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 2:50 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using , you can implement all the same security you would for any other resource your app serves up. Josh _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:27 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 10:22 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason Sent: Thursday, January 18, 2007 10:16 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I believe there would still be three http requests here. The images would still be called up in the html like right? Sorry but in http that would still create seperate http requests. John [EMAIL PROTECTED] _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy Sent: Thursday, January 18, 2007 9:35 AM To: discussion@acfug.org Subject: [ACFUG Discuss] Image from DB Probably an easy problem for someone... I want to put two small images in my database and then output them in my app, so that they do not constitute additional http requests. Consider it an experiment - I know that it may seem a bit silly. The goal is for the entire page to be delivered to the browser in one http request, instead of 3 (two images and one cf page) without doing any Apache tinkering. I have looked around the net for answers and cannot seem to make this work. Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the proper way to insert the image? Example: INSERT into Images (imageFile) values ('#base64(image)#') -Or- Example: INSERT into Images (imageFile) values ('#image#') And then of course, how do you retrieve it? Example: SELECT imageFile FROM Images WHERE imageID=1 #toString(imageFile)# -OR- #toBinary(imageFile)# As I say, I've not been able to make this work. If I use toString(), I simply get the raw data. If I use toBinary(), I get an error that the data cannot be converted to a string. Also, using CFCONTENT is fine to output the image, but then any code after that is ignored. So, short of saving the entire page and then outputting, it, I don't see a way to use CFCONTENT. _ Derric
Re: [ACFUG Discuss] Image from DB
Just to be clear the security aspect is of no issue here. I am not interested in doing this for security. I agree with those who have posted about the con's of doing image management in a DB. I don't want to do that. What I specifically was trying to accomplish is the storage of a finite number of images, about 5 total. Each of which are under 5 kb. The goal was/is that CF could output the one or two images on the front page along with the CFML all in one http request. Again, I know it's trivial and I know that there is no performance gain per se. But, as mentioned in the article I referenced, if currently I have three HTTP connections to load a 90k page, and I can take that down to one HTTP connection for the same 90k, then 500,000 users per day would be 500,000 requests per day, not 1.5 million. Make sense? If one assumes that the other aspects of the app are tuned (DB queries, CFML, Apache or IIS, hardware, etc., - and that's a big assumption), then a final spot would be the HTTP requests. And, that would be more out of curiosity than necessity. Although, the end result would certainly be desirable, a fast loading, single request which gives the user the feeling of a very responsive site. Again, thank you to everyone - in fact, I went back and changed my httpd.conf file to enable http keep alives - not sure why that was off to begin with. So, there has been some positive feedback from all of this! _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 3:29 PM, Josh Adams wrote: Sure it's data management. You could keep text data on the file system too but you typically don't--unless maybe it's a lot of text, right? Images are no different--if they're not that big, why complicate matters by storing them on the file system? You're already having to do a DB lookup to know what to retrieve--that's the crucial difference between "page furniture" and data. But whatever. Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 2:50 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using src=".../myheaderimage.cfm">, you can implement all the same security you would for any other resource your app serves up. Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:27 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P. Sent: Thursday, January 18, 2007 10:22 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I'm just curious. What are the benefits of storing the image in the db rather than storing the file on the filesystem and the path in the db? I mean, for a web page, all you need is the and the path. I can understand how it might be useful in some VB or C or Java app where the client doesn't display images with such ease, but for a web app...? Thanks. mf -Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Re: [ACFUG Discuss] Image from DB
If you're at the point where everything else is totally optimized and requests is the only thing left to address (and is a real issue, not a perceived issue), then you should consider moving your images and other static assets offsite to a provider like Akamai. Send your non-appserver requests to somebody else's farm. Shawn Gorrell Web Development Applications Architect Federal Reserve Bank - Atlanta Office (404) 498-8449 Derrick Peavy <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 03:46 PM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject Re: [ACFUG Discuss] Image from DB Just to be clear the security aspect is of no issue here. I am not interested in doing this for security. I agree with those who have posted about the con's of doing image management in a DB. I don't want to do that. What I specifically was trying to accomplish is the storage of a finite number of images, about 5 total. Each of which are under 5 kb. The goal was/is that CF could output the one or two images on the front page along with the CFML all in one http request. Again, I know it's trivial and I know that there is no performance gain per se. But, as mentioned in the article I referenced, if currently I have three HTTP connections to load a 90k page, and I can take that down to one HTTP connection for the same 90k, then 500,000 users per day would be 500,000 requests per day, not 1.5 million. Make sense? If one assumes that the other aspects of the app are tuned (DB queries, CFML, Apache or IIS, hardware, etc., - and that's a big assumption), then a final spot would be the HTTP requests. And, that would be more out of curiosity than necessity. Although, the end result would certainly be desirable, a fast loading, single request which gives the user the feeling of a very responsive site. Again, thank you to everyone - in fact, I went back and changed my httpd.conf file to enable http keep alives - not sure why that was off to begin with. So, there has been some positive feedback from all of this! _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 3:29 PM, Josh Adams wrote: Sure it's data management. You could keep text data on the file system too but you typically don't--unless maybe it's a lot of text, right? Images are no different--if they're not that big, why complicate matters by storing them on the file system? You're already having to do a DB lookup to know what to retrieve--that's the crucial difference between "page furniture" and data. But whatever. Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 2:50 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using , you can implement all the same security you would for any other resource your app serves up. Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 10:27 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Honestly, there's not really a benefit per se. There might be a rare case now and then for doing this, but really you should probably just use the filesystem for what it's design for, storing files. John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P
Re: [ACFUG Discuss] Image from DB
Good point. In fact, perfect point. I think if I can ever achieve that kind of traffic, that would be the best route. Until then, I think it's good to go. Just trying to cover all the basis before inviting the world. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 3:55 PM, [EMAIL PROTECTED] wrote: If you're at the point where everything else is totally optimized and requests is the only thing left to address (and is a real issue, not a perceived issue), then you should consider moving your images and other static assets offsite to a provider like Akamai. Send your non-appserver requests to somebody else's farm. Shawn Gorrell Web Development Applications Architect Federal Reserve Bank - Atlanta Office (404) 498-8449 Derrick Peavy <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 03:46 PM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject Re: [ACFUG Discuss] Image from DB Just to be clear the security aspect is of no issue here. I am not interested in doing this for security. I agree with those who have posted about the con's of doing image management in a DB. I don't want to do that. What I specifically was trying to accomplish is the storage of a finite number of images, about 5 total. Each of which are under 5 kb. The goal was/is that CF could output the one or two images on the front page along with the CFML all in one http request. Again, I know it's trivial and I know that there is no performance gain per se. But, as mentioned in the article I referenced, if currently I have three HTTP connections to load a 90k page, and I can take that down to one HTTP connection for the same 90k, then 500,000 users per day would be 500,000 requests per day, not 1.5 million. Make sense? If one assumes that the other aspects of the app are tuned (DB queries, CFML, Apache or IIS, hardware, etc., - and that's a big assumption), then a final spot would be the HTTP requests. And, that would be more out of curiosity than necessity. Although, the end result would certainly be desirable, a fast loading, single request which gives the user the feeling of a very responsive site. Again, thank you to everyone - in fact, I went back and changed my httpd.conf file to enable http keep alives - not sure why that was off to begin with. So, there has been some positive feedback from all of this! _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 3:29 PM, Josh Adams wrote: Sure it's data management. You could keep text data on the file system too but you typically don't--unless maybe it's a lot of text, right? Images are no different--if they're not that big, why complicate matters by storing them on the file system? You're already having to do a DB lookup to know what to retrieve--that's the crucial difference between "page furniture" and data. But whatever. Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 2:50 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over there just as here, people asked the "why would you do that?" question about storing images in the DB. An good rule of thumb was put forth: if it's "page furniture," keep it in the file system; if it's data, keep it in the DB. If it's data, use your data management tool (a.k.a. your database) to manage it--why reinvent the wheel? On the security side of things, note that by using src=".../
Re: [ACFUG Discuss] Image from DB
Heh an easier solution to reduce http requests on this would be to just stick your images in css and then the browser would cache it. Simple and elegant. Especially if you are talking about a small number of images and a small file size. Granted this wouldn't work well for a site where you have a lot of images that are not viewed repeatedly by the same session. -Steven On 1/18/07, Derrick Peavy <[EMAIL PROTECTED]> wrote: Good point. In fact, perfect point. I think if I can ever achieve that kind of traffic, that would be the best route. Until then, I think it's good to go. Just trying to cover all the basis before inviting the world. _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 3:55 PM, [EMAIL PROTECTED] wrote: If you're at the point where everything else is totally optimized and requests is the only thing left to address (and is a real issue, not a perceived issue), then you should consider moving your images and other static assets offsite to a provider like Akamai. Send your non-appserver requests to somebody else's farm. Shawn Gorrell Web Development Applications Architect Federal Reserve Bank - Atlanta Office (404) 498-8449 Derrick Peavy <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/18/2007 03:46 PM Please respond to discussion@acfug.org To discussion@acfug.org cc Subject Re: [ACFUG Discuss] Image from DB Just to be clear the security aspect is of no issue here. I am not interested in doing this for security. I agree with those who have posted about the con's of doing image management in a DB. I don't want to do that. What I specifically was trying to accomplish is the storage of a finite number of images, about 5 total. Each of which are under 5 kb. The goal was/is that CF could output the one or two images on the front page along with the CFML all in one http request. Again, I know it's trivial and I know that there is no performance gain per se. But, as mentioned in the article I referenced, if currently I have three HTTP connections to load a 90k page, and I can take that down to one HTTP connection for the same 90k, then 500,000 users per day would be 500,000 requests per day, not 1.5 million. Make sense? If one assumes that the other aspects of the app are tuned (DB queries, CFML, Apache or IIS, hardware, etc., - and that's a big assumption), then a final spot would be the HTTP requests. And, that would be more out of curiosity than necessity. Although, the end result would certainly be desirable, a fast loading, single request which gives the user the feeling of a very responsive site. Again, thank you to everyone - in fact, I went back and changed my httpd.conf file to enable http keep alives - not sure why that was off to begin with. So, there has been some positive feedback from all of this! _ Derrick Peavy Sales and Web Services Universal Advertising Phone: 404-786-5036 Fax: 404-370-0470 http://www.universaladvertising.com http://www.collegeadvertising.com http://www.collegeclassifieds.com ___ On Jan 18, 2007, at 3:29 PM, Josh Adams wrote: Sure it's data management. You could keep text data on the file system too but you typically don't--unless maybe it's a lot of text, right? Images are no different--if they're not that big, why complicate matters by storing them on the file system? You're already having to do a DB lookup to know what to retrieve--that's the crucial difference between "page furniture" and data. But whatever. Josh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason Sent: Thursday, January 18, 2007 2:50 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB I agree that with strict image security it is an option. Give an image only to particular people, etc. But data management? I don't think so, but let's just my opinion. Image security is probably the only practical example I can think of for doing this, but there again Derrick isn't going for that. As far as having html text and the image binary on the same 'page'...I've never send that before. John [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams Sent: Thursday, January 18, 2007 2:42 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Image from DB Not true--there can be a benefits: data management & security. Derrick started this whole discussion on the BlueDragon Interest list. I guess he brought it here because no one could tell him a technique for doing what he wanted on that list. But over