blog | bio | agenda | jobs | ajaxCFC

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.

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?177D964B-3048-7431-E44572659D40A1F8

Comments
I just noticed that Ordered = true and Async = false won’t send anything. I’m not sure exactly why it’s behaving that way… as soon as I find out I’ll post it here.
# Posted By Rob Gonda | 12/10/05 7:51 PM
Here is a file to add to the Examples dir. It'll list the examples and create a link to them.

<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>
# Posted By Laurence | 12/14/05 11:16 AM
Laurence,

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
# Posted By Rob Gonda | 12/15/05 9:32 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.1.004.