<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Concurrent XML Queries with AJAX</title>
	<link>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/</link>
	<description>You cannot wield it. None of us can.</description>
	<pubDate>Fri, 05 Dec 2008 08:43:06 +0000</pubDate>
	<image>
	<title>Comments on: Concurrent XML Queries with AJAX</title>
	<width>120</width>
	<height>50</height>
	<link>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/</link>
	<url>http://www.hwhappy.co.uk/wp-images/hwhappyrss.jpg</url>
	</image>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Ruby on what? &#171; HW Happy Days</title>
		<link>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/#comment-388</link>
		<pubDate>Mon, 26 Mar 2007 10:18:37 +0000</pubDate>
		<guid>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/#comment-388</guid>
					<description>[...] Ruby was built from the ground up having major influence by a language called SmallTalk. The idea was to consider everything as an object. Many of the features of Ruby have been designed to make it easier for the programmer with the main issues being described here. However, one of the features that stood out for me was Ruby&#8217;s ability to offer multithreading regardless of which platform Ruby runs on. In one of my previous posts I talk about using Ajax to give the illusion of multithreading (concurrent xml), its still not true concurrency. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Ruby was built from the ground up having major influence by a language called SmallTalk. The idea was to consider everything as an object. Many of the features of Ruby have been designed to make it easier for the programmer with the main issues being described here. However, one of the features that stood out for me was Ruby&#8217;s ability to offer multithreading regardless of which platform Ruby runs on. In one of my previous posts I talk about using Ajax to give the illusion of multithreading (concurrent xml), its still not true concurrency. [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: HWHappy</title>
		<link>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/#comment-3</link>
		<pubDate>Wed, 08 Nov 2006 10:20:23 +0000</pubDate>
		<guid>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/#comment-3</guid>
					<description>Javascript Atomicity

Another issue to be considered if following the method above is atomicity, that is, trying to prevent 2 or more "threads" accessing the same data at the exact same time and corrupting it. This occurs because AJAX allows processes to perform in the background, it doesnt take into account that the background processes and the current process could be accessing the same information at the same time.

This was a concern I had, and one of the factors that led me to decide to store the results in the database(as well as the select where filters and added benefits of using a query to return what I want) as this would prevent the single thread from trying to change the data at the same time. Whats the risk? probably small for one background process, but when you have 5 or 6, the chances are very high.

Many people have tried to design mutually exlusive code in javascript to allow access to shared variables, and all usually end up with the same result, it can't be done. Hence if you are thinking about storing the results from different processes in variables you will have to be very careful it's done without interference from other processes. A good article that is worth a read is : http://www.polyglotinc.com/AJAXscratch/Mutex/mutualExclusion.html
This explains the authors attempts at achieving basic mutual exclusion.</description>
		<content:encoded><![CDATA[<p>Javascript Atomicity</p>
<p>Another issue to be considered if following the method above is atomicity, that is, trying to prevent 2 or more &#8221;threads&#8221; accessing the same data at the exact same time and corrupting it. This occurs because AJAX allows processes to perform in the background, it doesnt take into account that the background processes and the current process could be accessing the same information at the same time.</p>
<p>This was a concern I had, and one of the factors that led me to decide to store the results in the database(as well as the select where filters and added benefits of using a query to return what I want) as this would prevent the single thread from trying to change the data at the same time. Whats the risk? probably small for one background process, but when you have 5 or 6, the chances are very high.</p>
<p>Many people have tried to design mutually exlusive code in javascript to allow access to shared variables, and all usually end up with the same result, it can&#8217;t be done. Hence if you are thinking about storing the results from different processes in variables you will have to be very careful it&#8217;s done without interference from other processes. A good article that is worth a read is : <a href="http://www.polyglotinc.com/AJAXscratch/Mutex/mutualExclusion.html" rel="nofollow">http://www.polyglotinc.com/AJAXscratch/Mutex/mutualExclusion.html</a><br />
This explains the authors attempts at achieving basic mutual exclusion.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: HW Techie &#187; Blog Archive &#187; Concurrent XML Queries (JavaScript “Threading”)</title>
		<link>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/#comment-2</link>
		<pubDate>Tue, 07 Nov 2006 13:22:53 +0000</pubDate>
		<guid>http://www.hwhappy.co.uk/2006/11/07/concurrent-xml-queries-with-ajax/#comment-2</guid>
					<description>[...] This idea isn’t new in other platforms and mediums where it is known as “threading”, and even using JavaScript as we had is fairly well known amongst developers. However, we found no clear cut explanations of how this works, so you can see HW Happy’s more detailed explanation here. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] This idea isn’t new in other platforms and mediums where it is known as “threading”, and even using JavaScript as we had is fairly well known amongst developers. However, we found no clear cut explanations of how this works, so you can see HW Happy’s more detailed explanation here. [&#8230;]
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
