<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: lock free</title>
	<atom:link href="http://www.puppetmastertrading.com/blog/index.php/2010/02/16/lock-free/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/</link>
	<description>algorithmic trading experiences</description>
	<lastBuildDate>Fri, 20 Jan 2012 02:03:24 -0800</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Corporate Serf</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-23354</link>
		<dc:creator>Corporate Serf</dc:creator>
		<pubDate>Tue, 18 Oct 2011 16:34:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-23354</guid>
		<description>Bit late in the post, but have you looked at the &quot;purely functional data structures&quot;/ &quot;functional arrays&quot; work? Quite simply instead of &quot;array[index] = 42;&quot; you do &quot;newArray = array[ with index = 42]&quot; with the intent that you get to keep pointers to both the old and the new array. The data structures are tree based and keeps some sort of &quot;modifications&quot; in a tree like fashion. The clojure language does this on top of the java vm and allegedly it is almost lock free (some locks in garbage collection I would imagine, so you will need to fake that if you are doing it in C).</description>
		<content:encoded><![CDATA[<p>Bit late in the post, but have you looked at the &#8220;purely functional data structures&#8221;/ &#8220;functional arrays&#8221; work? Quite simply instead of &#8220;array[index] = 42;&#8221; you do &#8220;newArray = array[ with index = 42]&#8221; with the intent that you get to keep pointers to both the old and the new array. The data structures are tree based and keeps some sort of &#8220;modifications&#8221; in a tree like fashion. The clojure language does this on top of the java vm and allegedly it is almost lock free (some locks in garbage collection I would imagine, so you will need to fake that if you are doing it in C).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lock free: the new C++ frontier &#171; Coding the markets</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-17411</link>
		<dc:creator>Lock free: the new C++ frontier &#171; Coding the markets</dc:creator>
		<pubDate>Wed, 09 Feb 2011 15:58:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-17411</guid>
		<description>[...] on lock free queues out there, folks on stackoverflow say it&#8217;s difficult, Hack the Market has blogged about FastFlow, and there&#8217;s a &#8220;Boost&#8221; lock free lib.   Posted in coding &#124; Leave a Comment &#187; [...]</description>
		<content:encoded><![CDATA[<p>[...] on lock free queues out there, folks on stackoverflow say it&#8217;s difficult, Hack the Market has blogged about FastFlow, and there&#8217;s a &#8220;Boost&#8221; lock free lib.   Posted in coding | Leave a Comment &#187; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tito</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-9705</link>
		<dc:creator>tito</dc:creator>
		<pubDate>Tue, 13 Apr 2010 11:54:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-9705</guid>
		<description>Hi Marco - no problem at all of course!  Thank you for letting me know as I was simply curious... Best regards</description>
		<content:encoded><![CDATA[<p>Hi Marco &#8211; no problem at all of course!  Thank you for letting me know as I was simply curious&#8230; Best regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-9703</link>
		<dc:creator>Marco</dc:creator>
		<pubDate>Tue, 13 Apr 2010 11:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-9703</guid>
		<description>Tito, I&#039;ve mentioned this page in a post within the &quot;Trading technologies&quot; linkedin group. I hope this is not a problem for you.

Marco</description>
		<content:encoded><![CDATA[<p>Tito, I&#8217;ve mentioned this page in a post within the &#8220;Trading technologies&#8221; linkedin group. I hope this is not a problem for you.</p>
<p>Marco</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tito</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-9681</link>
		<dc:creator>tito</dc:creator>
		<pubDate>Mon, 12 Apr 2010 18:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-9681</guid>
		<description>LINKED IN VISITORS:

I see I&#039;ve been getting a bunch of traffic on this post from some group in LinkedIn, but since I&#039;m not a member of that (or any) group in LinkedIn, I can&#039;t even see what the group is let alone why you folks are visiting here...

Anyone care to enlighten me?  Thanks!</description>
		<content:encoded><![CDATA[<p>LINKED IN VISITORS:</p>
<p>I see I&#8217;ve been getting a bunch of traffic on this post from some group in LinkedIn, but since I&#8217;m not a member of that (or any) group in LinkedIn, I can&#8217;t even see what the group is let alone why you folks are visiting here&#8230;</p>
<p>Anyone care to enlighten me?  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tito</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-8716</link>
		<dc:creator>tito</dc:creator>
		<pubDate>Fri, 19 Feb 2010 13:55:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-8716</guid>
		<description>Rookie: your roots are showing ;^&gt;</description>
		<content:encoded><![CDATA[<p>Rookie: your roots are showing ;^></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rookie</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-8699</link>
		<dc:creator>Rookie</dc:creator>
		<pubDate>Thu, 18 Feb 2010 21:34:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-8699</guid>
		<description>Going back to my C roots I&#039;d consider some type of shared memory pool with a &quot;circular&quot; queue.  Make it the responsibility of all readers to keep up, remember the &quot;position&quot; they were last at and pulling out any new updates for processing.

For layering purposes perhaps have queue managers that would take the last &quot;position&quot; as a request parameter and return 1-N available updates if any present.  Since it&#039;s read only memory to all but one locking/blocking should be minimal.

Queue managers, server processes, could be placed in front of pools of consumers and provide answers based on reading snapshots from the master queue.  It would be possible for queue managers to have different filtering capabilities if not all messages were useful for all potential clients.

Heh, obviously, I like to roll my own solutions, but that doesn&#039;t always work well with trying to fit into some massive organized framework.  It is however fun when there are no real world issues to deal with during the design process... ;)</description>
		<content:encoded><![CDATA[<p>Going back to my C roots I&#8217;d consider some type of shared memory pool with a &#8220;circular&#8221; queue.  Make it the responsibility of all readers to keep up, remember the &#8220;position&#8221; they were last at and pulling out any new updates for processing.</p>
<p>For layering purposes perhaps have queue managers that would take the last &#8220;position&#8221; as a request parameter and return 1-N available updates if any present.  Since it&#8217;s read only memory to all but one locking/blocking should be minimal.</p>
<p>Queue managers, server processes, could be placed in front of pools of consumers and provide answers based on reading snapshots from the master queue.  It would be possible for queue managers to have different filtering capabilities if not all messages were useful for all potential clients.</p>
<p>Heh, obviously, I like to roll my own solutions, but that doesn&#8217;t always work well with trying to fit into some massive organized framework.  It is however fun when there are no real world issues to deal with during the design process&#8230; <img src='http://www.puppetmastertrading.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-8684</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Wed, 17 Feb 2010 22:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-8684</guid>
		<description>Interesting, I just used the boost::asio examples to cobble together my connection classes, the timers where a little more obscure, but none of this took very long. Once I had the TCP client/server stuff going, it was only slightly more code to expand this to SSL. It is true select() can be surmised very quickly, but one may spend years finding subtle bugs and implementation problems. I do all my work with C++/Boost so I guess it I had a head start, and perhaps was a little bias :)</description>
		<content:encoded><![CDATA[<p>Interesting, I just used the boost::asio examples to cobble together my connection classes, the timers where a little more obscure, but none of this took very long. Once I had the TCP client/server stuff going, it was only slightly more code to expand this to SSL. It is true select() can be surmised very quickly, but one may spend years finding subtle bugs and implementation problems. I do all my work with C++/Boost so I guess it I had a head start, and perhaps was a little bias <img src='http://www.puppetmastertrading.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tito</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-8680</link>
		<dc:creator>tito</dc:creator>
		<pubDate>Wed, 17 Feb 2010 20:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-8680</guid>
		<description>&gt; what did you find so painful?

Getting a clue.  If I dust-off my vintage WR Stevens book and turn to chapter 12 on advanced i/o, I learn about select() in about six (dense) pages.  I&#039;m forced to learn about the arguments it takes and a variety of macros for manipulating them.  Admittedly, it&#039;s not easy to use select() correctly.  (Indeed, I&#039;ve already been informed that my little example Emitter has at least one error and readily admit that it suffers from use in an example that&#039;s contrived-to-the-point-of-absurdity.)   But to get the basic idea of it doesn&#039;t take much more than reading a few man pages.

Going to boost::asio&#039;s &lt;a href=&quot;http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/reference.html&quot; rel=&quot;nofollow&quot;&gt;reference&lt;/a&gt; almost couldn&#039;t be a more removed experience.  I didn&#039;t bother to count, but there must be nearly 100 classes/templates/options/services/functions/&amp;tc to wade through. 

I experienced terrifying flashbacks of Sun&#039;s visionary decision to put corba and rmi in the java class library.

I&#039;m sure that once you get &#039;grounded&#039; in the asio mindset it all makes sense and is very clean and nice, but I just wanted to whip together a simple example and get on with my day.  The fact that google doesn&#039;t include asio in the &lt;a href=&quot;http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Boost&quot; rel=&quot;nofollow&quot;&gt;teeny sliver of boost that they allow&lt;/a&gt;, didn&#039;t much inspire me to make the investment of time. 

But my real point was the difference I saw in using the two libraries.  boost::asio has been around for a long time and has good documentation (I think - certainly there&#039;s plenty of it), but I found it  hard to understand and get to work as desired.  Fastflow is doing non-trivial stuff, is brand new and has practically no documentation, but using it was very easy - there&#039;s not a lot of concepts you need to learn because the designers kept it simple and used layers of abstraction to hide things you might not initially care about.

Best,</description>
		<content:encoded><![CDATA[<p>> what did you find so painful?</p>
<p>Getting a clue.  If I dust-off my vintage WR Stevens book and turn to chapter 12 on advanced i/o, I learn about select() in about six (dense) pages.  I&#8217;m forced to learn about the arguments it takes and a variety of macros for manipulating them.  Admittedly, it&#8217;s not easy to use select() correctly.  (Indeed, I&#8217;ve already been informed that my little example Emitter has at least one error and readily admit that it suffers from use in an example that&#8217;s contrived-to-the-point-of-absurdity.)   But to get the basic idea of it doesn&#8217;t take much more than reading a few man pages.</p>
<p>Going to boost::asio&#8217;s <a href="http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/reference.html" rel="nofollow">reference</a> almost couldn&#8217;t be a more removed experience.  I didn&#8217;t bother to count, but there must be nearly 100 classes/templates/options/services/functions/&#038;tc to wade through. </p>
<p>I experienced terrifying flashbacks of Sun&#8217;s visionary decision to put corba and rmi in the java class library.</p>
<p>I&#8217;m sure that once you get &#8216;grounded&#8217; in the asio mindset it all makes sense and is very clean and nice, but I just wanted to whip together a simple example and get on with my day.  The fact that google doesn&#8217;t include asio in the <a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Boost" rel="nofollow">teeny sliver of boost that they allow</a>, didn&#8217;t much inspire me to make the investment of time. </p>
<p>But my real point was the difference I saw in using the two libraries.  boost::asio has been around for a long time and has good documentation (I think &#8211; certainly there&#8217;s plenty of it), but I found it  hard to understand and get to work as desired.  Fastflow is doing non-trivial stuff, is brand new and has practically no documentation, but using it was very easy &#8211; there&#8217;s not a lot of concepts you need to learn because the designers kept it simple and used layers of abstraction to hide things you might not initially care about.</p>
<p>Best,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://www.puppetmastertrading.com/blog/2010/02/16/lock-free/comment-page-1/#comment-8679</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Wed, 17 Feb 2010 18:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.puppetmastertrading.com/blog/?p=1010#comment-8679</guid>
		<description>As usual programmers will always disagree on the right path to take, I used boost::asio for all my non-blocking i/o and have had no problems whatsoever, what did you find so painful?</description>
		<content:encoded><![CDATA[<p>As usual programmers will always disagree on the right path to take, I used boost::asio for all my non-blocking i/o and have had no problems whatsoever, what did you find so painful?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

