re[2]: [ACFUG Discuss] Spawning threads in Coldfusion: making my webapp run faster
I can't speak to the difference between regular frames and iframes, but you got the idea I had. I'm assuming the cfhttp part of CF will attempt to load all those (i)frames at the same time and open up multiple connections. I also assume that much of the wait you're experiencing is due to the remote server processing your request and not your server working hard. Let us know if it worked! /m > On 9/8/06, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]> wrote: > As a low-tech solution, could you write a cfm page with frames that calls > other cfm pages in those frames and then cfhttp the "top" page? > /m Intriguing idea... :-) So let's talk about this one... I can create one cfm template that has multiple iframes in it... each iframe would would essentially be a "thread" I want to spawn, right? Furthermore, each iframe would just be another cfm template, but it has code to go do work (in my case, go find the price of a book), and then save the information to a database. When the page is done loading, all the information will be saved to the database AND, supposedly, this would all run faster because each iframe would be doing its work at the same time as the other iframes. Is the logic correct here? Would the iframes really be doing their work at the same time? (Or should I use traditional frames?) Thoughts? Thanks! -- nathan - 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 - < Mischa Uppelschoten The Banker's Exchange, Inc. 2020 Hills Avenue NW Atlanta, GA 30318 Phone:(404) 605-0100 ext. 10 Fax:(404) 355-7930 Web:www.BankersX.com Follow this link for Instant Web Chat: http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN - 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: re[2]: [ACFUG Discuss] Spawning threads in Coldfusion: making my webapp run faster
Isn't the nature of CF synchronous (when it comes to page requests)? So regardless of the order in which you execute these things each one will be executed one at a time on the java stack (FILO - first in last out) think stacking plates on one of those buffet lines - that's the way the java stack behaves It may have the appearance of multi threaded but, I doubt it will speed anything up in reality. It may look faster but, you still have to wait for all those things to finish before you can do anything with them. So multithreaded its not if that is the case. Ive done only a few multithreaded apps (and they were not complex mind you) in java and I'm not sure how CF behaves but when you do this you may create more of a problem for yourself because you are increasing the number of requests per user per page (if multiple users hit this app). Just some things to think about. Here is the link to the java tutorial on threads... might be a little more helpful than the javadoc link above: http://java.sun.com/docs/books/tutorial/essential/concurrency/procthread.html On 9/13/06, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]> wrote: I can't speak to the difference between regular frames and iframes, but you got the idea I had. I'm assuming the cfhttp part of CF will attempt to load all those (i)frames at the same time and open up multiple connections. I also assume that much of the wait you're experiencing is due to the remote server processing your request and not your server working hard. Let us know if it worked! /m > On 9/8/06, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]> wrote: > As a low-tech solution, could you write a cfm page with frames that calls other cfm pages in those frames and then cfhttp the "top" page? > /m Intriguing idea... :-) So let's talk about this one... I can create one cfm template that has multiple iframes in it... each iframe would would essentially be a "thread" I want to spawn, right? Furthermore, each iframe would just be another cfm template, but it has code to go do work (in my case, go find the price of a book), and then save the information to a database. When the page is done loading, all the information will be saved to the database AND, supposedly, this would all run faster because each iframe would be doing its work at the same time as the other iframes. Is the logic correct here? Would the iframes really be doing their work at the same time? (Or should I use traditional frames?) Thoughts? Thanks! -- nathan - 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 - < Mischa Uppelschoten The Banker's Exchange, Inc. 2020 Hills Avenue NW Atlanta, GA 30318 Phone:(404) 605-0100 ext. 10 Fax:(404) 355-7930 Web:www.BankersX.com Follow this link for Instant Web Chat: http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN - To unsubscribe from this list, manage your profile @ http://www.acfug.org?falogin.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 - -- Steven Ross web application & interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - 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: re[2]: [ACFUG Discuss] Spawning threads in Coldfusion: making my webapp run faster
the simultaneous request count is basically the limit of seperate threads to use. Each request gets a thread until this limit is reached, then the requests are put into a FIFO list. http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19438 I think this doc hits on this.as with John, I've always found this setting set much higher. In CFMX world, I've seen this set as high as 25 per proc. DKOn 9/13/06, Steven Ross <[EMAIL PROTECTED]> wrote: Isn't the nature of CF synchronous (when it comes to page requests)?So regardless of the order in which you execute these things each onewill be executed one at a time on the java stack (FILO - first in lastout) think stacking plates on one of those buffet lines - that's the way the java stack behavesIt may have the appearance of multi threaded but, I doubt it willspeed anything up in reality. It may look faster but, you still haveto wait for all those things to finish before you can do anything with them. So multithreaded its not if that is the case.Ive done only a few multithreaded apps (and they were not complex mindyou) in java and I'm not sure how CF behaves but when you do this youmay create more of a problem for yourself because you are increasing the number of requests per user per page (if multiple users hit thisapp).Just some things to think about.Here is the link to the java tutorial on threads... might be a littlemore helpful than the javadoc link above: http://java.sun.com/docs/books/tutorial/essential/concurrency/procthread.htmlOn 9/13/06, Mischa Uppelschoten ext 10 < [EMAIL PROTECTED]> wrote:> I can't speak to the difference between regular frames and iframes, but you got the idea I had. I'm assuming the cfhttp part of CF will attempt to load all those (i)frames at the same time and open up multiple connections. I also assume that much of the wait you're experiencing is due to the remote server processing your request and not your server working hard. > Let us know if it worked!> /m > On 9/8/06, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]> wrote: > > As a low-tech solution, could you write a cfm page with frames that calls other cfm pages in those frames and then cfhttp the "top" page?> > /m>> Intriguing idea... :-)> > So let's talk about this one... I can create one cfm template that has> multiple iframes in it... each iframe would would essentially be a> "thread" I want to spawn, right?>> Furthermore, each iframe would just be another cfm template, but it > has code to go do work (in my case, go find the price of a book), and> then save the information to a database.>> When the page is done loading, all the information will be saved to> the database AND, supposedly, this would all run faster because each > iframe would be doing its work at the same time as the other iframes.>> Is the logic correct here? Would the iframes really be doing their> work at the same time? (Or should I use traditional frames?) >> Thoughts?>> Thanks!> --> nathan>>> -> 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 > ->> < Mischa Uppelschoten> The Banker's Exchange, Inc.> 2020 Hills Avenue NW > Atlanta, GA 30318>> Phone:(404) 605-0100 ext. 10> Fax:(404) 355-7930> Web:www.BankersX.com> Follow this link for Instant Web Chat: > http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN - > To unsubscribe from this list, manage your profile @> http://www.acfug.org?falogin.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> ---Steven Rossweb application & interface developer http://www.zerium.com[mobile] 404-488-4364[fax] 928-484-4364-To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserformFor more info, see http://www.acfug.org/mailinglistsArchive @ http://www.mail-archive.com/discussion%40acfug.org/List hosted by http://www.fusionlink.com- -- Douglas Knudsenhttp://www.cubicleman.comthis is my signature, like it? - 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 -
Re: Re: re[2]: [ACFUG Discuss] Spawning threads in Coldfusion: making my webapp run faster
> > I can't speak to the difference between regular frames and iframes, but you got the idea I had. I'm assuming the cfhttp part of CF will attempt to load all those (i)frames at the same time and open up multiple connections. I also assume that much of the wait you're experiencing is due to the remote server processing your request and not your server working hard. > > Let us know if it worked! So, I thought I would bring closure to this thread It turns out, CFHTTP only gets the HTML of the "parent" page, it does not retrieve the frames. However, with a little ingenuity, I solved my problem. Here is what I did: I have one parent page that has 5 iframes in it. Based on the ISBN you send to the parent page, it will send that same ISBN to each of the iframes. Each iframe goes out to it's respective website (Amazon, half.com, ebay, etc). Now, after that was working, I send the user to the parent page. This keeps the multi-threading that I wanted because their browser is making all the HTTP calls to each of my individual pages (via iframes). The last thing I did was add a meta-refresh tag and set it to ZERO. When all the iframes are done loading, the meta-refresh forwards the user onto the final page and displays all the data. I know, I probably could have done some neato thing with javascript, but I'm not javascript monkey :-) To see this whole thing in action, go to www.pricemybook.com . Type in "calculus" for the search terms (or anything else), select a few of the books, and then click next. You should be taken to a page which contains a bunch of iframes... When everything is done getting the prices, you should be forwarded on to the final page. THANK YOU ALL FOR YOUR HELP! This was a good exercise in coming up with ways to make stuff multi-threaded. I never knew that I would end up with some iframes and a meta-refresh tag! :-) Thanks! -- Nathan - 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 -