ajaxCFC multithreaded example
For all those who still have doubts about multithreaded ajax, I built an example that illustrates the differences between ordered and unordered batches, as well as synchronous and asynchronous.
Ordered batches will force the batch length to remain at (1) at all times, waiting for a response to come back before sending the next call.
Synchronous batches will halt the batch until the callback function has been resolved, making the entire process single threaded.
Note that the synchronous process will take a few seconds… this process in not meant to be used like this, but I wanted to illustrate the consequences. There are extremely handy uses of the synchronous process, which I'll show in a different example.
Ordered batches will force the batch length to remain at (1) at all times, waiting for a response to come back before sending the next call.
Synchronous batches will halt the batch until the callback function has been resolved, making the entire process single threaded.
Note that the synchronous process will take a few seconds… this process in not meant to be used like this, but I wanted to illustrate the consequences. There are extremely handy uses of the synchronous process, which I'll show in a different example.
TrackBacks
There are no trackbacks for this entry.
Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?177D964B-3048-7431-E44572659D40A1F8
http://www.robgonda.com/blog/trackback.cfm?177D964B-3048-7431-E44572659D40A1F8









<html>
<head>
<title title="AjaxCFC Examples" >AjaxCFC Examples</title>
</head>
<body>
<cfdirectory action="list" name="Examples" directory="#GetDirectoryFromPath(GetTemplatePath())#" filter="*" />
<cfoutput>
<cfloop query="Examples">
<cfif Examples.Name NEQ "js" AND Examples.Name NEQ "index.cfm" >
<a href="#Examples.Name#">#Examples.Name#</a><br />
</cfif>
</cfloop>
</cfoutput>
</body>
</html>
You're absolutely right; I'm missing a nice examples index. Thanks for the code, but I will probably build an xml driven index because there are several work-in-progress folders that I would like keep hidden until they're finished.
I'll upgrade the examples view soon. I'll also add the ability to view the source directly from the examples page.
-Rob