<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clay Lenhart's Blog &#187; Architecture</title>
	<atom:link href="http://clay.lenharts.net/blog/category/architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://clay.lenharts.net/blog</link>
	<description>A blog on .Net and SQL Server</description>
	<lastBuildDate>Tue, 31 Oct 2017 10:34:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>The &#8220;Many Core&#8221; Problem</title>
		<link>http://clay.lenharts.net/blog/2008/10/25/the-many-core-problem/</link>
		<comments>http://clay.lenharts.net/blog/2008/10/25/the-many-core-problem/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 23:03:31 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[F#]]></category>
		<category><![CDATA[Multithread]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/?p=43</guid>
		<description><![CDATA[We, as developers, have a problem.  CPUs will continue to have more cores, and each core is not going to be any faster.  The only way to write faster applications is to write multithreaded code, which has two challenges: 1) Multithreaded code is complex to write and think about. 2)Multithreaded code is difficult to test.  From what I've seen, people are pursuing 4 approaches. 
 <a href="http://clay.lenharts.net/blog/2008/10/25/the-many-core-problem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We, as developers, have a problem.  CPUs will continue to have more cores, and each core is not going to be any faster.  The only way to write faster applications is to write multithreaded code, which has two challenges:</p>
<ul>
<li>Multithreaded code is complex to write and think about.</li>
<li>Multithreaded code is difficult to test.</li>
</ul>
<p>From what I&#8217;ve seen, people are pursuing 4 approaches. <span id="more-43"></span></p>
<p><strong>Better Languages</strong></p>
<p>If languages are the whole answer, the language has to make it impossible to write multithreaded bugs, otherwise you only address the first problem (the complexity).</p>
<p>Erlang is one such language that removes whole class of multithreaded bugs. Erlang&#8217;s approach is to isolate the threads, and give them a way to pass messages to each other.  However programming in Erlang is awkward and arguably it makes the code more complex.</p>
<p>Other languages, like Clojure and F#, take a different approach and make it easier to write and deal with multithreaded issues, however they don&#8217;t prevent you from writing multithreaded bugs.  These languages do not address the whole problem as you still need a way to test the code.</p>
<p><strong>Better Libraries</strong></p>
<p>Microsoft has a library for .Net called <a href="http://msdn.microsoft.com/en-us/magazine/cc163340.aspx">Parallel Task Library </a>to make it easier to write multithreaded code.  Need to operate on each element in an array?  Use the Parallel.For() method.  This library makes it easier to think and write multithreaded code, but it doesn&#8217;t make it any easier to test.</p>
<p><strong>Static Code Analyzer</strong></p>
<p>Java has a static code analyzer that is able to find multithreading bugs called <a href="http://findbugs.sourceforge.net/">FindBugs</a>.  It looks at your code and reports any code that will cause multithreaded bugs.  This would address the second issue, because it, in theory, reports all threading bugs.  It doesn&#8217;t however address the first issue, making the code easier to write.</p>
<p><strong>Testing with Deterministic Threads</strong><strong><br />
</strong></p>
<p>Microsoft is going in a different direction.  They are working on something called <a href="http://research.microsoft.com/~madanm/papers/osdi2008-CHESS.pdf">CHESS</a> that makes your unit tests find multithreaded bugs.  It does this by taking over the scheduler and sysmatically repeating each test, weaving the threads differently each time to exercise every possible way the scheduler could run the code.  However it requires us to to write a set of tests that finds *all* the threading bugs.  Since it is common to write unit tests with less than 100% coverage, a code coverage tool should be used to write more tests.</p>
<p><strong>Conclusion</strong></p>
<p>The good news is that there appears to be a variety of approaches to the problem and the whole answer will likely involve a combination of language or library enhancements and analyser or testing enhancements that are already in the works.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/10/25/the-many-core-problem/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>GWT for Web Applications</title>
		<link>http://clay.lenharts.net/blog/2008/10/18/gwt-for-web-applications/</link>
		<comments>http://clay.lenharts.net/blog/2008/10/18/gwt-for-web-applications/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 10:47:01 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/?p=42</guid>
		<description><![CDATA[There are several approaches for writing web applications, each with their own advantages.  GWT is a new framework with its own niche. Your standard ASP.Net (or JSP/PHP/etc) w/ Ajax and JQuery (or other Javascript library) Java WebStart or .Net ClickOnce &#8230; <a href="http://clay.lenharts.net/blog/2008/10/18/gwt-for-web-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>There are several approaches for writing web applications, each with their own advantages.  GWT is a new framework with its own niche.</p>
<ul>
<li>Your standard ASP.Net (or JSP/PHP/etc) w/ Ajax and JQuery (or other Javascript library)</li>
<li><a href="http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp">Java WebStart </a>or .Net <a href="http://en.wikipedia.org/wiki/ClickOnce">ClickOnce</a></li>
<li><a href="http://code.google.com/webtoolkit/">GWT</a> w/ Webservices</li>
</ul>
<p><span id="more-42"></span><br />
<strong>ASP.Net (or JSP/PHP/etc) &#8211; for Dynamic Websites<br />
</strong></p>
<p>ASP.Net is great, because it will run on any browser, but it difficult and error prone to write Javascript code, and many times the application or site isn&#8217;t very interactive or responsive.</p>
<p>A coworker suggests that this is good for a &#8220;dynamic website&#8221;, rather than a full blown &#8220;web application&#8221;.  It certainly has a web site feel, rather than an application feel to it.  See the GWT demos below to see what I&#8217;m talking about.</p>
<p><strong>Java WebStart or .Net ClickOnce &#8211; for Internal Corporate Applications<br />
</strong></p>
<p>This, however, provides are great environment for writing interactive applications, however it requires either Java or .Net on the client.  Some users do not have permissions necessary to install Java and .Net.</p>
<p><strong>GWT w/ Webservices &#8211; for Public Applications<br />
</strong></p>
<p>GWT is a great idea that compiles Java code into Javascript to give you an HTML/Javascript web application.    It allows you to have *a lot* of javascript code that does not talk with the web server.  Be sure to check out these <a href="http://code.google.com/webtoolkit/examples/">GWT demos</a>.</p>
<p>You can&#8217;t use the Java library with GWT, however you get a great GWT UI library, and you can call a webservice to do anything you like, for instance to make database calls.</p>
<p>As a C# developer, I find this great, because the learning curve is small.  The Java language is so close to C#, and I don&#8217;t have to learn the Java library.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/10/18/gwt-for-web-applications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Advantages of Immutable Data</title>
		<link>http://clay.lenharts.net/blog/2008/02/16/advantages-of-immutable-data/</link>
		<comments>http://clay.lenharts.net/blog/2008/02/16/advantages-of-immutable-data/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 19:44:01 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Immutable]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/2008/02/16/advantages-of-immutable-data/</guid>
		<description><![CDATA[I was reading about two of Google&#8217;s internal programs, Bigtable and Google File System, and how they handle a large amounts of data so that the processing is distributed (Bigtable) and the data is replicated (Google File System). One thing &#8230; <a href="http://clay.lenharts.net/blog/2008/02/16/advantages-of-immutable-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I was reading about two of Google&#8217;s internal programs, <a href="http://www.usenix.org/events/osdi06/tech/chang/chang_html/index.html">Bigtable</a> and <a href="http://labs.google.com/papers/gfs.html">Google File System</a>, and how they handle a large amounts of data so that the processing is distributed (Bigtable) and the data is replicated (Google File System).  One thing they both do is exploit immutability.  So once something is saved to disk, that block of data doesn&#8217;t change.  If you have a large volume of data, this assumption can be very useful.</p>
<p>Let&#8217;s say we&#8217;re talking about a transaction table for bank accounts. Records in the transaction table don&#8217;t change.  Any corrections are handled by creating a new transaction record at the tail end of the table.  If you are processing the transactions, this is great! You can ignore previously processed records since you know they will never change.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/02/16/advantages-of-immutable-data/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
