Re: Multithreading within a request

2006-04-06 Thread Rob Wilkerson
I've done this using Java.  Started doing it in 6.0 and have continued
using the same code through 7.0x because gateways require CF
Enterprise and not all of my customers run enterprise.  I don't have
the code handy, but take a look at the java.util.URLConnection class.

There are obviously some other classes I'm using around that, but I'm
pretty sure that they're all in the java.util package and
URLConnection is the core of how I solved the problem.



On 4/6/06, Andrew Dixon <[EMAIL PROTECTED]> wrote:
> Hi All.
>
> Is it possible to multithread within a single request. For example, I would
> like to make multiple http requests to a web service, but at the moment they
> run one after the other, taken about 3 seconds each, but if I could run them
> both at the same time it would improve the performance of the script
> greatly, any ideas on how this could be done?
>
> Kind regards,
>
> Andrew
>
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237145
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: Multithreading within a request

2006-04-06 Thread Gareth
I haven't used it in the same context but I run a scheduled task which puts 
the cfhttp in a separate thread. Running it like below runs the task once as 
soon as it's created so it might work.

  



- Original Message - 
From: "Andrew Dixon" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Thursday, April 06, 2006 9:11 PM
Subject: Multithreading within a request


Hi All.

Is it possible to multithread within a single request. For example, I would
like to make multiple http requests to a web service, but at the moment they
run one after the other, taken about 3 seconds each, but if I could run them
both at the same time it would improve the performance of the script
greatly, any ideas on how this could be done?

Kind regards,

Andrew




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237135
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: Multithreading within a request

2006-04-06 Thread One User
>> Is it possible to multithread within a single request. For 
>> example, I would like to make multiple http requests to a web 
>> service, but at the moment they run one after the other, 
>> taken about 3 seconds each, but if I could run them both at 
>> the same time it would improve the performance of the script 
>> greatly, any ideas on how this could be done?
>

http://www.cftagstore.com/tags/cfxhttp5.cfm

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237131
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: Multithreading within a request

2006-04-06 Thread Andy Matthews
I believe you could do this with an event gateway. They're asynchronous
requests and can have multiple threads.



-Original Message-
From: Andrew Dixon [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 06, 2006 3:11 PM
To: CF-Talk
Subject: Multithreading within a request


Hi All.

Is it possible to multithread within a single request. For example, I would
like to make multiple http requests to a web service, but at the moment they
run one after the other, taken about 3 seconds each, but if I could run them
both at the same time it would improve the performance of the script
greatly, any ideas on how this could be done?

Kind regards,

Andrew




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237130
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: Multithreading within a request

2006-04-06 Thread Andrew Dixon
I'm stuck using MX6.1, so the gateway is not an option.

Andrew.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237127
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: Multithreading within a request

2006-04-06 Thread Barney Boisvert
You can't do it with CF natively, as CF doesn't expose any threading
capabilities.  You have to use Java to do it, though Sean Corfield
built a concurrency toolkit that leveraged event gateways to let you
get some functionality from native CF (since he wrote the Java).

I don't know where to find it off hand, but a quick googling should turn it up.

cheers,
barneyb

On 4/6/06, Andrew Dixon <[EMAIL PROTECTED]> wrote:
> Hi All.
>
> Is it possible to multithread within a single request. For example, I would
> like to make multiple http requests to a web service, but at the moment they
> run one after the other, taken about 3 seconds each, but if I could run them
> both at the same time it would improve the performance of the script
> greatly, any ideas on how this could be done?
>
> Kind regards,
>
> Andrew


--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237125
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: Multithreading within a request

2006-04-06 Thread Dave Watts
> Is it possible to multithread within a single request. For 
> example, I would like to make multiple http requests to a web 
> service, but at the moment they run one after the other, 
> taken about 3 seconds each, but if I could run them both at 
> the same time it would improve the performance of the script 
> greatly, any ideas on how this could be done?

CFMX 7 Enterprise Edition allows you to do asynchronous processing using
Event Gateways.

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!


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237124
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


Multithreading within a request

2006-04-06 Thread Andrew Dixon
Hi All.

Is it possible to multithread within a single request. For example, I would
like to make multiple http requests to a web service, but at the moment they
run one after the other, taken about 3 seconds each, but if I could run them
both at the same time it would improve the performance of the script
greatly, any ideas on how this could be done?

Kind regards,

Andrew


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237122
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