<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkYFQ3g9eyp7ImA9WhRaFEg.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279</id><updated>2012-02-16T19:41:52.663-08:00</updated><title>jdd-cs527</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://jdd-cs527.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Jdd-cs527" /><feedburner:info uri="jdd-cs527" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DkIHSXk7fip7ImA9WxNUGUQ.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-6433255850220781225</id><published>2009-11-11T18:22:00.000-08:00</published><updated>2009-11-11T18:55:38.706-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-11T18:55:38.706-08:00</app:edited><title>Branch-and-Bound / Graphical Model / Structured Grids</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/31Ki8S3kG--igCn3G3QkLJ2aNkQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/31Ki8S3kG--igCn3G3QkLJ2aNkQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/31Ki8S3kG--igCn3G3QkLJ2aNkQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/31Ki8S3kG--igCn3G3QkLJ2aNkQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;Branch and Bound&lt;/strong&gt;&lt;br /&gt;This is another "pattern" that we are studying that does not quite strike me as a "pattern" but more of an algorithmic method. I have studied Branch and Bound in AI courses before, but never really considered it a pattern. Never the less, I suppose this paper does a reasonable job in explaining what it is, why it is &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-corrected"&gt;necessary&lt;/span&gt; and how it would be used.&lt;br /&gt;I suppose beyond the traditional branch and bound algorithm, this paper does give some &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-corrected"&gt;incite&lt;/span&gt; as to how such an algorithm could be carried out &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-corrected"&gt;efficiently&lt;/span&gt; through concurrency. I would have liked this pattern to focus much more on the concurrency aspect of Branch and Bounding or perhaps on some structures that may be especially useful for managing the branch and bound scenario in a parallel environment.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Graphical Models&lt;/strong&gt;&lt;br /&gt;Whoa. What is the deal here. I have found my self skipping to the "examples" section first to get a feel for what the pattern is talking about before heading back to read the rest of it. This time I was welcomed with a lovely "..." and no real examples. I guess that's all I could expect from a 3 page paper. The problem statement of this paper does not seem to have anything to do with the rest of the paper itself. "We can’t measure everything we need to know, and measurements are always noisy. How do we make use of the measurements we can perform to understand our data?" but then the paper discusses the graphic model behind probability.  I guess there is some &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-corrected"&gt;correlation&lt;/span&gt;, but man the authors of this are sure making you work to pick up on what they are trying to get across here.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Structured Grids&lt;/strong&gt;&lt;br /&gt;This one discusses how a "matrix-like" data structure can be exploited for parallelism. I see at the end of the paper they mention how geometric &lt;span id="SPELLING_ERROR_4" class="blsp-spelling-corrected"&gt;decomposition&lt;/span&gt; is a related pattern, but all in all i think this pattern IS just a specific instance of geometric decomposition. I think the solution of this paper was weak and hard to follow (although I guess there were a lot of pretty pictures!) and the math-heavy sections detracted from conveying the overall idea. I think they could have gone over how structured grids specifically allowed better processing over a geometric decomposition solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-6433255850220781225?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/bIqEKmP0VUc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/6433255850220781225/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/branch-and-bound-graphical-model.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6433255850220781225?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6433255850220781225?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/bIqEKmP0VUc/branch-and-bound-graphical-model.html" title="Branch-and-Bound / Graphical Model / Structured Grids" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/branch-and-bound-graphical-model.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMDRXc_fSp7ImA9WxNUGUQ.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-1260556553917855767</id><published>2009-11-11T13:34:00.000-08:00</published><updated>2009-11-11T18:21:14.945-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-11T18:21:14.945-08:00</app:edited><title>Shared Queue/Speculation/Circuits</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QqB6xpzeaHT7mpjqngAzQ1cTBi0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QqB6xpzeaHT7mpjqngAzQ1cTBi0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QqB6xpzeaHT7mpjqngAzQ1cTBi0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QqB6xpzeaHT7mpjqngAzQ1cTBi0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Shared Queue:&lt;br /&gt;&lt;br /&gt;An &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-error"&gt;enqueue&lt;/span&gt; or &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-error"&gt;dequeue&lt;/span&gt; seems like a very small operation. Why is there so much concern over contention to the queue? What factors cause this?&lt;br /&gt;&lt;strong&gt;The focus of a queue lies in the &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-error"&gt;enqueuing&lt;/span&gt; and &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-error"&gt;dequeuing&lt;/span&gt; of its elements because this is the only place where concurrency can corrupt the elements of a queue. If a &lt;span id="SPELLING_ERROR_4" class="blsp-spelling-error"&gt;enqueue&lt;/span&gt; is not set up in a thread-safe way, it is possible that data is put in out of order or worse lost all together and likewise with the &lt;span id="SPELLING_ERROR_5" class="blsp-spelling-error"&gt;dequeue&lt;/span&gt;.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Seeing as how the authors lay out quite a bit of code to support the variations of these patterns, they seem to mitigate their own concern as to the value of "simple protocols". Why would someone opt for the less efficient implementation, given that the concerns are already outlined, and sample code available?&lt;br /&gt;&lt;strong&gt;I think this question answers itself. Someone may opt for a less efficient implementation BECAUSE the &lt;span id="SPELLING_ERROR_6" class="blsp-spelling-corrected"&gt;concerns&lt;/span&gt; are already outlined with sample code available and this means that the developer would not have to worry about thinking through all the &lt;span id="SPELLING_ERROR_7" class="blsp-spelling-corrected"&gt;intricacies&lt;/span&gt; and it would probably be, in general, easier to implement than some complex solution.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Speculation:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Speculation seems like a pretty straightforward pattern, though potentially a quite powerful one. What factors would you consider to decide if speculation is an appropriate/beneficial pattern to apply?&lt;br /&gt;&lt;strong&gt;I think one important aspect of an application that would need to be present to make speculation be a feasible option is the &lt;span id="SPELLING_ERROR_8" class="blsp-spelling-corrected"&gt;opportunity&lt;/span&gt; for &lt;span id="SPELLING_ERROR_9" class="blsp-spelling-corrected"&gt;sequel&lt;/span&gt; tasks to actually not be sequential in nature all of the time. The paper talks about how the pattern attempts to run sequential tasks in parallel and then check predicts to see if the output was still valid or not. If it is not possible for sequential tasks to be &lt;span id="SPELLING_ERROR_10" class="blsp-spelling-corrected"&gt;executed&lt;/span&gt; without knowing the output of the previous step (which &lt;span id="SPELLING_ERROR_11" class="blsp-spelling-corrected"&gt;I'm&lt;/span&gt; &lt;span id="SPELLING_ERROR_12" class="blsp-spelling-corrected"&gt;guessing&lt;/span&gt; is the case for a vast majority of the time.) then this pattern is completely unusable unless there is some &lt;span id="SPELLING_ERROR_13" class="blsp-spelling-corrected"&gt;accurate&lt;/span&gt; way of guessing what the out put of each step would be. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Seeing as how you may not have data about the statistical distribution of inputs to expect before you build the program, and therefore perhaps not know the average cost of rollback, etc., is it prudent to implement the speculation pattern at the outset, or wait to evolve the application to include speculative optimizations down the road? What if the performance increase that speculation has the potential to generate is necessary to meet the minimum requirements of the specification? Is speculation still a viable pattern to apply, or would effort be better spent on other parallel optimizations with more certain outcome?&lt;br /&gt;&lt;strong&gt;Given an infinite number of processors, we could simply run the last step with every possible input and we would be able to calculate the n-step sequential chain in only one step, however there would be EXTREME waste in processing, and it may not be so easily to validate that the correct input was selected as the guess. Therefore to make this pattern work we need to be able to reasonably guess inputs and &lt;span id="SPELLING_ERROR_14" class="blsp-spelling-corrected"&gt;efficiently&lt;/span&gt; determine if an output is valid at a stage.&lt;/strong&gt;  &lt;strong&gt;This leads me to believe that speculation may be better implemented in a domain that is already well established in which expected inputs and outputs are already well known.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Circuits:&lt;br /&gt;&lt;br /&gt;Was this pattern what you expected from the name?&lt;br /&gt;&lt;strong&gt;No. I think this was a terrible name for this pattern. I suggest as a better one "parallel &lt;span id="SPELLING_ERROR_15" class="blsp-spelling-corrected"&gt;bit wise&lt;/span&gt; manipulation"&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;It seems like a great deal of this pattern is described through examples of clever transformations for specific problems. Do these examples give you enough information to go about applying this pattern to a problem dissimilar to the given examples? Can you think of a way of describing these transformations at a more abstract yet actionable level than the examples do?&lt;br /&gt;&lt;strong&gt;I found this pattern very hard to follow in the general sense. I could see what they were doing in Gray codes and the other examples they talked about, but I have a hard time envisioning how I would use this for anything other than what was already described in this paper.&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-1260556553917855767?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/oIoVCp0XFss" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/1260556553917855767/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/shared-queuespeculationcircuits.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/1260556553917855767?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/1260556553917855767?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/oIoVCp0XFss/shared-queuespeculationcircuits.html" title="Shared Queue/Speculation/Circuits" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/shared-queuespeculationcircuits.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYNSH06cSp7ImA9WxNUF04.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-2017339978144275169</id><published>2009-11-08T16:53:00.001-08:00</published><updated>2009-11-08T17:29:59.319-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-08T17:29:59.319-08:00</app:edited><title>Loop Parallelism, Task Queue, Graph Partitioning</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/m64Ugrhw8EXRUcPAYfani4IUyrM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/m64Ugrhw8EXRUcPAYfani4IUyrM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/m64Ugrhw8EXRUcPAYfani4IUyrM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/m64Ugrhw8EXRUcPAYfani4IUyrM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;Loop Parallelism&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; --------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; 1. The author says the goal of incremental parallelization is to "evolve" a sequential program into a parallel program. If you have experience in refactoring code from sequential to parallel, how did your approach differ from the steps presented in the paper?&lt;/span&gt;&lt;br /&gt;The approach listed in the paper made a lot of sense to me. Identify areas where you are most likely to make a impact (Amdahl's Law) then analyze and sequentially improve those areas. I have found myself searching for areas that would be easily parallelizable and then working on those only to find a lack of overall application improvement.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt; 2. Many of us have used Eclipse or another IDE, with their respective plugins, for execution profiling. What has been your experience with these tools? What is your preferred method of locating the code in question (automatic or manual)?&lt;br /&gt;&lt;/span&gt;I would have to go with the obvious and say automatic discovery is better than manual, however I must admit that I haven't spent too much time on making applications more efficient. I think there is rarely a monetarily justifiable reason to do so in industry and most of the time of enineers goes to adding features that can be sold right away.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt; 3. The author states, "The application of many transformations to many loops may be necessary before efficient performance is achieved." What is your opinion on this statement?&lt;/span&gt;&lt;br /&gt;I would have to say that it depends on the loops you are trying to improve upon. If the loops are simple and related, it may be possible to achieve great improvements quickly and trivially. However, the more intertwined and complex the loops and their data become, the more difficult it must be to parallelize them. I can only imagine the upkeep of such parallized complex loops would be absurd to put it nicely.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Task Queue Implementation Pattern&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; ------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; How would you compare the Task Queue pattern to other similar distribution patterns like divide-and-conquer and fork/join pattern?&lt;/span&gt;&lt;br /&gt; I think task queue makes a lot of since. It is also talking about dividing and conquering a task, but gives more direction on how to do it. There is some queue (or perhaps distributed multiple queues) and new tasks are put in and taken out from these as resources or tasks become available. Makes sense, right?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Graph Partitioning Implementation Strategy Pattern&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; -------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;div style="font-weight: bold;" id=":oy" class="ii gt"&gt; 1. This was probably one of the more math-oriented patterns I have seen and/or read. How often have you experienced a situation where the graph partition strategy would have been useful? If never, can you think of any future situations where this pattern might be come in handy and could be applied?&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;I'm having a hard time coming up with a situation when I could have personally put this pattern into use. I think this is probably more useful in complex mathematically situations probably relevant for lab experiments, simulations, data mining, etc. but maybe not so much in end user focused applications. Also this pattern didn't even really strike me as a pattern at all, but more of an algorithm for splitting graphs apart. The line is starting to blur on what is a software pattern and what is a mathematical idea.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-2017339978144275169?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/OmFk0CrOzSQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/2017339978144275169/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/loop-parallelism-task-queue-graph.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/2017339978144275169?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/2017339978144275169?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/OmFk0CrOzSQ/loop-parallelism-task-queue-graph.html" title="Loop Parallelism, Task Queue, Graph Partitioning" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/loop-parallelism-task-queue-graph.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4CSXc4fCp7ImA9WxNUF08.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-5319239113663968328</id><published>2009-11-08T16:31:00.000-08:00</published><updated>2009-11-08T16:52:48.934-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-08T16:52:48.934-08:00</app:edited><title>PRES: Probabilistic Replay with Execution Sketching on Multiprocessors</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1DLyIIRFQ-HfkVhNnRPADH6r5-U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1DLyIIRFQ-HfkVhNnRPADH6r5-U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1DLyIIRFQ-HfkVhNnRPADH6r5-U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1DLyIIRFQ-HfkVhNnRPADH6r5-U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;- What do you expect from a debugging tool?&lt;/span&gt;&lt;br /&gt;I would expect a debugging tool to help me examine the internal state of my application throughout the execution of it.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt; - What debugging tools do you usually use? What are good and bad about them?&lt;/span&gt;&lt;br /&gt; I usually use Eclipse running in debug mode and sometimes have to rely on dumping to log files for some tricking multi-threaded issues. Eclipse (and similar IDE based debuggers) are good because you can request the value of a variable at explicit times and step through an execution of the program to see how methods, messages, variables, whatever, interact with each other. However, they are bad for concurrent programming debugging. There is generally only two choices in debugging a concurrent application in an IDE and both result in an unnatural run of the application.  The first is to let all threads go while you are stepping through one thread: this can produce bizarre behavior as the program may be expecting the threads to keep up with each other. Another is to halt the application completely as you walk through one thread but this also can lead to strange behavior as you are forcing other processes that would have normally been executing to wait. Neither of these approaches do well in reproducing strange concurrent behavior. Simply dumping out put (i.e. the old "print line" approach) across many threads help to see the actual behavior of a concurrent application but does not do well do help you do anything about it. Log files can also get clunky very quickly and even after reproducing a concurrent issue with log file dumping on, it can be difficult to trace through the thread executions that caused that issue.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- What are the challenges of debugging a sequential program? What are&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; additional challenges of debugging a parallel program?&lt;/span&gt;&lt;br /&gt; Debugging a sequential program is easy with an IDE or similar, just give a known input with an expected out put, and step through the application to see how the input is processed and where it becomes inconsistent with what was expected. Debugging parallel programs is much harder as the thread interleavings, share memory states, etc. are all variable and dependent on each other.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- How important is replay for debugging?&lt;/span&gt;&lt;br /&gt; It is very important to be able to reproduce a bug to fix it. Without being able to reproduce it, you really have no way of knowing when its fixed or what caused the issue in the first place.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; - If you need to design a deterministic replay system, how are you&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; going to do it for sequential programs? Does it work for parallel&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; programs? If now, how to make it work?&lt;/span&gt;&lt;br /&gt; For sequential programs, you can simply take state snap shots at various points in the program that would give enough information to known whats going on. Then the replay would just insert that snapshot back into the system and let it play out again. Because sequential programs are (barring some weird hardware behavior) for the most part deterministic, they should be relatively easy to replay. The same idea holes for parallel programs, but they just require much more state to be recording to accurately reproduce and replay the state of the system. The PRES project detailed out many "sketching" ideas that purposed just what needed to be recorded at a minimum to be able to quickly replay a concurrency issue.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-5319239113663968328?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/AGukIP499E0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/5319239113663968328/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/pres-probabilistic-replay-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/5319239113663968328?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/5319239113663968328?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/AGukIP499E0/pres-probabilistic-replay-with.html" title="PRES: Probabilistic Replay with Execution Sketching on Multiprocessors" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/pres-probabilistic-replay-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YAQH06eip7ImA9WxNUE0Q.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-4131889128691721812</id><published>2009-11-04T18:49:00.000-08:00</published><updated>2009-11-04T19:19:01.312-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-04T19:19:01.312-08:00</app:edited><title>Armstrong Thesis Chap 6</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pNZ7Zmpf0q7MIGEHJwPv5v_n-cY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pNZ7Zmpf0q7MIGEHJwPv5v_n-cY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pNZ7Zmpf0q7MIGEHJwPv5v_n-cY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pNZ7Zmpf0q7MIGEHJwPv5v_n-cY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;gen_server and gen_event seem to be similar in form and behaviour, what are the differences between them? Why do we need a separate behavior that can be emulated with gen_server?&lt;br /&gt;--&lt;strong&gt;I think the gen_event is basically a server that is specifically set up as a "subscriber" or "observer" for events. I guess a reason to have specific servers dedicated as listening to and responding events as opposed to a traditional server (which i'm guessing sits and waits for requests and responds directly too them) is if you wanted to have entitys waiting for system triggers or similar. They could be listening passively for most events but then WHAM when the right one comes they pounce. Also if the gen_event are set asside specifically for things like logging, perhaps we can leave some of these out of our servers to better isolate functionality.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;What do you think about the benefits that Joe mentions at the end about small and fixed set of behaviours? Any more benefits? Or maybe some disadvantages?&lt;br /&gt;--&lt;strong&gt;I think these benefits do ring true. Similar to design patterns as a whole, a small and fixed set of behaviors gives programmers a language to discuss things quickly and concisely without wasting a lot of time redefining similar terms and processes over and over again.  Also keeping the design simple and reusing well tested components is very valuable. I know I have come up with some pretty wacky and over the top designs for things (see my previous post) that were entirely uneccessary but just seemed like a good idea at the time to either flex my ego or try to show off some new technology or idea.&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-4131889128691721812?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/gNW6Lk_K7UU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/4131889128691721812/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/armstrong-thesis-chap-6.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/4131889128691721812?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/4131889128691721812?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/gNW6Lk_K7UU/armstrong-thesis-chap-6.html" title="Armstrong Thesis Chap 6" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/armstrong-thesis-chap-6.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UDSHY8cCp7ImA9WxNUE0U.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-9027933315913911423</id><published>2009-11-04T18:34:00.000-08:00</published><updated>2009-11-04T18:47:59.878-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-04T18:47:59.878-08:00</app:edited><title>Pipeline, Decomposition, Data Parallelism</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Kz7haDVLjGm9LlwlCChvrV2ENXY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kz7haDVLjGm9LlwlCChvrV2ENXY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Kz7haDVLjGm9LlwlCChvrV2ENXY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kz7haDVLjGm9LlwlCChvrV2ENXY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Are you a pipeline?&lt;br /&gt;Did we already do you?&lt;br /&gt;Parallel, I guess...&lt;br /&gt;&lt;br /&gt;--------------------------&lt;br /&gt;&lt;br /&gt;In this set, we discuss how to achieve parallelism by dividing up your data, or by dividing up your calculations. Are there any other kinds of parallelism, or can all parallel design patterns be placed into these two categories?&lt;br /&gt;--&lt;strong&gt;It seems to me that these are a pretty exhaustive set of actions. If attempting to perform some tasks and gain performance on it, it seems to me that you can only break up the tasks into smaller tasks (dividing up your data) or performing the tasks at the same time (dividing up your calculations). I can't think of any other ways to parallelize something.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Have you used any of these? If you have, have you found them particularly useful? Challenging to work with? If you have any experience, what were their advantages or limitations?&lt;br /&gt;What types of programs might any of these patterns be particularly useful for?&lt;br /&gt;--&lt;strong&gt;This may sound ridiculous but I think I stumbled on all 3 of these patterns in one fell swoop a few years back (they are kind of related after all).  I was attempting to make a log analyzing application for massive log files. I just had an input stream of the file and read in a little bit, made a "chunk" of it and spawned a new thread to process that "chunk" (geomeric decomposition). This thread would, in turn, complete some first pass processing and pass to another thread for the next phase and so on (pipeline). I'm not sure if this approach was particularly useful or not, I think if I were going for speed it may have been faster to load everything into main memory and perform all the operations real quick than all this complicated thread message passing. It was confusing and certain points of aggregated data that needed synchronization slowed down the system considerably. One advantage that I found, however, was that the memory foot print during any given time was very small compared to the amount of data I was processing and the gui response time was very quick (i was charting some data and I could see new points being added at extremely rapid rates). I think these patterns are more useful when there is just TONs of data such that even several hundred aggregation points would still shadow in comparison to the calculations being done.&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-9027933315913911423?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/5mwSudo12Rw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/9027933315913911423/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/pipeline-decomposition-data-parallelism.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/9027933315913911423?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/9027933315913911423?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/5mwSudo12Rw/pipeline-decomposition-data-parallelism.html" title="Pipeline, Decomposition, Data Parallelism" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/pipeline-decomposition-data-parallelism.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEENQ306eSp7ImA9WxNUEk8.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-4477022761555729406</id><published>2009-11-02T21:02:00.000-08:00</published><updated>2009-11-02T21:38:12.311-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-02T21:38:12.311-08:00</app:edited><title>Armstrong Thesis 5</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/j78GOyc6NsyOH7Zi1v12Clo2ZbU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j78GOyc6NsyOH7Zi1v12Clo2ZbU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/j78GOyc6NsyOH7Zi1v12Clo2ZbU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j78GOyc6NsyOH7Zi1v12Clo2ZbU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;Supervision hierarchies:&lt;br /&gt;------------------------&lt;br /&gt;&lt;span id="SPELLING_ERROR_0" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt;’s supervision hierarchy proposes two flavors of supervisors:&lt;br /&gt;AND and OR supervisors.&lt;br /&gt;- To which kind of applications does each of them apply?&lt;br /&gt;&lt;/strong&gt;AND supervisors apply to applications which require many dependent processes to run successfully and OR supervisors apply more to applications with independent processes in which restarting one would not affect the others.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;Recursive &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-corrected"&gt;restart ability&lt;/span&gt; is the ability of a system to tolerate restarts&lt;br /&gt;at multiple levels. &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt;, through its supervision hierarchies, implements&lt;br /&gt;recursive &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-corrected"&gt;restart ability&lt;/span&gt;.&lt;br /&gt;- Would you say that the supervision hierarchy mechanism in &lt;span id="SPELLING_ERROR_4" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt;&lt;br /&gt;makes restarts cheap? Does it also improve fault tolerance? Can you&lt;br /&gt;please explain why? &lt;/strong&gt;&lt;br /&gt;It can make restarts relatively cheap by allowing restarts to occur only at the &lt;span id="SPELLING_ERROR_5" class="blsp-spelling-corrected"&gt;necessary&lt;/span&gt; level. I don't think a restart can be truly considered cheap at any amount though, but the layered approach &lt;span id="SPELLING_ERROR_6" class="blsp-spelling-corrected"&gt;allows&lt;/span&gt; some waste to be avoided. As far as improving fault tolerance, I think the supervision hierarchy can improve fault tolerance by increases the number of eyes looking for a fault.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;- How does module granularity in the supervision hierarchy affect&lt;br /&gt;the fault tolerance of the system?&lt;br /&gt;&lt;/strong&gt;More supervisors and more layers means a restart can be made more local to the fault but also means more management overhead.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Error handling and error interpretation:&lt;br /&gt;----------------------------------------&lt;br /&gt;Joe Armstrong defines an error as the deviation between the observed&lt;br /&gt;behavior of a system and the desired behavior of a system. However,&lt;br /&gt;building real systems is complicated by the fact that the programmer&lt;br /&gt;often does not have a complete specification, but only some general&lt;br /&gt;notion as to what constitutes an error, and what does not.&lt;br /&gt;- How does &lt;span id="SPELLING_ERROR_7" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt; deal with this issue in its error handling model?&lt;br /&gt;&lt;/strong&gt;If it doesn't meet the specification, throw an exception!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For each &lt;span id="SPELLING_ERROR_8" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt; task, a supervisor will assign a worker to try to&lt;br /&gt;achieve the goals implied by the task. Supervisors detect exceptions&lt;br /&gt;generated by workers and are able to start, stop and restart them.&lt;br /&gt;- Considering that with all the language support that &lt;span id="SPELLING_ERROR_9" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt; provides&lt;br /&gt;for this feature, the programmer still needs to implement the&lt;br /&gt;supervisors and to plan for failure, would you still think that it's&lt;br /&gt;safe to say that this approach is more robust than the traditional ones?&lt;br /&gt;&lt;/strong&gt;I don't know about "traditional ones" but I think a similar scheme could be mocked up in almost any language and doesn't necessarily have to be done in &lt;span id="SPELLING_ERROR_10" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt;. &lt;span id="SPELLING_ERROR_11" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt; does, however, seem to give good language level support for this type of system.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-4477022761555729406?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/5jaWEyETmv0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/4477022761555729406/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/armstrong-thesis-5.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/4477022761555729406?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/4477022761555729406?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/5jaWEyETmv0/armstrong-thesis-5.html" title="Armstrong Thesis 5" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/armstrong-thesis-5.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIBSX04fCp7ImA9WxNUEk8.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-1539370947381908109</id><published>2009-11-02T20:21:00.000-08:00</published><updated>2009-11-02T21:02:38.334-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-02T21:02:38.334-08:00</app:edited><title>Task Parallelism, Recursive Splitting and Discrete Event patterns</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LOdJS141t0U9Bz5Jbf4WjFt3WFs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LOdJS141t0U9Bz5Jbf4WjFt3WFs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LOdJS141t0U9Bz5Jbf4WjFt3WFs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LOdJS141t0U9Bz5Jbf4WjFt3WFs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;Task Parallelism&lt;/strong&gt;&lt;br /&gt;The Task Parallelism pattern gave some interesting &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-corrected"&gt;in site&lt;/span&gt; on cost of &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-corrected"&gt;synchronization&lt;/span&gt; management vs. granularity of the task management for different parallel environments (over a network, across an &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-corrected"&gt;OS&lt;/span&gt;, etc.). Other than the numbers and graphs though, I'm not sure this pattern offered anything new that we haven't already discussed in this course so far. It is clear that for tasks to be able to effectively work in parallel, they must be of a nature that they can work together without knowledge of what any of the other tasks are doing and also require minimal coordination among them such that the cost of management does not outweigh the benefit of the &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-error"&gt;parallelization&lt;/span&gt;. As Gabriel purports in his questions on this topic, I agree that for truly significant improvements in &lt;span id="SPELLING_ERROR_4" class="blsp-spelling-error"&gt;parallelization&lt;/span&gt; of software there needs to be a change in hardware support. For as the paper shows, the cost of &lt;span id="SPELLING_ERROR_5" class="blsp-spelling-corrected"&gt;synchronization&lt;/span&gt; at the hardware level is much cheaper than that at the network level.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Recursive Splitting&lt;/strong&gt;&lt;br /&gt;This pattern suggests that to keep hardware utility high, recursive problems need to split to not just simpler cases and eventually to a base case, but to more and more cases each time. Here Gabriel asks "The authors mention that the ideas behind the Fork/Join and Task-queue strategy patterns are essential to any developer who wants an efficient implementation of the Recursive Splitting pattern. Why?" My answer to this is that the key to successfully using recursively splitting for any type of performance gain requires efficient hand offs and reductions when the splitting occurs, or else all benefit from it will be lost to the overhead of aggregating the data at the end and the Fork/Join and Task-queue strategies give efficient methods for just this.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Discrete Event&lt;/strong&gt;&lt;br /&gt;I think the main difference between this pattern and the "Event based, Implicit Invocation" pattern is simply how the events are processed. This pattern gives more thought to things such as event ordered and how it could be handled if events are processed out of order (roll it back like &lt;span id="SPELLING_ERROR_6" class="blsp-spelling-error"&gt;Walmart's&lt;/span&gt; prices or be super cautious). I think timeouts to detect deadlock could be reasonable and certainly seems easier from an implementation standpoint. There is of course the fear that something would "timeout" that would have actually finished at some point and there is wasted and redone computation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-1539370947381908109?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/X7Z_V-9oqnw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/1539370947381908109/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/11/task-parallelism-recursive-splitting.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/1539370947381908109?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/1539370947381908109?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/X7Z_V-9oqnw/task-parallelism-recursive-splitting.html" title="Task Parallelism, Recursive Splitting and Discrete Event patterns" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/11/task-parallelism-recursive-splitting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMEQHg7eip7ImA9WxNVEUU.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-3021561392304656080</id><published>2009-10-21T20:30:00.000-07:00</published><updated>2009-10-21T20:50:01.602-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-21T20:50:01.602-07:00</app:edited><title>Monte Carlo, Graphs and Dense Linear Algebra oh my!</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Igm3NAwmkiAaVwe1_Ke7W2H6u7Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Igm3NAwmkiAaVwe1_Ke7W2H6u7Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Igm3NAwmkiAaVwe1_Ke7W2H6u7Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Igm3NAwmkiAaVwe1_Ke7W2H6u7Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Is it guess and check&lt;br /&gt;to which my life reduces?&lt;br /&gt;Oh, Monte Carlo!&lt;/p&gt;&lt;p&gt;----------------------------&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Do you know these patterns, or are they new to you?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I don't know any of these patterns as patterns persay, but at least I was familiar with Graphs and Linear algebra. For example, I am aware of graphs. I have a general idea of what you can do with them. I am aware of Linear Algebra. These (and I'm assuming Monte Carlo as well, although I must, in shame, admit that I had not heard of Monte Carlo) have probably been around for quite some time though, much beyond the patterns.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;If they are new, could you understand them? &lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I think I got a good understanding of Monte Carlo from this paper. I purport that humans are simple one giant 4 billion process Monte Carlo simulation of "life" and giant godly Reduce function is agregating our results as we die.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;How are computational patterns different from structural patterns? Is there a clear distinction, or a fuzzy one?&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To me it sees that Structoral Patterns help define how you set up a program and Computation Patterns help to define how to actually solve a program. For example, &lt;a href="http://jdd-cs527.blogspot.com/2009/10/event-based-implicit-invocation-and-map.html"&gt;MapReduce&lt;/a&gt; ( a structural pattern, or now that I think about it... was that a computational pattern.. I guess it actually is solving something now isn't it.... I suppose it is a pretty clear distinction between Computational and Structural.) was used to help run Monte Carlo experiments. Likewise, Divide and Conquer (copmutational?) and Composite (structural) help to define how to solve Graphing algorithms.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-3021561392304656080?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/PAVEstieW4Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/3021561392304656080/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/monte-carlo-graphs-and-dense-linear.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/3021561392304656080?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/3021561392304656080?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/PAVEstieW4Q/monte-carlo-graphs-and-dense-linear.html" title="Monte Carlo, Graphs and Dense Linear Algebra oh my!" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/monte-carlo-graphs-and-dense-linear.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUBQHs8cCp7ImA9WxNVEUU.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-634540376274054689</id><published>2009-10-21T20:17:00.000-07:00</published><updated>2009-10-21T20:30:51.578-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-21T20:30:51.578-07:00</app:edited><title>Armstrong Thesis ch4</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eWmC_P-Z6qBWQ9jSGa8LONUfRKc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eWmC_P-Z6qBWQ9jSGa8LONUfRKc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eWmC_P-Z6qBWQ9jSGa8LONUfRKc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eWmC_P-Z6qBWQ9jSGa8LONUfRKc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The author states that it is impossible to write concurrent code in a side effect free manner. Do you agree?&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I don't think with our current programming languages we can write concurrent code in a side effect free manner. All concurrency needs to be thought out and planned for at this point, which &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-corrected"&gt;undoubtedly&lt;/span&gt; affects the design, the code and the behavior of the application. Perhaps one day this can be automated through some new innovative programming languages, in which case writing concurrent code would be just like writing serial code and there would be no such new side effects.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Would there be any difficulties of following the error handling recommendations (let another process fix it, supervisors, let it crash) in another language than &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-error"&gt;Erlang&lt;/span&gt;?&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I think time outs could probably at least simulate the implementation of these recommendations in any other concurrency capable programming language.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;How important is it to use intentional programming when it comes to maintenance? (The author gave the example of history of &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-error"&gt;theDictionary&lt;/span&gt; &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-error"&gt;API&lt;/span&gt;)&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Intentional programming is VERY important when it comes to &lt;span id="SPELLING_ERROR_4" class="blsp-spelling-corrected"&gt;maintenance&lt;/span&gt;. I've worked on a few projects with pretty cryptic code and not only did it not make the actual functionality very difficult to follow, it also made the intended functionality very difficult to follow. This, in turn, gave rise to doubts of the actual behavior of the program was expected and according to design or of it was a bug. &lt;span id="SPELLING_ERROR_5" class="blsp-spelling-corrected"&gt;Intentional&lt;/span&gt; programming is useful in that programmers beyond the original can glance over source code and know by method names and coding style if the actual code matches what the expected should be and can help build confidence that the program is running per specification.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-634540376274054689?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/M1ebkp8Xg-o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/634540376274054689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/armstrong-thesis-ch4.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/634540376274054689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/634540376274054689?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/M1ebkp8Xg-o/armstrong-thesis-ch4.html" title="Armstrong Thesis ch4" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/armstrong-thesis-ch4.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8HR3Y8eSp7ImA9WxNVEEw.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-2187137688232516138</id><published>2009-10-19T21:18:00.000-07:00</published><updated>2009-10-19T21:43:56.871-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-19T21:43:56.871-07:00</app:edited><title>Event-based Implicit Invocation AND Map-reduce</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kyxr5-Abd8OxH_Ff5FqzZNMIGgM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kyxr5-Abd8OxH_Ff5FqzZNMIGgM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kyxr5-Abd8OxH_Ff5FqzZNMIGgM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kyxr5-Abd8OxH_Ff5FqzZNMIGgM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Event-based implicit invocation&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;How is this pattern related to the well-documented observer pattern and &lt;/strong&gt;&lt;strong&gt;publisher/subscriber patterns? Are they the same? How are they different?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I think Event-based implicit invocation IS essentially the observer / publisher/subscribe pattern. One difference does appear to be that rather than observers subscribing to subjects directly, this paper discussion some middle-layer "medium" to help pass around events and balance the load of massive subscriptions and event passing.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What are some advantages and disadvantages of implicit invocation versus explicit invocation?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Implicit invocation is easy: you just dump an event out there and pretty much that's the end of it. If someone is interested in it they will have subscribed to receive that event. Explicit invocation requires a little bit more knowledge about the observers from the subject so that they can actually make the explicit invocation. However, both pretty much achieve the same result.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What applications can benefit from a blocking vs. non-blocking event dispatching call? &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Applications that can send messages without caring if they're heard in some reasonable amount of time can use non-blocking event dispatching calls because they don't need to wait for a response. More communication critical applications should probably make blocking calls to allow for proper time outs / error handling &lt;/p&gt;&lt;p&gt;&lt;strong&gt;There are many messaging &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-error"&gt;middleware&lt;/span&gt; products available - should there be a messaging standard so that all applications can talk with each other, instead of relying on a message broker middle-man?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;A standard message protocol would allow third party apps to message each other more seamlessly. I'm sure some such standards do exist (possibly for particular fields) and can name at least one in the field of medical imaging: &lt;a href="http://en.wikipedia.org/wiki/Digital_Imaging_and_Communications_in_Medicine"&gt;&lt;span id="SPELLING_ERROR_1" class="blsp-spelling-error"&gt;DICOM&lt;/span&gt;&lt;/a&gt; . &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-error"&gt;DICOM&lt;/span&gt; allows entities to message each other for connectivity and perform a limited range of functions (query / retrieve images, store images, etc.)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Map Reduce&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Map reduce is essentially just a big parallel divide / conquer / &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-corrected"&gt;aggregate&lt;/span&gt;. &lt;/p&gt;&lt;p&gt;I think failures should be handled by the system and invisible to the user. In fact one of the key benefits of Map Reduce, in my opinion, is that users only need to define the map and reduce methods. This allows for, as the paper says, "domain experts (as opposed to parallel computing gurus) to implement highly scalable programs based on this pattern."&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-2187137688232516138?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/rj7JNWQagXk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/2187137688232516138/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/event-based-implicit-invocation-and-map.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/2187137688232516138?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/2187137688232516138?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/rj7JNWQagXk/event-based-implicit-invocation-and-map.html" title="Event-based Implicit Invocation AND Map-reduce" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/event-based-implicit-invocation-and-map.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUCQno5cSp7ImA9WxNVEEw.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-3291614688933144355</id><published>2009-10-19T20:33:00.000-07:00</published><updated>2009-10-19T21:17:43.429-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-19T21:17:43.429-07:00</app:edited><title>Armstrong Thesis Ch. 2</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9CV9_PqUJknzQj81L8hLwp1GGsU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9CV9_PqUJknzQj81L8hLwp1GGsU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9CV9_PqUJknzQj81L8hLwp1GGsU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9CV9_PqUJknzQj81L8hLwp1GGsU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;Armstrong advocates an architecture of inter-process communication solely via messages with no data sharing as the way to construct fault isolating systems. He claims this architecture also faciliates parallelism. What do you think? What advantages or disadvantages does this type of system have?&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;I think the inter-process communication does help isolate faults because it isolates the processes from corrupting each others data via some shared data. This in itself helps to facilitate parallelism because one process going down cannot take down the entire system. There may be some additional overhead to retrieve remote variables through message passing rather than directly through some shared memory access&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Armstrong describes "fast-fail" processes as a mean for fault isolation and a way to ease fault management. A process should halt on encountering a failure. What do you think about this idea? What needs to be done to enable it?&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;"Fast-fail" is critical for fault isolation and management because it can prevent (to some degree) the spreading of false data and false system state (that a node is not failed when it actually is.) However, to enable "fast-fail" there would need to be some way of detecting failures and a method for letting a node know that is has failed. This would have to be handled with care so that people do not maleciously tell nodes they have failed as a denial of service attack or do not mistakenly tell a good node that it has gone bad.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What do you think about Armstrong's deicision of treaing the messaging layer as unreliable? What are the tradeoffs behind this decision? How does it affect the implementation of the modules that relies on it to communicate?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I think the choice to treat the messaging layer as unreliable helps in connectivity problem detection. If a messaging system was  assumed to be reliable but a node was down, it would be difficult to detect. By requiring ACK messages to verify your message has been received you know that the message was receive and the connection is reliable. Of course this adds much overhead to simple message passing, to sit and wait for an ACK and (possibly) resend again unneccessarily.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-3291614688933144355?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/fOxmBeTsIC8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/3291614688933144355/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/armstrong-thesis-ch-2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/3291614688933144355?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/3291614688933144355?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/fOxmBeTsIC8/armstrong-thesis-ch-2.html" title="Armstrong Thesis Ch. 2" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/armstrong-thesis-ch-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4GQ3c4eip7ImA9WxNWFUo.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-6464809781488735116</id><published>2009-10-14T20:24:00.000-07:00</published><updated>2009-10-14T20:38:42.932-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-14T20:38:42.932-07:00</app:edited><title>Chess</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/biCeRc1AKqzhyqBUZWLkmjAtxI8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/biCeRc1AKqzhyqBUZWLkmjAtxI8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/biCeRc1AKqzhyqBUZWLkmjAtxI8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/biCeRc1AKqzhyqBUZWLkmjAtxI8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;your move heisenbug&lt;br /&gt;"Okay, rook to king's pawn 3"&lt;br /&gt;shall we start over?&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;Wow a paper from microsoft research.&lt;br /&gt;&lt;br /&gt;The Chess method of systematically testing different thread interleavings to try to reproduce intterleaving dependent faulty behavior is a good idea and I am impressed by some of the claims they make about finding new bugs in several well know systems.&lt;br /&gt;&lt;br /&gt;I also find it interesting how they trimmed back the massive tree of interleaving combinations to keep the system interactively fast. I wonder if there are more bugs to be uncovered, though, in  even the rare "pruned out" interleavings. I do think they make a rather bold claim in the beginning when they say the paper offers "the ability to consistantly reproduce crashing bugs of unknown cause".  I'm guessing they can still only reproduce a small portion of such crashing bugs and extensive validation cycles of software would still be neccessary. (Or even if not neccessary, forced upon by the government.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-6464809781488735116?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/GljlGLYIsD0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/6464809781488735116/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/chess.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6464809781488735116?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6464809781488735116?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/GljlGLYIsD0/chess.html" title="Chess" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/chess.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8BSX06fCp7ImA9WxNWFUo.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-451878989656101019</id><published>2009-10-14T17:59:00.000-07:00</published><updated>2009-10-14T20:20:58.314-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-14T20:20:58.314-07:00</app:edited><title>OPL Architectural Patterns (Layers, Pipe-n-Filter, Iterative Refinement)</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MgHExxPjreuXgQ5BVwnTrZJcgGo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MgHExxPjreuXgQ5BVwnTrZJcgGo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MgHExxPjreuXgQ5BVwnTrZJcgGo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MgHExxPjreuXgQ5BVwnTrZJcgGo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;How do the two repeats differ from the first versions that you read?&lt;br /&gt;&lt;/strong&gt;These new versions of Layered Systems and Pipe-n-Filter Systems read more like recipes and less like the theory of version from before. It's just a quick, down and dirty "This is the problem that it solves and this is why you would want to do it."&lt;/p&gt;&lt;p&gt;&lt;strong&gt;They are shorter.  Did they miss anything?&lt;br /&gt;&lt;/strong&gt;I actually don't think these versions missed anything. In my opinion the previous versions were way to long and detailed and easy to get lost. Even though these are way shorter, I think they are very focused on describing the ideas behind Layers and Pipes to an extent that a reader may be able to recognize it in a system on which they had worked on.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Did they include something that the first versions didn't? &lt;br /&gt;&lt;/strong&gt;I was already pretty familiar with the ideas behind both of these architectures and I think both gave a &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-corrected"&gt;necessary&lt;/span&gt; amount of information to describe the patterns. Nothing seemed really unique among these new version over before although there was a VERY SLIGHT lean towards how the architectures lent themselves to be useful in parallel processing.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Did you learn anything from them? &lt;br /&gt;&lt;/strong&gt;To be honest, I did not pick up anything new from these new descriptions of Layered Architectures or Pipe-n-Filter architectures.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Do you have any advice to the authors of these patterns?&lt;br /&gt;&lt;/strong&gt;I would advise to try to speak more to how these &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-corrected"&gt;architectures&lt;/span&gt; could be used or modified to use parallel computing to its advantage more explicitly. For example, the layered systems paper could talk about how each layer could itself consist of multiple cores or how many layers could be represented with one core each all one one machine.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;For the new pattern, have you seen programs that used it?&lt;br /&gt;&lt;/strong&gt;I have not actually heard of the iterative refinement pattern before this paper.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What was hardest to understand about this pattern?&lt;br /&gt;&lt;/strong&gt;The hardest part to understand about the iterative refinement pattern is when it could be useful. I know they had some high level examples such as that it "is very common in drug discovery". I know this will sound contradictory to my above about the conciseness as a virtue nature of the other two patterns (maybe because I already feel like I know enough about them) but I think more detail and explicit &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-corrected"&gt;illustration&lt;/span&gt; of how to use this pattern could be of use.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-451878989656101019?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/y8GhlmnnxX8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/451878989656101019/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/opl-architectural-patterns-layers-pipe.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/451878989656101019?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/451878989656101019?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/y8GhlmnnxX8/opl-architectural-patterns-layers-pipe.html" title="OPL Architectural Patterns (Layers, Pipe-n-Filter, Iterative Refinement)" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/opl-architectural-patterns-layers-pipe.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MEQ3g9eCp7ImA9WxNWE0U.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-5684476254065661752</id><published>2009-10-12T16:00:00.000-07:00</published><updated>2009-10-12T16:16:42.660-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-12T16:16:42.660-07:00</app:edited><title>Refactoring for Reentrancy</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/I_RGp2kSKgEw7uRPoeJnlvsnI0g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I_RGp2kSKgEw7uRPoeJnlvsnI0g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/I_RGp2kSKgEw7uRPoeJnlvsnI0g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I_RGp2kSKgEw7uRPoeJnlvsnI0g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Ah Reentrancy&lt;br /&gt;Oh Wait. Let me start again.&lt;br /&gt;Ah Reentrancy.&lt;br /&gt;&lt;br /&gt;-----&lt;br /&gt;&lt;br /&gt;It's getting harder and harder to write about these "Eclipse parallelism automatic refactoring plugins" see through &lt;a href="http://jdd-cs527.blogspot.com/2009/10/refactoring-sequential-java-code-for.html"&gt;concurrent libraries&lt;/a&gt;, and &lt;a href="http://jdd-cs527.blogspot.com/2009/10/relooper-refactoring-for-loop.html"&gt;relooper&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Summarizing the main points of this (and other) paper[s].&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Most current programs are not in the best shape for the new wave of multi-core processors&lt;/li&gt;&lt;li&gt;Programs either need to be re-engineered from the ground up with concurrency in mind or refactored&lt;/li&gt;&lt;li&gt;Refactoring is manual and tedious with a small return on investment and large chance of introducing errors&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Automatic tools can  make refactoring easier with fewer errors&lt;/li&gt;&lt;/ul&gt;Refactoring for Reentrancy lists a few simple steps to make a program safe to run multiple times concurrently on different data sets my removing dependency on global state. (Taken directly from section 2 of the paper)&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Removal of non-re-entrant access to library global state&lt;/li&gt;&lt;li&gt;Encapsulation of static fields in the application in getter/setter methods&lt;/li&gt;&lt;li&gt;Replacing static initializers with explicit lazy initialization&lt;/li&gt;&lt;li&gt;Replacing global state with thread-local state&lt;/li&gt;&lt;li&gt;Transforming the application to use a fresh thread for each section&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;The benchmark re-factoring applications show only slight improvement on speed in some cases which reinforces my previous conclusion that its probably best to stick to library re-factoring for now.&lt;br /&gt;&lt;br /&gt;The one aspect of Reentrancy that differs, in my opinion, from the other methods for parallel performance improvements so far is that Reentrancy does not address only speed (in fact speed is only a side effect) but rather safety. Before multi-core machines, it may not have been possible to run the same program multiple times in parallel and so such considerations were unnecessary but now as this becomes a possibility we may find that programs we once considered thread safe can now cause unpredictible behavior when ran too close together.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-5684476254065661752?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/48Amtf9B7SA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/5684476254065661752/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/refactoring-for-reentrancy.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/5684476254065661752?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/5684476254065661752?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/48Amtf9B7SA/refactoring-for-reentrancy.html" title="Refactoring for Reentrancy" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/refactoring-for-reentrancy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUBQ3wyeyp7ImA9WxNWE0U.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-546020088055180313</id><published>2009-10-12T15:10:00.000-07:00</published><updated>2009-10-12T15:40:52.293-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-12T15:40:52.293-07:00</app:edited><title>BA 14: Rereading the classics</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GikgvEl4Nk06UfJhVEgpHIDAz2c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GikgvEl4Nk06UfJhVEgpHIDAz2c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GikgvEl4Nk06UfJhVEgpHIDAz2c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GikgvEl4Nk06UfJhVEgpHIDAz2c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;This chapter throws together some final thoughts on Software (and "Brick and Mortar") Architecture while citing many different pertinent books on the subject.&lt;br /&gt;&lt;br /&gt;There was also a nice little overview of several major aspects of Smalltalk and how those feature relate to other programming languages (for example the implicit type nature as it relates to C++ templates and Java generics and how inheritance can lead to nonsensical methods which should be errored out or subclassResponsibility'd or shouldNotImplement'd)&lt;br /&gt;&lt;br /&gt;The chapter ends with a pretty relevant line: "Architecture is a chaotic adventure because beautiful architecture alone is not enough; not only beauty, but also usefulness, is the law for architecture and programming alike."&lt;br /&gt;&lt;br /&gt;Programs can be beautiful but if they aren't functional they are worthless. There is a lot to be said for a functional program, but a functional program that is easy to maintain and change with the wind is like a well built house with a beautiful view.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-546020088055180313?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/tHnBjVGsMZA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/546020088055180313/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/ba-14-rereading-classics.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/546020088055180313?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/546020088055180313?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/tHnBjVGsMZA/ba-14-rereading-classics.html" title="BA 14: Rereading the classics" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/ba-14-rereading-classics.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYHRHc5fip7ImA9WxNXGUo.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-6758818569251163729</id><published>2009-10-07T20:05:00.000-07:00</published><updated>2009-10-07T21:28:55.926-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-07T21:28:55.926-07:00</app:edited><title>BA 13: OO VS Functional</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OLpHzfQZ5gjy3ikE4EuIZYIelug/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OLpHzfQZ5gjy3ikE4EuIZYIelug/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OLpHzfQZ5gjy3ikE4EuIZYIelug/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OLpHzfQZ5gjy3ikE4EuIZYIelug/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;What types of problems lend themselves to a Functional Solution?&lt;/strong&gt;&lt;br /&gt;Functional Solutions are well suited for mathematical problems that do not have a world state but simply calculate a result or end point.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What types of problems lend themselves to an Object-Oriented Solution?&lt;/strong&gt;&lt;br /&gt;Object-Oriented Solutions, on the other hand, are well suited for simulations. Objects can hold onto state and can represent things &lt;span id="SPELLING_ERROR_0" class="blsp-spelling-corrected"&gt;occurring&lt;/span&gt; in real life.  Other objects can then interact with &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-corrected"&gt;each&lt;/span&gt; other, each representing their own, and collectively, a world, state.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Is the Functional universe more flexible from a software Architecture point of view?  If so, how; and of not, why?&lt;/strong&gt;&lt;br /&gt;It is flexible in some ways in that you can always just take any function and pass it to another function to wrap additional functionality around it. However, in my opinion functional programming (although I must admit I'm a youngster and have never used it myself) seems like it could get complicated to see what's reallying going on in a section of code.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Is Object-Oriented environment more manageable as a system grows towards the enterprise level?  If so, how; and of not, why?&lt;/strong&gt;&lt;br /&gt;I would argue that Object-Oriented environments ARE more manageable as systems grow larger. There is easy addition and manipulation of large portions of functionality simply by adding new classes, inheriting, changing implementations of parent methods or over writing inherited methods, etc.&lt;br /&gt;&lt;br /&gt;Also particularly of note in this chapter, I thought the "agents" were a good discussion of marrying the two &lt;span id="SPELLING_ERROR_2" class="blsp-spelling-corrected"&gt;paradigms&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-6758818569251163729?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/Zcg8KgfvuUU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/6758818569251163729/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/ba-13-oo-vs-functional.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6758818569251163729?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6758818569251163729?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/Zcg8KgfvuUU/ba-13-oo-vs-functional.html" title="BA 13: OO VS Functional" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/ba-13-oo-vs-functional.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUANQnk5cCp7ImA9WxNXGEo.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-1975602817244469339</id><published>2009-10-06T16:13:00.000-07:00</published><updated>2009-10-06T17:03:13.728-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-06T17:03:13.728-07:00</app:edited><title>ReLooper: Refactoring for Loop Parallelism</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yLfaMfMbM2w0-9r_PUK3KwTStnI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yLfaMfMbM2w0-9r_PUK3KwTStnI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yLfaMfMbM2w0-9r_PUK3KwTStnI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yLfaMfMbM2w0-9r_PUK3KwTStnI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;First an executive summary of the article:&lt;br /&gt;&lt;br /&gt;Some loops provide an opportunity for improved performance on multi-core systems via parallelism. However not all loops are safe to parallelise and manually parallelising loops in a safe way can be tedious, complicated and error-prone. Therefore, tools that help to automate the process, like ReLoop, can be useful to quickly gain some performance on current programs.&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;&lt;br /&gt;I agree that parallelising loops of existing projects can gain some performance on multi-core systems. However I also agree that "Just as ParallelArray is not the only class in the Java concurrent libraries, ReLooper is not the only tool needed to parallelize Java Programs." It seems to me that the automation provided by ReLooper only gives quick and dirty performance improvements in trivial cases (such as performing some aggregate calculation on every element in an array without any IO). However I think a lot of loops written to not iterate over all elements of an array or vector but rather look for a certain element in an array and break out upon finding it or perform some alternate behavior on exceptions, etc. I think ReLooper and similar tools may provide some marginal improvement in terms of general day to day application programming (although I do see perhaps more use in a calculation intense applications) but I think a more powerful stab against the evil of serialized programs would be to focus our time and energy into something that can be used much more frequently (like in &lt;a href="http://jdd-cs527.blogspot.com/2009/10/refactoring-sequential-java-code-for.html"&gt;automated parallel libraries&lt;/a&gt;). Relooper seems to me to be like  one of those "spending 90% of your time on 10% of the code" type of situations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-1975602817244469339?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/IHm13wzhf3o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/1975602817244469339/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/relooper-refactoring-for-loop.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/1975602817244469339?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/1975602817244469339?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/IHm13wzhf3o/relooper-refactoring-for-loop.html" title="ReLooper: Refactoring for Loop Parallelism" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/relooper-refactoring-for-loop.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQFQno-cCp7ImA9WxNXF0Q.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-8051788238729927501</id><published>2009-10-05T19:52:00.001-07:00</published><updated>2009-10-05T20:05:13.458-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-05T20:05:13.458-07:00</app:edited><title>BA 12: When the Bazaar sets out to build cathedrals</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jFIa695HQqpGlvvdjf_EJYtV-14/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jFIa695HQqpGlvvdjf_EJYtV-14/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jFIa695HQqpGlvvdjf_EJYtV-14/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jFIa695HQqpGlvvdjf_EJYtV-14/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What can we learn from decision making?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Obviously there are times in the life of any project where important, "life"-altering decisions have to be made. In the case of KDE, one such choice was to port KDE3 to use the QT4 libraries or to completely re-architecture KDE from the ground up. I think it is important to take such an opportunity, take in as many aspects one can gather and make a decision and stick with it. Probably if there was some good reason for going in a certain direction at the time of making the decision, you can't be in too bad shape, right? I think a bigger danger is hesitating to make any decision at all and letting the project die.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Do Cathedral type projects need this type of decision making in the middle of &lt;/strong&gt;&lt;strong&gt;construction of the projects?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Of course "cathedral type" projects need this type of decision making (I'm assuming by cathedral type here we mean traditional commercial software). However the difference is that usually such decisions are made (for better or for worse) by executives and not by the developers directly. This can result in the reasons for such a decision being more political or financial than technical, which can, in turn, lead to problems and remorse afterwards when it is learned that the decision was made for the wrong reasons.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What are the strengths of the Bazaar Structure that out build the cathedral structures that we have known?&lt;/strong&gt;&lt;/p&gt;Bazaar structures have several key strengths that were detailed in this chapter. Firstly, authors are contributing out of a want to create the next best software, rather than out of pressure and deadlines in a job they are not necessarily so passionate about. Also, code from contributors is constantly under scrutiny of many other brilliant minds and if anything less than near-perfect is found, it will be quickly replaced with a better version. (With these points in mind the author argues that the quality of open source software projects is actually much higher than that of commercial projects. I could see it.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-8051788238729927501?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/SscSm1EC6cw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/8051788238729927501/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/ba-12-when-bazaar-sets-out-to-build.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/8051788238729927501?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/8051788238729927501?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/SscSm1EC6cw/ba-12-when-bazaar-sets-out-to-build.html" title="BA 12: When the Bazaar sets out to build cathedrals" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/ba-12-when-bazaar-sets-out-to-build.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8FRX4zfCp7ImA9WxNXF0w.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-4720841310931724533</id><published>2009-10-04T21:07:00.000-07:00</published><updated>2009-10-04T21:26:54.084-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-04T21:26:54.084-07:00</app:edited><title>Refactoring Sequential Java Code for Concurrency via Concurrent Libraries</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NfEIUpxD_zPnHRdhjpZjb4jDUaA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NfEIUpxD_zPnHRdhjpZjb4jDUaA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NfEIUpxD_zPnHRdhjpZjb4jDUaA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NfEIUpxD_zPnHRdhjpZjb4jDUaA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Surely it is faster&lt;br /&gt;if you all go together&lt;br /&gt;so what's stopping you&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Q1. Sometimes it is possible to retrofit parallelism by refactoring an existing sequential application. Other times the whole system needs to be re-&lt;span id="SPELLING_ERROR_0" class="blsp-spelling-error"&gt;architected&lt;/span&gt; for parallelism. What are the advantages/disadvantages of these approaches? When would you do one over the other?&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;Refactoring existing sequential applications can be done partially using tools like &lt;span id="SPELLING_ERROR_1" class="blsp-spelling-error"&gt;Concurrencer&lt;/span&gt; as discussed in this paper. Additionally the logic is pretty much in place and the project can be brought up to be parallel piece by piece without every having a period of non-functioning software. On the other hand, completely re-&lt;span id="SPELLING_ERROR_2" class="blsp-spelling-error"&gt;architecting&lt;/span&gt; for parallelism would bring the program to a halt until all functionality had been &lt;span id="SPELLING_ERROR_3" class="blsp-spelling-error"&gt;reengineered&lt;/span&gt;. As the paper mentions, manual refactoring is tedious and error-prone and automatic factoring is simply not to a level of perfection yet. Therefore it would only be advantageous to refactoring an existing sequential application if the logic behind the application was such that gave way easily to parallelism (such as a divide and conquer algorithm). Otherwise improvements sought after by &lt;span id="SPELLING_ERROR_4" class="blsp-spelling-error"&gt;parallelising&lt;/span&gt; the program may not be so easily seen without a complete re-&lt;span id="SPELLING_ERROR_5" class="blsp-spelling-error"&gt;architecturing&lt;/span&gt; of the application to "force" areas to be parallel in areas that may not have been so obvious that they even could be parallel in the original implementation.&lt;/p&gt;&lt;br /&gt;&lt;strong&gt;Q2. There are many libraries that target concurrency and parallelism(e.g., Java's &lt;span id="SPELLING_ERROR_6" class="blsp-spelling-error"&gt;ForkJoinTask&lt;/span&gt;, Microsoft's &lt;span id="SPELLING_ERROR_7" class="blsp-spelling-error"&gt;TPL&lt;/span&gt;, Intel's &lt;span id="SPELLING_ERROR_8" class="blsp-spelling-error"&gt;TBB&lt;/span&gt;, &lt;span id="SPELLING_ERROR_9" class="blsp-spelling-error"&gt;OpenMP&lt;/span&gt;, &lt;span id="SPELLING_ERROR_10" class="blsp-spelling-error"&gt;MPI&lt;/span&gt;,etc.). What are the advantages and disadvantages of using parallel libraries?&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;Parallel libraries are advantageous in that they are already thread-safe and optimized for you (hopefully) and that over time they will automatically get better and can improve your code without further alterations to your code itself. Disadvantages of using parallel libraries are that they may not necessarily do everything that you require and sometimes they could be more general than needed for your exact domain, which could lead to some sacrificing of performance / optimization.&lt;br /&gt;&lt;strong&gt;Q3: The approach presented in the paper puts the programmer in the driving seat: the programmer selects a snapshot of code, and are factoring. The process is semi-automated, but not fully automatic.Compare and contrast the refactoring approach with a fully automatic approach, like the one used in automatic &lt;span id="SPELLING_ERROR_11" class="blsp-spelling-error"&gt;parallelizing&lt;/span&gt; compilers.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Fully automatic &lt;span id="SPELLING_ERROR_12" class="blsp-spelling-error"&gt;parallelization&lt;/span&gt; is probably useful in that it does not even require the programmer to be aware of it and many opportunities can be exploited for parallelism that would probably be missed by most programmers. On the other hand, automatic &lt;span id="SPELLING_ERROR_13" class="blsp-spelling-error"&gt;parallelisations&lt;/span&gt; can only be of use when the &lt;span id="SPELLING_ERROR_14" class="blsp-spelling-error"&gt;parallelizing&lt;/span&gt; application can be absolutely positive that the code is &lt;span id="SPELLING_ERROR_15" class="blsp-spelling-error"&gt;parallelizable&lt;/span&gt;, which will lead the compiler or other automatic tool to be unnecessarily conservative. Semi-automatic approaches like &lt;span id="SPELLING_ERROR_16" class="blsp-spelling-error"&gt;Concurrencer&lt;/span&gt; allow for a little bit more guessing on what can and cannot be &lt;span id="SPELLING_ERROR_17" class="blsp-spelling-error"&gt;parallelized&lt;/span&gt; with the user acting as a safety net.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q6: The paper presents some empirical evaluation to support the claim that these automated &lt;span id="SPELLING_ERROR_18" class="blsp-spelling-error"&gt;refactorings&lt;/span&gt; are useful. What are some other factors that you would have liked to see evaluated?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I think obviously speed up is the most important factor in this paper, which was covered for some case studies with 2 and 4 cores. An additional factor that I would have liked to see, however, is the "bloat" factor of the code. If these automated &lt;span id="SPELLING_ERROR_19" class="blsp-spelling-error"&gt;refactorings&lt;/span&gt; sped up the code by cores* .75) but exploded the code to be 10 times as big (I'm especially hesitant after the merge sort example on page 7) The speed up may just not be worth the cost in maintainability. But I guess that bloated code may just be the price we pay for retroactively fitting old code and old languages to be parallel with our multi core systems today.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-4720841310931724533?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/uSnHMz41obM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/4720841310931724533/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/10/refactoring-sequential-java-code-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/4720841310931724533?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/4720841310931724533?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/uSnHMz41obM/refactoring-sequential-java-code-for.html" title="Refactoring Sequential Java Code for Concurrency via Concurrent Libraries" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/10/refactoring-sequential-java-code-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEDQ385fCp7ImA9WxNXE0s.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-7832440118985803869</id><published>2009-09-30T19:44:00.000-07:00</published><updated>2009-09-30T20:27:52.124-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-30T20:27:52.124-07:00</app:edited><title>BA Chapter 11: GNU Emacs</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eTUC38xTB_rjkIph3Pcpf9qaJrc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eTUC38xTB_rjkIph3Pcpf9qaJrc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eTUC38xTB_rjkIph3Pcpf9qaJrc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eTUC38xTB_rjkIph3Pcpf9qaJrc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;* Is it possible for a system like Emacs to be created in a non-opensource way?&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;I think it is possible for a well-architected and feature rich text editing application could be created in a non-opensource way. However, I think the heart of your question is if a compariable text editing application were made non-opensource, would it be as long lasting and adapting. I think the answer here is a resounding no. In the chapter they mention how packages are included only in the main distribution of emacs so long as the author of that package is willing to maintain it and become a regular maintainer. Additionally new features are created by users and a complex system of here-say and telephone so that by the time a feature is decided to be added to a main distribution it is already well tested and used rather than just some frill of a fat guy smoking a huge cigar behind an equally huge (if not even huger) desk. I think non-opensource projects fail to have this long term, customer-driven development and support stigma that opensource projects have.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;* What are some of the disadvantages of a system like Emacs?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The biggest disadvantages I see with Emacs are its steep learning curve and buried deep-ness of its feature set. For example, I didn't even know it could do anything beyond copy/paste/open/save of text files before I read this article and so I had discounted it as completely inferior to vi and others.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;* What architecture decisions have allowed Emacs to grow like ithas?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The fact that they kept the model. view, controller mechanism simple and efficient (having the view redraw the model automatically when waiting for character input only, for example) allowed users to in turn keep their add-ons clean and simple without worrying about optimization issues and similar. Also the easy extension by individual users and the strong community surrounding it helped Emacs to grow explosively.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;* When is avoiding complexity a good/bad argument forimplementation?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Avoiding complexity is a good argument for implementation when the gains seen by the added complexity are not that great but the long term sustainability of keeping it simple are easily seen. On the contrary, avoiding complexity is not a good argument for implementation when there is really no intention for extension and/or an optimization is neccessary that can only be achieved through some complex course.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;* Do you think Firefox will replace Emacs?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I think Firefox could become a new community driven sensation for developing javascript / web applications but I don't think it can REPLACE Emacs. Let's make sure we're comparing apples to apples here.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-7832440118985803869?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/ntz2-nwOQsU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/7832440118985803869/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/09/ba-chapter-11-gnu-emacs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/7832440118985803869?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/7832440118985803869?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/ntz2-nwOQsU/ba-chapter-11-gnu-emacs.html" title="BA Chapter 11: GNU Emacs" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/09/ba-chapter-11-gnu-emacs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcHSHg6eip7ImA9WxNXEks.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-3717103302954893807</id><published>2009-09-29T14:34:00.000-07:00</published><updated>2009-09-29T15:07:19.612-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-29T15:07:19.612-07:00</app:edited><title>A Java Fork/Join Framework</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iYVHgt4Ss0-_3JdddPKyOhYi5YE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iYVHgt4Ss0-_3JdddPKyOhYi5YE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iYVHgt4Ss0-_3JdddPKyOhYi5YE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iYVHgt4Ss0-_3JdddPKyOhYi5YE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;make a fork in time&lt;br /&gt;to break your trouble in two&lt;br /&gt;but be sure to join!&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;- As multi-core processors increase in popularity, do you think we'll see more&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; languages implement functionality to support fork / join programs?  Can you&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; think of other languages which already have implemented these types of&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; interfaces?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think it fork / join type programs make a natural fit with multi-core machines and I fully expect not only more language implementations of this paradigm, but further work in these implementations. Further machine and algorithm-independent improvements; further improvements in programmers thinking that will make complex tasks more easily broken up into smaller ones; basically a shift in every aspect of how we do things today to be more aimed to multicore.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  - One reason to implement functionality like that proposed in the paper is to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; allow developers to easily abstract parallelism and focus on other portions of&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; their code.  However, at the same time, using this approach forces developers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; to forgo writing their own mechanisms to handle parallelism, which means&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; giving up opportunities to optimize for their own needs and perhaps&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; decreasing performance.  Do you feel this trade-off is worthwhile?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We talked about in a previous class discussion the delicate balance between the time it takes to build something from the ground up that is only EXACTLY what you need to avoid any unnecessary overhead wasted on generality etc. and the little time it takes to just take a more general library. Clearly the authors of this article feel that their solution is more specialized for Fork/Join than the Java thread libraries.  However, there are probably more specific applications that would be even more efficient yet if users didn't started from scratch (or wrote the whole thing assembly!) There's got to be some end point though. The FJTask framework appears to be greatly superior to Java threads for a number of specific cases. I think if programs fit the description closely of what FJTask was created for (lots of parallel, granular tasks) then this may be a good solution but the more variance or complexity from this simple problem description would warrant much more debate on the use / consequences of this framework.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  - Along the same lines, do you feel the fork / join interface proposed by the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; author is intuitive?  Can you see yourself writing code which might take&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; advantage of this functionality?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I do think the fork / join is intuitive. I could see it being useful for some of the algorithms we discussed in &lt;a href="http://www.cs.uiuc.edu/class/fa09/cs473/"&gt;cs473&lt;/a&gt;. Personally, my code is not actually that intense on the processor so I think this may be over kill for me.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  - The author briefly discusses some of the downsides of implementing this&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; interface in Java as opposed to C++, e.g. not being able to directly access OS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; threading mechanisms.  Additionally, forced garbage collection, while more&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; convenient, may be less optimal than handling memory management directly.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Do you think a similar, faster interface could be developed for C++ or another&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; language?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Of course. The benefits vs. downsides of Java has come up in many other of our discussions already and I believe the main points still hold here. See the discussion on &lt;a href="http://jdd-cs527.blogspot.com/2009/09/ba-9-jpc-x86-pc-emulator-in-pure-java.html"&gt;JPC&lt;/a&gt; for more details.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  - The work-scheduler algorithm of stealing work using FIFO and processing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; work with LIFO seems to work well for most tasks.  Can you think of any&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; examples where this may lead to poor performance?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the number of small tasks keep coming and coming and coming it is possible that larger tasks would never be "stolen" and could end up being starved.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-3717103302954893807?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/HiUkZhulT8w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/3717103302954893807/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/09/java-forkjoin-framework.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/3717103302954893807?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/3717103302954893807?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/HiUkZhulT8w/java-forkjoin-framework.html" title="A Java Fork/Join Framework" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/09/java-forkjoin-framework.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4ARX06cSp7ImA9WxNXEU0.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-842010345197892259</id><published>2009-09-27T18:25:00.000-07:00</published><updated>2009-09-27T19:12:24.319-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-27T19:12:24.319-07:00</app:edited><title>BA10: Strength of Metacircular Virtual Machines: Jikes RVM</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dzrFBP1thazOa5TjvCaHArYC2a8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dzrFBP1thazOa5TjvCaHArYC2a8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dzrFBP1thazOa5TjvCaHArYC2a8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dzrFBP1thazOa5TjvCaHArYC2a8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;1. what advantages do metacicular Vms have over common VMS?disadvantages?&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;One main advantage for the developpers who are writing and testing the metacircular VMS is that they can find bugs and efficiency trips in both their application and in the VMS itself. Fixes for these can then often be translated to the program or back to the VMS rather than being an isolated enhancement for one of two unrelated languages. Likewise there are many more advanced libraries and functions of the newer programming languages like Java, and the runtime, being written in the same language as the application, would have full range of access to all of the  libraries and abstractions that are available to the application. Finally there would no longer be a layer of communication neccessary between the Java byte codes of the application and the other langauge to process it. The VMS would simply have access to the byte code just as its own byte code.&lt;/p&gt;&lt;p&gt;The biggest disadvantage of self-hosting in a newer language like Java is probably the lack of maturity in the area. Sure Java has long been used, but it may not be stable enough in the new areas that may need to be brought to light for self-hosting. On the other more mature langauges like C have been used for a long time for running hosted languages like Java and could be thus considered very mature.&lt;/p&gt;&lt;strong&gt;2. Jikes implemented its own threading model.  this was done because operating systems didn't support threads as well as they do today. is this choice still a wise one? why or why not?&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;About the "green threading": I suppose at the time (1998ish, amirite?) there wasn't much OS support for monsterous threading. However, I would contend that now there is very good OS support, and that "green threading" techniques are probably no longer neccessary and lead only to re-invention and unneccessary work.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-842010345197892259?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/mI1Q2LOMd20" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/842010345197892259/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/09/ba10-strength-of-metacircular-virtual.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/842010345197892259?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/842010345197892259?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/mI1Q2LOMd20/ba10-strength-of-metacircular-virtual.html" title="BA10: Strength of Metacircular Virtual Machines: Jikes RVM" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/09/ba10-strength-of-metacircular-virtual.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YGQHk6eip7ImA9WxNXEU0.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-5786966411490930798</id><published>2009-09-27T18:04:00.000-07:00</published><updated>2009-09-27T18:25:21.712-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-27T18:25:21.712-07:00</app:edited><title>Our Pattern Language</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RyF2qOSj6lDVbQvVyLHli_WcVZg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RyF2qOSj6lDVbQvVyLHli_WcVZg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RyF2qOSj6lDVbQvVyLHli_WcVZg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RyF2qOSj6lDVbQvVyLHli_WcVZg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;the more they learn about&lt;br /&gt;the less they are concerned&lt;br /&gt;except what they do&lt;/p&gt;&lt;p&gt;-------------&lt;/p&gt;&lt;p&gt;I think the idea of grouping patterns into layers makes sense. It allows programmers to specialize on a particular level in the hierarchy and master the when and why of it. Quite like the evolution of man (to which my haiku above refers), in the beginning everyone had very generalized roles: defend yourself, defend your family, eat, mate, survive. But slowly as the different tasks of man became more complex such that one man could not master them all to a sufficient level, people begin to take up specialized roles. 1 as a healer, one as a blacksmith. Fast forward a long time and the roles get more and more specialized, not longer a healer is special enough but now a brain trama surgeon specializing in tumor removal. This is an entire profession. Now let's swing it back to patterns and specialization. The more complex we get with our tasks, the more of a need there is to specialize -&gt; This is the benefit of classifying patterns into different groupings.&lt;/p&gt;&lt;p&gt;As for the OPL's heirarchitcal grouping, the Architectural and Computational make good sense to me. These are clearly applicible to nearly all systems at the present and I forsee them being of use for a long time. I do not quite see to the extent of the authors of this article a need for so much focus on parellel processing. I do agree that it is of importance now, but to give "Concurrent Execution patterns" the same weight as "Architectural Patterns" and "Computational Patterns" seems a bit premature to me.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-5786966411490930798?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/Mp5lX48nyhc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/5786966411490930798/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/09/our-pattern-language.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/5786966411490930798?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/5786966411490930798?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/Mp5lX48nyhc/our-pattern-language.html" title="Our Pattern Language" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/09/our-pattern-language.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUMQ3w_cCp7ImA9WxNQF0g.&quot;"><id>tag:blogger.com,1999:blog-8235604075476099279.post-6968465960337284530</id><published>2009-09-23T17:21:00.000-07:00</published><updated>2009-09-23T18:04:42.248-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-23T18:04:42.248-07:00</app:edited><title>The Adaptive Object Model Architectural Style</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_o_AK5w3GpN3xMJ7S5WIKXZFNXA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_o_AK5w3GpN3xMJ7S5WIKXZFNXA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_o_AK5w3GpN3xMJ7S5WIKXZFNXA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_o_AK5w3GpN3xMJ7S5WIKXZFNXA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;1. Does an Adaptive Object Model support the ability for an Object to dynamically change its TypeObject?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sure why not. If the programmers  abstract out the details of its classes, TypeObject could be a bare bones collection of, essentially, properties. Changing an objects TypeObject could be as simple as setting these attributes to reflect those of a different object. This seems to be analogous to having everything (or almost everything) specified as strategy patterns.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight: bold;"&gt; 2. The Type Object pattern (PLPD3) states that an Object may delegate type behavior to its TypeObject and may decide to perform additional operations before and after delegating the request (Decorator, GoF95).&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    a. How is delegation implemented from an Object to TypeObject? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Because an Object can have a reference to a TypeObject, objects can simply make calls to the TypeObjects that they represent. The template pattern could even be implemented to leave hooks before and after TypeObject behavior in some cases to easily open up Object specific behavior before and after.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     b. How is delegation handled if Question 1 is true?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't think the delegation is changed. If TypeObjects are abstract enough, there could be lots of "delegate methods" available to all the TypeObjects. Although now that I think about it, it may not make so much sense to change your TypeObject. If the TypeObject is not exactly what you want, why not just define a new Utopian one -&gt; If in Utopia, why move to Ohio? Am I right, folks?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    c. How can you avoid an Object having a tight coupling (knowledge of interfaces, semantics, behavior, etc.) with its TypeObject?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; If the TypeObject handles those couplings, the Object will only have to know about the TypeObject. The TypeObject can then, in turn, handle all of these responsibilities through delegation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; 3. How is versioning handled by an Adaptive Object Model?&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     a. How is versioning handled if Question 1 is true?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; AOM Objects and Object types can have properties and / or attributes related to versioning. As new representations of Objects become better and better defined, old ones can be deprecated. There can even be a useInstead attribute or something that, once a new version of a class or object is defined, gets set to tell old objects that they are in the deprecated area and should convert to XX as soon as possible. The paper suggests using some interpreter to literally decide which version of an object to use and / or what behavior corresponds to it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    b. What is the granularity for determining a new Object or TypeObject version? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think a new version of an Object or TypeObject is only justified once the connotation of that Object or Type object has changed. It wouldn't make sense to toss in a new version into the mix when the Object is still representing the same thing. If the object is expanded to include some new functionality or some new relationship, the idea of the Object has changed and thus a new version could be justified. (although it may make more sense to make a new class all together)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; 4. How do you guard against an explosion of new types in an Adaptive Object Model?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;I believe this would have to be handled by process. You don't want to limit the ability to add new types that are legitimate, so any hard and fast rules implemented in software (like no more than 3 subclasses of any class, or no more than 100 classes total) would simply be too draconian. I think new types should be peer reviewed and frequently consolidated and garbage collected through meetings of domain experts to guard against the explosion of user defined type.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8235604075476099279-6968465960337284530?l=jdd-cs527.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Jdd-cs527/~4/O9rblWmKgbA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://jdd-cs527.blogspot.com/feeds/6968465960337284530/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://jdd-cs527.blogspot.com/2009/09/adaptive-object-model-architectural.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6968465960337284530?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8235604075476099279/posts/default/6968465960337284530?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Jdd-cs527/~3/O9rblWmKgbA/adaptive-object-model-architectural.html" title="The Adaptive Object Model Architectural Style" /><author><name>慈</name><uri>http://www.blogger.com/profile/18000607972908322032</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://jdd-cs527.blogspot.com/2009/09/adaptive-object-model-architectural.html</feedburner:origLink></entry></feed>

