Re: asynch cfml gateway - working example
Windows hosts files? Potential external/unknown variables? Hmmm... What you are talking about? Give me a potential point of break. Merely that the http protocol is designed to provide communication between disparate systems, and as such the http request leaves the current system to initiate activity on another. In this case the other system happens to be the same current system, and of course, this is how the CF task scheduler has worked for quite some time. Yes, the odds are that a request from the current machine to itself won't fail, but it still potentially involves a windows hosts file, router, dns server... By comparison, a CF7 asynchronous CFML gateway is executed entirely within the context of the JVM -- it never leaves the system and so doesn't have those other things as potential points of breakage. As an (unlikely but theoretically viable) example, if you had 3 servers hosting the domain mydomain.com and had the IP address of one of these machines in the windows hosts file of the other two for that domain, then you wouldn't be able to connect to the current machine on that domain with an http request. If I were building a windows-only application which needed to use a lot of http I would certainly consider this tag as an option. Multithreading assumes cooperation between different parts of a task. So-called async gateways are just parallel and NOT cooperating DIFFERENT tasks. If this is what you want, try CFEXECUTE first. I'm not sure what you're getting at (or how it has anything to do with the questions I was asking)... I'm also not sure why you feel the need to talk down to me... Although the Asynch CFML gateway isn't inherently designed to produce cooprative tasks, using it to produce cooperative tasks isn't particularly difficult. Check out Sean Corfield's articles : http://corfield.org/blog/index.cfm?do=blog.searchsearch=Concurrency+l ibrary (I seem to have deleted the email from the guy who recommended these to me before and can't remember who it was now, but I wanted to say thanks.) Cfexecute isn't necessarily the best solution either for a number of reasons, not everything is available on the command line (although in this case we're talking about CF requests and iirc MX makes that available, though I've never used it), command line arguments vary between operating systems, etc. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208962 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
Here's a quick example of using the Asynchronous CFML Gateway that is setup to demonstrate a 100X performance improvement (from a user's perspective) vs synchronous CFML execution for long-running tasks that can be run in parallel. Hope that helps (watch the URL wrap): http://www.dcooper.org/blog/client/index.cfm?mode=entryen try=24BEF3D6-4E22-1671-55146EEC011D18D4 Thanks Damon, I appreciate this... Sorry I didn't respond sooner... things have been hectic around here... s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208967 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
On 6/6/05, Douglas Knudsen [EMAIL PROTECTED] wrote: um, that's what I thought. Was chatting with coworkers today about this too. Their concern was thread use. Threads used in the async gateway are part of the pool in the JRun instance, no? So, if you have a box getting good load, introducing a script that runs in this parallel fashion, this would eat up more threads, eh? So, is it really beneficial? I suppose the answer is, 'it depends', but curious on thoughts on this. Well, yes, it depends. I've posted a series of three articles on my blog about asynchronous development that covers some of the issues that you can run into by over-parallelizing your applications: http://corfield.org/search/asynchronous+development Whether parallel execution will help or not depends on a lot of factors so there are very few hard rules in this area, I'm afraid. If it's any help, here's a couple of the things we're using the asynchronous gateway for: - fetching large files from one server to another - invoking slow web services to post data updates Neither of these need the calling code to wait for the result and in both cases the main line execution does not call the asynchronous task in all cases. -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208765 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
hmm, interesting, so something in jrun.xml should be managing thread count/ceilings, eh? Like the scheduler service. A quick perusal of this file doesn't indicate anything new, but I'm only one pair of eyes. DK On 6/6/05, Dave Watts [EMAIL PROTECTED] wrote: um, that's what I thought. Was chatting with coworkers today about this too. Their concern was thread use. Threads used in the async gateway are part of the pool in the JRun instance, no? So, if you have a box getting good load, introducing a script that runs in this parallel fashion, this would eat up more threads, eh? So, is it really beneficial? I suppose the answer is, 'it depends', but curious on thoughts on this. If I recall correctly, the gateway has its own thread pool, separate from the threads that are used to service regular requests. I suspect that all the threads are pooled within the single JRun process, however. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208785 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
um, that's what I thought. Was chatting with coworkers today about this too. Their concern was thread use. Threads used in the async gateway are part of the pool in the JRun instance, no? So, if you have a box getting good load, introducing a script that runs in this parallel fashion, this would eat up more threads, eh? So, is it really beneficial? I suppose the answer is, 'it depends', but curious on thoughts on this. The CF7 administrator allows you to assign the number of threads available to the gateways (all gateways share one pool, not just asynch), and the number of gateway requests to queue. By default it's 10 and 255 in developer mode. Not sure if the defaults are different for pro/ent. I suspect the thread pools are separate (one for gateways, another for http requests), though even if they share the same pool, the fact that the long running process(es) are passed off to a different thread should cause the spawning request to complete faster and thus release that thread sooner for the next request waiting in queue. In terms of mechanical efficiency there shouldn't be much difference -- the machine is performing the same tasks either way. But mechanical efficiency isn't really the purpose of asynch cfml -- it's purpose is to provide faster response times and as a result better experience to end-users. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208787 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
On 6/6/05, S. Isaac Dealey [EMAIL PROTECTED] wrote: I have not been able to play with this stuff yet, but D. Cooper's blog entry had this Imagine spawning off long running DB queries in parallel, for example. Page response times for most existing CF applications, in fact, would probably have some place that could make use of such a capability to dramatically make the user experience better. I'm really curious on how this could be accomplished. How can you break up one long running query to run in parallel? The answer is you don't... What he's describing is either executing a long-running query without interrupting page delivery (if the query results aren't needed for display), and/or executing multiple queries simultanously (which may or may not be long running). But as the API for asynch doesn't natively provide the ability to return a response from the gateway to the calling page (something Sean's tools are designed to accomplish), the gateway isn't really designed with the intent of gathering content needed to deliver the current request. Rather it's designed primarily for features such as logging application activity to a database which can sometimes slow page delivery without providing any content for the user during the current request. In a nutshell, the asynch gateway is essentially designed as a fire and forget tool. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208802 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
Hit the send button too soon? On 6/6/05, S. Isaac Dealey [EMAIL PROTECTED] wrote: I have not been able to play with this stuff yet, but D. Cooper's blog entry had this Imagine spawning off long running DB queries in parallel, for example. Page response times for most existing CF applications, in fact, would probably have some place that could make use of such a capability to dramatically make the user experience better. I'm really curious on how this could be accomplished. How can you break up one long running query to run in parallel? The answer is you don't... What he's describing is either executing a long-running query without interrupting page delivery (if the query results aren't needed for display), and/or executing multiple queries simultanously (which may or may not be long running). But as the API for asynch doesn't natively provide the ability to return a response from the gateway to the calling page (something Sean's tools are designed to accomplish), the gateway isn't really designed with the intent of gathering content needed to deliver the current request. Rather it's designed primarily for features such as logging application activity to a database which can sometimes slow page delivery without providing any content for the user during the current request. In a nutshell, the asynch gateway is essentially designed as a fire and forget tool. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208832 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
This provides asynchronous capabilities in full. And without MX7. http://www.cftagstore.com/tags/cfxhttp5.cfm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208918 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
This provides asynchronous capabilities in full. And without MX7. http://www.cftagstore.com/tags/cfxhttp5.cfm Looks nice, although I wouldn't use it for asynch processing... Reason I want to use the asynch cfml gateway is to eliminate an http request as a potential point at which the process could break -- I realize I'm trading out cfhttp for the gateway, but it seems like the gateway would be more contained / involve fewer potential external/unknown variables like for instance, windows hosts files. Thanks for the info tho. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208920 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
Windows hosts files? Potential external/unknown variables? Hmmm... What you are talking about? Give me a potential point of break. Multithreading assumes cooperation between different parts of a task. So-called async gateways are just parallel and NOT cooperating DIFFERENT tasks. If this is what you want, try CFEXECUTE first. Looks nice, although I wouldn't use it for asynch processing... Reason I want to use the asynch cfml gateway is to eliminate an http request as a potential point at which the process could break -- I realize I'm trading out cfhttp for the gateway, but it seems like the gateway would be more contained / involve fewer potential external/unknown variables like for instance, windows hosts files. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208929 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
I have not been able to play with this stuff yet, but D. Cooper's blog entry had this Imagine spawning off long running DB queries in parallel, for example. Page response times for most existing CF applications, in fact, would probably have some place that could make use of such a capability to dramatically make the user experience better. I'm really curious on how this could be accomplished. How can you break up one long running query to run in parallel? DK On 6/6/05, dcooper @ macromedia. com dcooper @ macromedia. com [EMAIL PROTECTED] wrote: Here's a quick example of using the Asynchronous CFML Gateway that is setup to demonstrate a 100X performance improvement (from a user's perspective) vs synchronous CFML execution for long-running tasks that can be run in parallel. Hope that helps (watch the URL wrap): http://www.dcooper.org/blog/client/index.cfm?mode=entryentry=24BEF3D6-4E22-1671-55146EEC011D18D4 Damon Does anybody have some working code I can test with. I was certain I'd managed to get this CFML gateway to work ... once... and only once ... ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208716 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
I have not been able to play with this stuff yet, but D. Cooper's blog entry had this Imagine spawning off long running DB queries in parallel, for example. Page response times for most existing CF applications, in fact, would probably have some place that could make use of such a capability to dramatically make the user experience better. I'm really curious on how this could be accomplished. How can you break up one long running query to run in parallel? The answer is you don't... What he's describing is either executing a long-running query without interrupting page delivery (if the query results aren't needed for display), and/or executing multiple queries simultanously (which may or may not be long running). But as the API for asynch doesn't natively provide the ability to return a response from the gateway to the calling page (something Sean's tools are designed to accomplish), the gateway isn't really designed with the intent of gathering content needed to deliver the current request. Rather it's designed primarily for features such as logging application activity to a database which can sometimes slow page delivery without providing any content for the user during the current request. In a nutshell, the asynch gateway is essentially designed as a fire and forget tool. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208741 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: asynch cfml gateway - working example
um, that's what I thought. Was chatting with coworkers today about this too. Their concern was thread use. Threads used in the async gateway are part of the pool in the JRun instance, no? So, if you have a box getting good load, introducing a script that runs in this parallel fashion, this would eat up more threads, eh? So, is it really beneficial? I suppose the answer is, 'it depends', but curious on thoughts on this. DK On 6/6/05, S. Isaac Dealey [EMAIL PROTECTED] wrote: I have not been able to play with this stuff yet, but D. Cooper's blog entry had this Imagine spawning off long running DB queries in parallel, for example. Page response times for most existing CF applications, in fact, would probably have some place that could make use of such a capability to dramatically make the user experience better. I'm really curious on how this could be accomplished. How can you break up one long running query to run in parallel? The answer is you don't... What he's describing is either executing a long-running query without interrupting page delivery (if the query results aren't needed for display), and/or executing multiple queries simultanously (which may or may not be long running). But as the API for asynch doesn't natively provide the ability to return a response from the gateway to the calling page (something Sean's tools are designed to accomplish), the gateway isn't really designed with the intent of gathering content needed to deliver the current request. Rather it's designed primarily for features such as logging application activity to a database which can sometimes slow page delivery without providing any content for the user during the current request. In a nutshell, the asynch gateway is essentially designed as a fire and forget tool. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208753 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: asynch cfml gateway - working example
um, that's what I thought. Was chatting with coworkers today about this too. Their concern was thread use. Threads used in the async gateway are part of the pool in the JRun instance, no? So, if you have a box getting good load, introducing a script that runs in this parallel fashion, this would eat up more threads, eh? So, is it really beneficial? I suppose the answer is, 'it depends', but curious on thoughts on this. If I recall correctly, the gateway has its own thread pool, separate from the threads that are used to service regular requests. I suspect that all the threads are pooled within the single JRun process, however. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208754 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54