<?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>Digital Derby &#187; cloud computing</title>
	<atom:link href="http://www.digitalderby.com/tag/cloud-computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitalderby.com</link>
	<description>The race is on</description>
	<lastBuildDate>Fri, 27 Nov 2009 05:22:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MapReduce</title>
		<link>http://www.digitalderby.com/2009/08/mapreduce/</link>
		<comments>http://www.digitalderby.com/2009/08/mapreduce/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 11:35:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[professional]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[mapreduce]]></category>

		<guid isPermaLink="false">http://www.digitalderby.com/?p=97</guid>
		<description><![CDATA[The computer was originally designed as a sequential processor. This notion has become ingrained in our minds. We are often bogged down by this constraint while developing algorithms. Advancements in computers have brought in more and more parallelism but our algorithms have not started to embrace it. Map Reduce is a design paradigm which forces [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if !mso]><span class="mceItemObject"   classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></span> <mce:style><!<br />
st1\:*{behavior:url(#ieooui) }<br />
--> <!--[endif]--> <!--[if gte mso 10]> <mce:style><!<br />
/* Style Definitions */<br />
table.MsoNormalTable<br />
{mso-style-name:"Table Normal";<br />
mso-tstyle-rowband-size:0;<br />
mso-tstyle-colband-size:0;<br />
mso-style-noshow:yes;<br />
mso-style-parent:"";<br />
mso-padding-alt:0in 5.4pt 0in 5.4pt;<br />
mso-para-margin:0in;<br />
mso-para-margin-bottom:.0001pt;<br />
mso-pagination:widow-orphan;<br />
font-size:10.0pt;<br />
font-family:"Times New Roman";<br />
mso-ansi-language:#0400;<br />
mso-fareast-language:#0400;<br />
mso-bidi-language:#0400;}<br />
table.MsoTableGrid<br />
{mso-style-name:"Table Grid";<br />
mso-tstyle-rowband-size:0;<br />
mso-tstyle-colband-size:0;<br />
border:solid windowtext 1.0pt;<br />
mso-border-alt:solid windowtext .5pt;<br />
mso-padding-alt:0in 5.4pt 0in 5.4pt;<br />
mso-border-insideh:.5pt solid windowtext;<br />
mso-border-insidev:.5pt solid windowtext;<br />
mso-para-margin:0in;<br />
mso-para-margin-bottom:.0001pt;<br />
mso-pagination:widow-orphan;<br />
font-size:10.0pt;<br />
font-family:"Times New Roman";<br />
mso-ansi-language:#0400;<br />
mso-fareast-language:#0400;<br />
mso-bidi-language:#0400;}<br />
--> <!--[endif]--></p>
<p class="MsoNormal">
<p class="MsoNormal">The computer was originally designed as a sequential processor. This notion has become ingrained in our minds. We are often bogged down by this constraint while developing algorithms.</p>
<p class="MsoNormal">
<p class="MsoNormal">Advancements in computers have brought in more and more parallelism but our algorithms have not started to embrace it. Map Reduce is a design paradigm which forces us to think parallel. The algorithms developed using this method as well suited for running on parallel computers.</p>
<p class="MsoNormal">
<p class="MsoNormal">Map Reduce Algorithms, as the name suggests, work in 2 steps. The first step called “Map” consists of tasks that can be done in parallel. This step generates the intermediate results which are then passed to the Reduce step. In the Reduce step these result is collated to generate the final results. The second step is the sequential part.</p>
<p class="MsoNormal">
<p class="MsoNormal">The current algorithms we have usually do the Map steps sequentially inside a loop and keep collating the results. These results are presented at the end of the loop.</p>
<p class="MsoNormal">
<p class="MsoNormal">As simple example, take the case of counting the no of words in a file.</p>
<table class="MsoTableGrid" style="border: medium none; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6.15in;" width="590" valign="top">
<pre><span>        </span><span style="color: green;">// Normal algorithm</span><span>
</span><span style="color: blue;">        public int </span><span style="color: black;">noOfWordsInFile(</span><span style="color: red;">String </span><span style="color: black;">fileName) </span><span>
        </span><span style="color: black;">{</span><span>
               </span><span style="color: black;">filecount = </span><span style="color: purple;">0</span><span style="color: black;">;</span><span>
               </span><span style="color: blue;">while</span><span style="color: black;">(not eof)</span><span>
               </span><span style="color: black;">{</span><span>
                    </span><span style="color: black;">line = read line from file;</span><span>
                    </span><span style="color: black;">linecount = noOfWordsInLine(line);</span><span>
                    </span><span style="color: black;">filecount = linecount + filecount;</span><span>
               </span><span style="color: black;">}</span><span>
               </span><span style="color: blue;">return </span><span style="color: black;">filecount;</span><span>
         </span><span style="color: black;">}</span></pre>
<p class="MsoNormal">
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">
<table class="MsoTableGrid" style="border: medium none; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6.15in;" width="590" valign="top">
<pre><span>        </span><span style="color: green;">// Map Reduce algorithm</span></pre>
<pre><span>        </span><span style="color: blue;">public void </span><span style="color: black;">map(</span><span style="color: red;">String </span><span style="color: black;">line)</span><span>
        </span><span style="color: black;">{</span><span>
               </span><span style="color: black;">lineCount = noOfWordsInLine(line);</span><span>
               </span><span style="color: black;">save lineCount</span><span>
        </span><span style="color: black;">}</span></pre>
<pre><span>        </span><span style="color: blue;">public void </span><span style="color: black;">reduce(</span><span style="color: blue;">int </span><span style="color: black;">linecount)</span><span>
        </span><span style="color: black;">{</span><span>
               </span><span style="color: black;">load fileCount;</span><span>
               </span><span style="color: black;">fileCount = fileCount + lineCount. </span><span>
               </span><span style="color: black;">save fileCount;</span><span>
       </span><span style="color: black;"> }</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">
<p class="MsoNormal">Update : Some folks though that this is my idea.. I have just rephrased what has been talked about already.</p>
<p class="MsoNormal">Find more details about at .. <a href="http://labs.google.com/papers/mapreduce.html">Mapreduce</a></p>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.digitalderby.com/2009/08/mapreduce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
