call plugins without waiting for response

is there a way in coldbox or coldfusion for that matter to call a plugin without waiting for response?

for example, I have an email plugin i wrote that connects to PostmarkApp.com’s API. the plugin is creating a bottleneck for me as it takes 100-200ms to send & receive a response. I want to just send the request and ignore the response.

any ideas/suggestions?


Jeremy R. DeYoung
Phone:615.261.8201

RantsFromAMadMan.com

You probably would have to thread it

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Don’t have the time to answer this at any length, but you could use Coldfusion Gateways.
The preconfigured gateway CFML allows for asynchronous communication - ie. allows you to call off to another process and not have to pause the current execution.

The CF8 documentation is here: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseGateways_8.html couldn’t find the CF9 docco in my quick search, but it does work.

The gotcha is that the gateway CFC needs to predefined - but you can get around that by using the predefined reference but then at runtime switch out the CFC you want to run by providing cfcpath in your call which overrides the definition in cf admin.

I’m new to coldbox so I’m not sure how you would integrate it - or even if you could - but in the most basic scenario I’m sure your handler code could call it

Cheers
Steve

One has to be careful with both solutions, as both require the enterprise version of ColdFusion.

So if this is expected to have high traffic over time, this will be something that will need to be taken into consideration.

Ahh of course - living in enterprise land I’m always forgetting that bit.

S

cfthread does not require Enterprise but the number of simultaneous threads you may manually spawn is limited in the Pro version. Further requests beyond that limit will be queued but if you have a short time out they may expire before executing. Event Gateways, on the other hand, are Enterprise only.

Alternatively, you could investigate Railo which has both Gateways and Threading but does not have any licensing restrictions.

Judah