<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I&amp;#39;m on a mission from God object</title><link>http://blogs.microsoft.co.il/blogs/roadan/</link><description>Yaniv Rodenski</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>My SDP 13 sessions demo code</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2013/05/07/my-sdp-13-sessions-demo-code.aspx</link><pubDate>Tue, 07 May 2013 20:54:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:2005357</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=2005357</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2013/05/07/my-sdp-13-sessions-demo-code.aspx#comments</comments><description>&lt;p&gt;Sela Developer Practice for 2013 is finishing it’s breakout sessions stage, and I had three fun sessions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Things Every Developer Most Know about HTTP &lt;/li&gt;    &lt;li&gt;Big-Time: Introducing HDInsight service (Hadoop on Azure) &lt;/li&gt;    &lt;li&gt;Get your Node.js Under Control with TypeScript &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I had great time, and would like to thank all attendees for attending my sessions. You can find my demo’s code in my &lt;a href="http://sdrv.ms/13f4EvQ"&gt;Sky Drive&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Next on Thursday, I have a full day workshop on Node.js, with lot’s of good stuff planned like: Express and hosting node (on premises and in Windows Azure). I also want to thank two of my colleagues who help me develop the workshop: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/eyalb/"&gt;Eyal Ben-Ivri&lt;/a&gt; – who help me develop the hosting module (and is among other things a Linux ninja). &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dimkin/"&gt;Danny Vernovsky&lt;/a&gt; – who is going to join me in the workshop and talk about socket.io. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So hope to see you there,&lt;/p&gt;  &lt;p&gt;Yaniv&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=2005357" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/HTTP/default.aspx">HTTP</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hadoop/default.aspx">Hadoop</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Node.js/default.aspx">Node.js</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/TypeScript/default.aspx">TypeScript</category></item><item><title>SDP 2013 Bigger Longer &amp; Uncut</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2013/01/16/sdp-2013-bigger-longer-amp-uncut.aspx</link><pubDate>Thu, 17 Jan 2013 02:56:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1668462</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1668462</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2013/01/16/sdp-2013-bigger-longer-amp-uncut.aspx#comments</comments><description>&lt;p&gt;After speaking in few international conferences outside of Israel in the past 6 months, I have the pleasure of taking part in another conference which is near and dear to me: Sela’s own &lt;a href="http://www.seladeveloperpractice.com/" target="_blank"&gt;SDP&lt;/a&gt;. This year our conference is bigger and stronger than ever with an international lineup, including &lt;a href="http://www.seladeveloperpractice.com/speakers?selected=Jesse_Liberty"&gt;Jesse Liberty&lt;/a&gt;, &lt;a href="http://www.seladeveloperpractice.com/speakers?selected=Shawn_Wildermuth"&gt;Shawn Wildermuth&lt;/a&gt;, &lt;a href="http://www.seladeveloperpractice.com/speakers?selected=Udi_Dahan"&gt;Udi Dahan&lt;/a&gt; and &lt;a href="http://www.seladeveloperpractice.com/speakers?selected=Mike_Martin"&gt;Mike Martin&lt;/a&gt; who will also be speaking in my user group, &lt;a href="http://www.facebook.com/WindowsAzureIsrael"&gt;The Windows Azure community&lt;/a&gt;, that month.&lt;/p&gt;  &lt;p&gt;This SDP I have the pleasure of giving four breakout sessions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Things Every Developer Should Know About HTTP&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Hadoop on Azure &lt;/b&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;The Gentle Art of Building Web APIs &lt;/b&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Get your &lt;b&gt;Node.js under control with TypeScript &lt;/b&gt;&lt;/strong&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I am very proud to be a part of such a conference, and I believe it is about time Israel will take it’s place in the conferences world as well. If you feel the same join us in the coolest conference in Israel E V E R.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.seladeveloperpractice.com/"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/roadan/image_36792CBC.png" width="467" height="185" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;Some more Node.js&lt;/h3&gt;  &lt;p&gt;Beside the breakout sessions I am going to give one full day tutorial, on Node.js. The tutorial is based on a course I am currently creating (soon to be available publically).&lt;/p&gt;  &lt;p&gt;So if you want to get up to speed with Node.js I would love to see you there.&lt;/p&gt;  &lt;p&gt;Yaniv&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1668462" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/ASP.NET+Web+API/default.aspx">ASP.NET Web API</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/HTTP/default.aspx">HTTP</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hadoop/default.aspx">Hadoop</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Node.js/default.aspx">Node.js</category></item><item><title>BUILD 2012 - Day 2</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/11/01/build-2012-day-2.aspx</link><pubDate>Thu, 01 Nov 2012 21:57:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1400563</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1400563</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/11/01/build-2012-day-2.aspx#comments</comments><description>&lt;p&gt;uild is starting to
pick up and today was actually packed with Windows Azure actions. The keynote
had a couple of cool announcements and a couple of extremely cool hidden jams.
The keynote was led by Satya Nadella. The
first thing that caught my eye was a slid showing strategic Windows Azure based
operations. One logo belonged to my good friends &lt;a href="http://www.playmytone.com/" target="_blank"&gt;PlayMyTone&lt;/a&gt; and it&amp;#39;s a good
opportunity to congratulate Ohad and the gang for the great job they have been doing.&lt;/p&gt;&lt;p&gt;

&lt;img width="1" height="1" align="" alt="" border="0" vspace="0" hspace="-1" /&gt;&lt;/p&gt;&lt;p&gt;&lt;img width="720" height="502" align="left" alt="BUILD keynote day 2" src="http://blogs.microsoft.co.il/blogs/roadan/IMG_7982.jpg" border="0" vspace="0" hspace="-1" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Satya Nadella (Photography by Bnaya Eshet)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;

The next couple of
cool staff that ware kind of hidden in Scott Hansellman&amp;#39;s demo: &lt;/p&gt;&lt;ul&gt;
 &lt;li&gt;&lt;div style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:Calibri;font-size:11pt;"&gt;EF 6 Alpha bits&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:Calibri;font-size:11pt;"&gt;New Windows Azure storage
     explorer&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;in visual studio now
     supports CRUD capabilities and Queues&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:Calibri;font-size:11pt;"&gt;Help pages for ASP.NET web APIs&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;And last but not
least, there was David Campbell talking about Hdinsight, the new name for
Hadoop on Azure. With a couple of brand new cool features including:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;

&lt;span style="font-family:Calibri;font-size:11pt;"&gt;Linq provider for HIVE&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
 &lt;li style="margin-top:0px;margin-bottom:0px;vertical-align:middle;"&gt;&lt;span style="font-family:Calibri;font-size:11pt;"&gt;A brand new C# SDK on
     &lt;a href="http://hadoopsdk.codeplex.com/" target="_blank"&gt;codeplex&lt;/a&gt; that includes a MapReduce API similar to the new Java API (AKA
     the context API)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Well now I really
got to start going over the new bits so you can expect interesting stuff soon &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1400563" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hadoop/default.aspx">Hadoop</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/BUILD+2012/default.aspx">BUILD 2012</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/_3A00_TECH/default.aspx">:TECH</category></item><item><title>BUILD 2012 - Day 1</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/11/01/build-2012-day-1.aspx</link><pubDate>Thu, 01 Nov 2012 06:30:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1398657</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1398657</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/11/01/build-2012-day-1.aspx#comments</comments><description>&lt;p&gt;

This year&amp;#39;s BUILD
opening gave me a great opportunity to put aside the need to deal with our
travel arrangements affected by hurricane Sandy. Steve Ballmer gave what is in
my mind his best keynote ever. I am not a client guy and the new Windows 8 user
experience will not affect most of my day-to-day use of command-line but in the
time passed from last year&amp;#39;s BUILD windows 8 really matured and it feels nice
to meet windows at both ends of this journey.&lt;/p&gt;&lt;p&gt;

&lt;img width="1" height="1" align="left" alt="" src="http://blogs.microsoft.co.il/blogs/roadan/IMG_7951.jpgBUILD%202012%20keynote" border="0" vspace="0" hspace="-1" /&gt;&lt;img width="576" height="480" align="" alt="BUILD 2012 keynote" src="http://blogs.microsoft.co.il/blogs/roadan/IMG_7951.jpg" border="0" vspace="0" hspace="-1" /&gt;&lt;/p&gt;&lt;p style="margin:0in;font-family:Calibri;font-size:11pt;"&gt;&amp;nbsp;&lt;em&gt;Steve Ballmer (Photography by Bnaya Eshet)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Getting a new
Surface tablet and a Nokia Lumia 920 helped keeping me excited throughout the
day. Another announcement&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;that got me
all excited was the fact that the Microsoft music streaming service is going to
be &lt;span style="font-weight:bold;"&gt;free &lt;/span&gt;on all Windows 8 devices.&lt;/p&gt;&lt;p&gt;

Other than that&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;the day was really more client side oriented
and left me filled with expectations&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;for
day two where the cloud sessions really start.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1398657" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/BUILD+2012/default.aspx">BUILD 2012</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+8/default.aspx">Windows 8</category></item><item><title>Upcoming events: Øredev, SDP and the Windows Azure/Web Developers Communities Holidays special</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/09/16/upcoming-events-216-redev-sdp-and-the-windows-azure-web-developers-communities-holidays-special.aspx</link><pubDate>Sun, 16 Sep 2012 14:59:41 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1287596</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1287596</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/09/16/upcoming-events-216-redev-sdp-and-the-windows-azure-web-developers-communities-holidays-special.aspx#comments</comments><description>&lt;p&gt;As always, September is a very special time for me. This year, in addition to my b-day and the Jewish high holidays September marks the beginning of a very intensive period, packed with both public events and very special projects. So without farther ado here are the events that have been keeping me busy lately:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/319490_260841904024996_1629559525_n_73E8592B.jpg"&gt;&lt;img title="Windows Azure Community Israel" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="Windows Azure Community Israel" src="http://blogs.microsoft.co.il/blogs/roadan/319490_260841904024996_1629559525_n_thumb_30A2726D.jpg" width="646" height="239" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The first thing in my very busy calendar is the &lt;a href="http://azuresep2012.eventbrite.com/" target="_blank"&gt;Windows Azure/Web Developers Communities Holidays special&lt;/a&gt; which is going to take place in the Microsoft R&amp;amp;D center in Herzliyya. The meeting is taking place thanks to the great help of the guys at the &lt;a href="http://www.msaccelerator.com/" target="_blank"&gt;Windows Azure Accelerator program&lt;/a&gt; that helped us greatly and provided us with an alternative venue while the Microsoft Raanana office is closed for the holidays. As you know we are devoted for helping the developer community in Israel (with a passion for windows azure) and feel that the Windows Azure Accelerator program is a great platform to introduce to our groups.&lt;/p&gt;  &lt;p&gt;We are also very excited about the session for this meeting, &lt;a href="http://kenegozi.com/blog" target="_blank"&gt;Ken Egozi&lt;/a&gt; (who you might remember from the ALT.NET group) is visiting Israel and is going to talk about the project he was recently working on: &lt;a href="http://www.windowsazure.com/en-us/develop/mobile/" target="_blank"&gt;Windows Azure Mobile Services&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://oredev.org/"&gt;&lt;img title="Øredev" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="Øredev" src="http://blogs.microsoft.co.il/blogs/roadan/image_2D23E183.png" width="647" height="86" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After this excitement (and a short vacation) I am going to give a couple of sessions myself, the first one is going to be in Malmö Sweden, where I am going to speak in &lt;a href="http://oredev.org/"&gt;Øredev&lt;/a&gt;, about two of my favorite topics: Hadoop and Windows Azure all wrapped up in one session. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_50ED28D7_53F48874.png"&gt;&lt;img title="SDP" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="SDP" src="http://blogs.microsoft.co.il/blogs/roadan/image_50ED28D7_thumb_2B5D0CD9.png" width="647" height="173" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The next couple of sessions are going to be in Sela&amp;#39;s own SDP. Where I am going to give two fully booked one day tutorials along side &lt;a href="http://blogs.microsoft.co.il/blogs/idof/"&gt;Ido Flatow&lt;/a&gt; titled &lt;a href="http://www.sela.co.il/S/SDP2012_JULY/INDEX.HTML#v30"&gt;HTTP Fundamentals using ASP.NET Web API&lt;/a&gt; and I am very excited about these sessions as well.&lt;/p&gt;  &lt;p&gt;I hope for another few sessions to pop-up, but for now I guess I should go back to work. &lt;/p&gt;  &lt;p&gt;So Shana Tova everyone and see you soon.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1287596" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/HTTP/default.aspx">HTTP</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/REST/default.aspx">REST</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hadoop/default.aspx">Hadoop</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure+Community+Israel/default.aspx">Windows Azure Community Israel</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Cloud/default.aspx">Cloud</category></item><item><title>Troubleshooting Windows Azure diagnostics using the Diagnostic Infrastructure Logs</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/08/05/troubleshooting-windows-azure-diagnostics-using-the-diagnostic-infrastructure-logs.aspx</link><pubDate>Mon, 06 Aug 2012 02:45:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1192778</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1192778</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/08/05/troubleshooting-windows-azure-diagnostics-using-the-diagnostic-infrastructure-logs.aspx#comments</comments><description>&lt;p&gt;One of my favorite jams of windows azure is the use of the&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/Windows-Azure-Logo-New_1A5449C8.png"&gt;&lt;img title="Windows-Azure-Logo-New" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="Windows-Azure-Logo-New" align="right" src="http://blogs.microsoft.co.il/blogs/roadan/Windows-Azure-Logo-New_thumb_445447F0.png" width="115" height="115" /&gt;&lt;/a&gt; &lt;strong&gt;diagnostics.wadwcg &lt;/strong&gt;file for setting up windows azure diagnostics. This is a great alternative for configuring the The Windows Azure diagnostics infrastructure in code. &lt;/p&gt;  &lt;p&gt;Last week I had an issue working on a customer deployment where I just could not get trace logs using the &lt;strong&gt;diagnostics.wadcfg&lt;/strong&gt; configuration. I was getting the Windows Event Logs that was also configured just fine, but for some reason the trace logs would just not come through. &lt;/p&gt;  &lt;p&gt;Setting the &lt;strong&gt;diagnostics.wadcfg&lt;/strong&gt; (just like setting the configuration in code) basically generates another configuration file (per role per deployment) in a container called &lt;strong&gt;wad-control-container:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_79932D29.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="the wad-control-container" src="http://blogs.microsoft.co.il/blogs/roadan/image_thumb_39EDF1F9.png" width="658" height="251" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Opening the configuration file I have discovered that wile the the diagnostics infrastructure loaded my Windows Event logs configuration correctly, the configuration for the trace logs was not loaded at all:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_47E4E349.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/roadan/image_thumb_093CB958.png" width="576" height="541" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Another thing you can monitor using the Windows Azure diagnostics infrastructure is the Windows Azure diagnostics infrastructure. To set up the Windows Azure diagnostics infrastructure logs, I just added the DiagnosticInfrastructureLogs section to the &lt;strong&gt;diagnostics.wadcfg&lt;/strong&gt; file:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background:white;color:blue;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="background:white;color:#a31515;"&gt;xml &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;version&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;1.0&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;encoding&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;utf-8&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="background:white;color:#a31515;"&gt;DiagnosticMonitorConfiguration &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;xmlns&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;
                                &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;configurationChangePollInterval&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;PT1M&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;
                                &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;overallQuotaInMB&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;4096&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background:white;color:#a31515;"&gt;Logs &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;bufferQuotaInMB&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;1024&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;
        &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;scheduledTransferLogLevelFilter&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;Verbose&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;
        &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;scheduledTransferPeriod&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;PT1M&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;/&amp;gt;
&lt;strong&gt;  &amp;lt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background:white;color:#a31515;"&gt;DiagnosticInfrastructureLogs &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;bufferQuotaInMB&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;1024&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot; 
                                &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;scheduledTransferPeriod&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;PT1M&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot; 
                                &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;scheduledTransferLogLevelFilter&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;Verbose&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;span style="background:white;color:blue;"&gt;&lt;strong&gt;/&amp;gt;&lt;/strong&gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background:white;color:#a31515;"&gt;WindowsEventLog &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;bufferQuotaInMB&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;1024&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot; 
                   &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;scheduledTransferPeriod&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;PT1M&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot; 
                   &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;scheduledTransferLogLevelFilter&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;Information&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background:white;color:#a31515;"&gt;DataSource &lt;/span&gt;&lt;span style="background:white;color:red;"&gt;name&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;=&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;System!*&lt;/span&gt;&lt;span style="background:white;color:black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="background:white;color:#a31515;"&gt;WindowsEventLog&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="background:white;color:#a31515;"&gt;DiagnosticMonitorConfiguration&lt;/span&gt;&lt;span style="background:white;color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Now I could start my solution and the Windows Azure diagnostics infrastructure created a table called WADDiagnosticInfrastructureLogsTable:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_0C9AFEA8.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/roadan/image_thumb_3B80413D.png" width="637" height="359" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;looking around I have found the following exception:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Message string&amp;#160; Polling for configuration changes:System.InvalidOperationException: There is an error in XML document (8, 8). ---&amp;gt; System.FormatException: Input string was not in a correct format. 
    &lt;br /&gt;&amp;#160;&amp;#160; at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp;amp; number, NumberFormatInfo info, Boolean parseDecimal) 

    &lt;br /&gt;&amp;#160;&amp;#160; at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) 

    &lt;br /&gt;&amp;#160;&amp;#160; at System.Xml.XmlConvert.ToInt32(String s) 

    &lt;br /&gt;&amp;#160;&amp;#160; at Microsoft.WindowsAzure.Diagnostics.XmlSerializationReader1.Read7_BasicLogsBufferConfiguration(Boolean isNullable, Boolean checkType) 

    &lt;br /&gt;&amp;#160;&amp;#160; at Microsoft.WindowsAzure.Diagnostics.XmlSerializationReader1.Read11_DiagnosticMonitorConfiguration(Boolean isNullable, Boolean checkType) 

    &lt;br /&gt;&amp;#160;&amp;#160; at Microsoft.WindowsAzure.Diagnostics.XmlSerializationReader1.Read14_ConfigRequest(Boolean isNullable, Boolean checkType) 

    &lt;br /&gt;&amp;#160;&amp;#160; at Microsoft.WindowsAzure.Diagnostics.XmlSerializationReader1.Read27_ConfigRequest() 

    &lt;br /&gt;&amp;#160;&amp;#160; at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) 

    &lt;br /&gt;&amp;#160;&amp;#160; --- End of inner exception stack trace --- 

    &lt;br /&gt;&amp;#160;&amp;#160; at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) 

    &lt;br /&gt;&amp;#160;&amp;#160; at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream) 

    &lt;br /&gt;&amp;#160;&amp;#160; at Microsoft.WindowsAzure.Diagnostics.ControlChannel.&amp;lt;&amp;gt;c__DisplayClass10.&amp;lt;ConfigMonitoringPoll&amp;gt;b__f() 

    &lt;br /&gt;&amp;#160;&amp;#160; at Microsoft.WindowsAzure.Diagnostics.ControlChannel.TryExpectError(HttpStatusCode status, Action act) 

    &lt;br /&gt;&amp;#160;&amp;#160; at Microsoft.WindowsAzure.Diagnostics.ControlChannel.ConfigMonitoringPoll(Object sender, ElapsedEventArgs args); TraceSource &amp;#39;Microsoft.WindowsAzure.Diagnostics&amp;#39; event&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apparently the was something wrong with my configuration and one of the integer values (probably the bufferQuotaInMb). I actually spent half a day trying to figure out what was wrong (I was just curious) but could not find out what was wrong, so I just rewrote the XML element.&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;There are actually two things I am taking with me from this experience. The first thing I have learned is that even if the Windows Azure diagnostics infrastructure can not parse parts of the &lt;strong&gt;diagnostics.wadcfg&lt;/strong&gt; file it will use the parts it can. But most of all I learned how informative and helpful the Windows Azure diagnostics infrastructure logs can be.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1192778" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure+diagnostics/default.aspx">Windows Azure diagnostics</category></item><item><title>Windows Azure Community Israel - Here We Go...</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/06/06/windows-azure-community-israel-here-we-go.aspx</link><pubDate>Wed, 06 Jun 2012 22:14:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1113651</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1113651</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/06/06/windows-azure-community-israel-here-we-go.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2012/06/06/windows-azure-community-israel-here-we-go.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;A while ago I &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/archive/2012/03/30/upcoming-gigs-rest-web-api-and-hadoop.aspx"&gt;posted&lt;/a&gt; about my busy June, speaking in two major conferences &lt;a href="http://www.ndcoslo.com/"&gt;NDC Oslo&lt;/a&gt; (I’m actually posting this from Oslo right now)&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/Windows-Azure-Logo-New_1A5449C8.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Windows-Azure-Logo-New" border="0" alt="Windows-Azure-Logo-New" align="right" src="http://blogs.microsoft.co.il/blogs/roadan/Windows-Azure-Logo-New_thumb_445447F0.png" width="115" height="115" /&gt;&lt;/a&gt; and &lt;a href="http://qconnewyork.com/"&gt;QCon New-York&lt;/a&gt;. Well June just got even more special for me. On the 25th we are kicking off the &lt;a href="http://www.facebook.com/WindowsAzureIsrael"&gt;Israeli Windows Azure Community&lt;/a&gt; that is being managed by &lt;a href="http://blogs.microsoft.co.il/blogs/helpercoil/"&gt;Gal Kogman&lt;/a&gt; and yours truly. The community is going to meet every month on Monday of the forth week, in &lt;strong&gt;ILDC hertzelia.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This community is special for me. I’ve been working for a while now to create a home for Windows Azure developers in Israel (both online in our &lt;a href="http://social.msdn.microsoft.com/Forums/he-IL/azurehe/threads"&gt;msdn forum&lt;/a&gt; and now physically) and it is nice to see that vision comes alive, with a lot of help from the guys at Microsoft Israel.&lt;/p&gt;  &lt;p&gt;For our grand opening we have &lt;a href="http://blogs.microsoft.co.il/Blogs/noam/"&gt;Noam King&lt;/a&gt; over as well as lot’s of cool new things lined up, but we just can’t tell you about them quite yet &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.microsoft.co.il/blogs/roadan/wlEmoticon-smile_5F206DFC.png" /&gt;. So for now just register &lt;a href="http://azurejune2012-es2.eventbrite.com/"&gt;here&lt;/a&gt; for the event and keep following us.&lt;/p&gt;  &lt;p&gt;See you there&lt;/p&gt;  &lt;p&gt;Yaniv&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1113651" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure+Community+Israel/default.aspx">Windows Azure Community Israel</category></item><item><title>Hadoop on Azure - Creating and Running a simple Java MapReduce</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/06/04/hadoop-on-azure-creating-and-running-a-simple-java-mapreduce.aspx</link><pubDate>Mon, 04 Jun 2012 14:33:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1111386</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1111386</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/06/04/hadoop-on-azure-creating-and-running-a-simple-java-mapreduce.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2012/06/04/hadoop-on-azure-creating-and-running-a-simple-java-mapreduce.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;Apache Hadoop has a variety of APIs for developing MapReduce applications: you can &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/Hadoop-Azure-Logo-New_55D1639C.jpg"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Hadoop-Azure-Logo-New" border="0" alt="Hadoop-Azure-Logo-New" align="right" src="http://blogs.microsoft.co.il/blogs/roadan/Hadoop-Azure-Logo-New_thumb_26334510.jpg" width="239" height="240" /&gt;&lt;/a&gt;use the &lt;a href="http://hadoop.apache.org/common/docs/r0.15.2/streaming.html"&gt;streaming API&lt;/a&gt; to create MapReduce applications with almost any programming language, &lt;a href="http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/mapred/pipes/package-summary.html"&gt;Hadoop pipes&lt;/a&gt; adds native support for C++ applications and &lt;a href="http://www.hadooponazure.com/"&gt;Hadoop on Azure&lt;/a&gt; provides it’s IsotopeJS library for creating JavaScript MapReduce jobs. You can also use a variety of higher-level abstractions and libraries such as &lt;a href="http://pig.apache.org/"&gt;Pig&lt;/a&gt; and &lt;a href="http://hive.apache.org/"&gt;Hive&lt;/a&gt;. With that said and done, it is also useful to know how to develop MapReduce applications using Hadoop’s most natural and primal Java API. This API allows you to develop richer, more powerful MapReduce apps and has a staggering amount of samples around the Internet.&lt;/p&gt;  &lt;p&gt;If you come from a .NET background (like I do), creating your first MapReduce job might be a little bit frustrating the first time around. But once you get past some of the initial hurdles you will be writing Java MapReduce code in your sleep.&lt;/p&gt;  &lt;h4&gt;Setting up your IDE&lt;/h4&gt;  &lt;p&gt;After playing around with quite a few IDEs I have found JetBrains &lt;strong&gt;IntelliJ IDEA&lt;/strong&gt; to be the best choice. I am currently using the community edition that can be downloaded free of charge from &lt;a href="http://www.jetbrains.com/idea/download/index.html"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Now we need to create a new project. The easiest way to create a project using Maven. Maven is basically a build automation tool but one of it’s coolest features is the ability to to create a new project based on a template (called an archetype). I used this &lt;a href="http://www.mkyong.com/maven/how-to-install-maven-in-windows/"&gt;post&lt;/a&gt; to setup Maven on my machine&lt;/p&gt;  &lt;p&gt;Next we need to get an archetype that matches the Hadoop version used for the Microsoft Hadoop Distribution&amp;#160; (0.20.2). Matthias Friedrich created such a &lt;a href="http://blog.mafr.de/2010/08/01/maven-archetype-hadoop/"&gt;repository&lt;/a&gt; which creates a sample word count project. In order to use this Maven repository you need to run the following command line from your working folder: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;mvn archetype:generate -DarchetypeCatalog=http://dev.mafr.de/repos/maven2/ -DgroupId=com.hadoop.example -DartifactId=&lt;strong&gt;MyFirstMapReduce&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Note that &lt;strong&gt;MyFirstMapReduce&lt;/strong&gt; is the name of my package.&lt;/p&gt;  &lt;p&gt;Next you will be prompted to select the archetype from the list of archetypes in the repository:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/mvnArcehtype1_7AC63A70.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Maven mvn archetype for Hadoop on Azure" border="0" alt="Maven mvn archetype for Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/mvnArcehtype1_thumb_439CAC77.png" width="659" height="201" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select 1 and press &lt;strong&gt;Enter&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;You will be asked to change the version property. Press &lt;strong&gt;Enter &lt;/strong&gt;to keep the default value of 1.0-SNAPSHOT and when prompted again select &lt;strong&gt;Y &lt;/strong&gt;to confirm the details of your project.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/mvnArcehtype2_6F6D0066.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Maven mvn archetype for Hadoop on Azure" border="0" alt="Maven mvn archetype for Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/mvnArcehtype2_thumb_746F3E15.png" width="656" height="265" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;A Look Around Our Project&lt;/h4&gt;  &lt;p&gt;Open IntelliJ IDEA, select File-&amp;gt;Open Project and the folder created by Maven, Click OK:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/IntelliJOpen_5C1C23FA.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="IntelliJ project for Hadoop on Azure" border="0" alt="IntelliJ project for Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/IntelliJOpen_thumb_1B69B1BE.png" width="379" height="245" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The newly created project should load. This project is created with the classic MapReduce sample: word count including all its dependencies as well as some unit tests. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/Project_4BB08674.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="IntelliJ project for Hadoop on Azure" border="0" alt="IntelliJ project for Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/Project_thumb_511EF718.png" width="383" height="257" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Open the TokenizingMapper class and view its implementation:&lt;/p&gt;  &lt;p&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; TokenizingMapper &lt;span style="color:blue;"&gt;extends&lt;/span&gt; Mapper&amp;lt;LongWritable, Text, Text, IntWritable&amp;gt; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;final&lt;/span&gt; IntWritable one = &lt;span style="color:blue;"&gt;new&lt;/span&gt; IntWritable(1);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;protected&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; map(LongWritable offset, Text value, Context context)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;throws&lt;/span&gt; IOException, InterruptedException {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; StringTokenizer tok = &lt;span style="color:blue;"&gt;new&lt;/span&gt; StringTokenizer(value.toString());     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;while&lt;/span&gt; (tok.hasMoreTokens()) {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Text word = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Text(tok.nextToken());     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; context.write(word, one);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;}     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;This common sample reads the input file line by line, and generates a key-value output with every input word as its key and the digit 1 as its value. This sample actually uses the IntSumReducer class that basically sums the values of the inputs based on their key. Lets take a look at the WordCount class that implements the &lt;strong&gt;Tool &lt;/strong&gt;interface. The Tool interface is used to handle the command-line arguments and configure the MapReduce job.&lt;/p&gt;  &lt;div style="background-color:white;color:black;"&gt;   &lt;div style="background-color:white;color:black;"&gt;     &lt;pre&gt;&lt;font face="Verdana"&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; WordCount &lt;span style="color:blue;"&gt;extends&lt;/span&gt; Configured &lt;span style="color:blue;"&gt;implements&lt;/span&gt; Tool {
    
    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; main(String[] args) &lt;span style="color:blue;"&gt;throws&lt;/span&gt; Exception {
        &lt;span style="color:blue;"&gt;int&lt;/span&gt; res = ToolRunner.run(&lt;span style="color:blue;"&gt;new&lt;/span&gt; Configuration(), &lt;span style="color:blue;"&gt;new&lt;/span&gt; WordCount(), args);
        System.exit(res);
    }

    @Override
    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;int&lt;/span&gt; run(String[] args) &lt;span style="color:blue;"&gt;throws&lt;/span&gt; Exception {
        String[] remainingArgs 
                = &lt;span style="color:blue;"&gt;new&lt;/span&gt; GenericOptionsParser(getConf(), args).getRemainingArgs();
        
        &lt;span style="color:blue;"&gt;if&lt;/span&gt; (remainingArgs.length &amp;lt; 2) {
            System.err.println(&lt;span style="color:#a31515;"&gt;&amp;quot;Usage: WorldCount &amp;lt;in&amp;gt; &amp;lt;out&amp;gt;&amp;quot;&lt;/span&gt;);
            ToolRunner.printGenericCommandUsage(System.err);
            &lt;span style="color:blue;"&gt;return&lt;/span&gt; 1;
        }
        
        Job job = &lt;span style="color:blue;"&gt;new&lt;/span&gt; Job(getConf(), &lt;span style="color:#a31515;"&gt;&amp;quot;WordCount&amp;quot;&lt;/span&gt;);
        job.setJarByClass(getClass());
        
        job.setMapperClass(TokenizingMapper.&lt;span style="color:blue;"&gt;class&lt;/span&gt;);
        job.setCombinerClass(IntSumReducer.&lt;span style="color:blue;"&gt;class&lt;/span&gt;);
        job.setReducerClass(IntSumReducer.&lt;span style="color:blue;"&gt;class&lt;/span&gt;);
        
        job.setOutputKeyClass(Text.&lt;span style="color:blue;"&gt;class&lt;/span&gt;);
        job.setOutputValueClass(IntWritable.&lt;span style="color:blue;"&gt;class&lt;/span&gt;);
        
        FileInputFormat.addInputPath(job, &lt;span style="color:blue;"&gt;new&lt;/span&gt; Path(remainingArgs[0]));
        FileOutputFormat.setOutputPath(job, &lt;span style="color:blue;"&gt;new&lt;/span&gt; Path(remainingArgs[1]));
        
        &lt;span style="color:blue;"&gt;boolean&lt;/span&gt; success = job.waitForCompletion(&lt;span style="color:blue;"&gt;true&lt;/span&gt;);
        
        &lt;span style="color:blue;"&gt;return&lt;/span&gt; success ? 0 : 1;
    }
}&lt;/font&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Now we can build the package. To do this we will use Maven again by running the following command from the project’s directory:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;mvn package&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;after maven finishes building your package you should see the following output:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/mvnBuild_2833E20F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Maven mvn build for Hadoop on Azure" border="0" alt="Maven mvn build for Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/mvnBuild_thumb_0668097E.png" width="670" height="134" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;deploying and running the job&lt;/h4&gt;

&lt;p&gt;before we start, we need some text to analyze. you can use any text file for that, i specifically am going to use the &lt;a href="http://www.gutenberg.org/cache/epub/35830/pg35830.txt"&gt;the 2010 cia world factbook&lt;/a&gt; i have downloaded from project gutenberg.&lt;/p&gt;

&lt;p&gt;to deploy the job you will first need to setup a hadoop on azure cluster. this is fairly easy all you need to do is just give your cluster a dns name, select the size of cluster you would like to setup and create a cluster login using the cluster request form:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/RequestCluster_0B6A472D.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Creating a cluster using Hadoop on Azure" border="0" alt="Creating a cluster using Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/RequestCluster_thumb_5755A7D9.png" width="539" height="404" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;once the cluster is up, click on the &lt;strong&gt;remote desktop&lt;/strong&gt; icon, placed in the “your cluster” group and log in using the credentials you set during the cluster request.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/ManageCluster_3C3CD8CB.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="rdp using Hadoop on Azure" border="0" alt="rdp using Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/ManageCluster_thumb_3E965AC9.png" width="541" height="221" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;copy your input file to the local file system on the remote server and open the hadoop command shell using the desktop shortcut. copy the file to hdfs using the following command:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;hadoop fs -copyfromlocal c:\ciabook.txt input/ciabook.txt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;let’s list the files in our hdfs using the following command:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;hadoop fs -lsr&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/HDFS_2A9CC833.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="HDFS" border="0" alt="HDFS" src="http://blogs.microsoft.co.il/blogs/roadan/HDFS_thumb_28EBFC5F.png" width="657" height="104" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we’re now ready to run the word count application. let’s go back to the portal and create a new job. click on the &lt;strong&gt;create job&lt;/strong&gt; icon, placed in the “your tasks” group &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/CreateJob_74D75D0B.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Creating a job using Hadoop on Azure" border="0" alt="Creating a job using Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/CreateJob_thumb_65544B3C.png" width="545" height="277" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in the create job page, give the job a friendly name and the jar file. the jar file can be found under &lt;strong&gt;target&lt;/strong&gt; in the project’s directory, and it should be named &lt;strong&gt;[package name]&lt;/strong&gt;-1.0-snapshot-job.jar where [pakagename] is the name of your package.&lt;/p&gt;

&lt;p&gt;next you need to add two parameters by clicking the &lt;strong&gt;add parameter &lt;/strong&gt;button (once for each parameter). set the value of the first parameter (parameter 0) to the input directory (the &lt;strong&gt;input &lt;/strong&gt;directory we just created) and set the second parameter (parameter 1) to &lt;strong&gt;output &lt;/strong&gt;(this will be the output directory create by the mapreduce job). click the &lt;strong&gt;execute job &lt;/strong&gt;button.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/CreateJobForm_1190D221.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Creating a job using Hadoop on Azure" border="0" alt="Creating a job using Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/CreateJobForm_thumb_48F6E34F.png" width="670" height="402" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;your job should start executing. for the cia factbook (approx. 12mb in size) the job executes in less than 2 minutes on average. once the job has completed you should see that its status is “completed sucessfully” (the typo is embarrassingly from the hadoop on azure portal)&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/Job-compleated_39079E8B.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Creating a job using Hadoop on Azure" border="0" alt="Creating a job using Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/Job-compleated_thumb_1E5B0272.png" width="535" height="283" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;open the &lt;strong&gt;interactive console&lt;/strong&gt; icon placed in the “your cluster” group and run the &lt;strong&gt;#lsr&lt;/strong&gt; command to list the files in our hdfs:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/lsr_6393599B.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="lsr using Hadoop on Azure interactive console" border="0" alt="lsr using Hadoop on Azure interactive console" src="http://blogs.microsoft.co.il/blogs/roadan/lsr_thumb_35E9C640.png" width="636" height="228" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and use the &lt;strong&gt;#tail &lt;/strong&gt;command to see the first few lines in the file output file:&lt;/p&gt;
&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/tail_3A7FD0FA.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="tail using Hadoop on Azure interactive console" border="0" alt="tail using Hadoop on Azure interactive console" src="http://blogs.microsoft.co.il/blogs/roadan/tail_thumb_71E5E228.png" width="633" height="211" /&gt;&lt;/a&gt; 

&lt;h4&gt;summary&lt;/h4&gt;

&lt;p&gt;coming from a .net background writing hadoop java mapreduce code can be a little bit intimidating. but just like in the .net world, the right tool can make all the difference.&lt;/p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2012%2f06%2f04%2fhadoop-on-azure-creating-and-running-a-simple-java-mapreduce.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%253a%252f%252fblogs.microsoft.co.il%252fblogs%252froadan%252farchive%252f2012%252f06%252f04%252fhadoop-on-azure-creating-and-running-a-simple-java-mapreduce.aspx" /&gt;&lt;/a&gt; &lt;a href="http://dotnetshoutout.com/Hadoop-on-Azure-Creating-and-Running-a-simple-Java-MapReduce"&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fblogs.microsoft.co.il%2Fblogs%2Froadan%2Farchive%2F2012%2F06%2F04%2Fhadoop-on-azure-creating-and-running-a-simple-java-mapreduce.aspx" /&gt;&lt;/a&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1111386" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hadoop/default.aspx">Hadoop</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Java/default.aspx">Java</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/MapReduce/default.aspx">MapReduce</category></item><item><title>Slides and Demos from my REST via ASP.NET Web API @ WDCIL</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/04/02/slides-and-demos-from-my-rest-via-asp-net-web-api-wdcil.aspx</link><pubDate>Tue, 03 Apr 2012 03:50:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1052685</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1052685</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/04/02/slides-and-demos-from-my-rest-via-asp-net-web-api-wdcil.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2012/04/02/slides-and-demos-from-my-rest-via-asp-net-web-api-wdcil.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;I had a very good time today talking at the Israeli Web Developers Community meeting held at Microsoft Raanana. I Want to thank everyone for participating for a great discussion about REST, Hypermedia and ASP.NET Web API.&lt;/p&gt;  &lt;p&gt;I would like to take this chance to share my demo code (available &lt;a href="https://skydrive.live.com/redir.aspx?cid=8de1cdea3626e8c0&amp;amp;resid=8DE1CDEA3626E8C0!410&amp;amp;parid=8DE1CDEA3626E8C0!123&amp;amp;authkey=!AAMHeMrjNEj_0sY" target="_blank"&gt;here&lt;/a&gt;) and slide deck:&lt;/p&gt;  &lt;p&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="370" id="onlinePlayer522564"&gt;&lt;param name="movie" value="http://www.slideboom.com/player/player.swf?id_resource=522564" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="bgcolor" value="#ffffff" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="flashVars" value="" /&gt;&lt;param name="wmode" value="opaque" /&gt;&lt;embed src="http://www.slideboom.com/player/player.swf?id_resource=522564" width="425" height="370" name="onlinePlayer522564" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always" quality="high" bgcolor="#ffffff" allowfullscreen="true" flashvars="" wmode="opaque"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;  &lt;p&gt;Thank you all for a fun evening.&lt;/p&gt;  &lt;p&gt;Yaniv&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1052685" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/ASP.NET+Web+API/default.aspx">ASP.NET Web API</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/REST/default.aspx">REST</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hypermedia/default.aspx">Hypermedia</category></item><item><title>Upcoming Gigs: REST, Web API and Hadoop</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/03/30/upcoming-gigs-rest-web-api-and-hadoop.aspx</link><pubDate>Fri, 30 Mar 2012 15:51:08 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1048921</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1048921</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/03/30/upcoming-gigs-rest-web-api-and-hadoop.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2012/03/30/upcoming-gigs-rest-web-api-and-hadoop.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;It seems that every time I have a talk about Web API’s something big happens, last time Microsoft moved it from WCF to ASP.NET and this week Microsoft &lt;a href="http://weblogs.asp.net/scottgu/archive/2012/03/27/asp-net-mvc-web-api-razor-and-open-source.aspx" target="_blank"&gt;announced&lt;/a&gt; about the release of &lt;a href="http://aspnetwebstack.codeplex.com/" target="_blank"&gt;ASP.NET web stack&lt;/a&gt; under an open source license.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/starshiptroopers_42106CBB.jpg"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="starshiptroopers" border="0" alt="starshiptroopers" src="http://blogs.microsoft.co.il/blogs/roadan/starshiptroopers_thumb_573E7263.jpg" width="244" height="135" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This announcement comes a the beginning of a couple of very exciting months for me covered with talks about few things that ware the focus of my professional life for the past year:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;REST, Web API&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;On Monday, April 2, I will be talking @ the Israeli web developers community (WDCIL) about REST via ASP.NET web API. In this session we will discuss REST\Hypermedia services and how ASP.NET Web API can help us develop them.&lt;/p&gt;    &lt;p&gt;You can register &lt;a href="http://wdcilapril12.eventbrite.com/?ref=enivtefor&amp;amp;invite=MTgzMzQ0NS9pZG9mQHNlbGEuY28uaWwvMA%3D%3D&amp;amp;utm_source=eb_email&amp;amp;utm_medium=email&amp;amp;utm_campaign=inviteformal&amp;amp;utm_term=eventpage" target="_blank"&gt;here&lt;/a&gt; for the event, hosted at Microsoft office in Ra&amp;#39;anana&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Apache Hadoop-based services for Windows Azure&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;For the lost 6 months I have been a part of a wonderful team at &lt;a href="http://www.selagroup.com/" target="_blank"&gt;Sela&lt;/a&gt; that created training content focusing on Apache Hadoop-based services for Windows Azure. In June, I will have a couple of exciting sessions sharing the experiences we had developing and using Hadoop on Azure:&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;June 6-8 – &lt;a href="http://www.ndcoslo.com/"&gt;Norwegian Developers Conference&lt;/a&gt; (NDC). Oslo, Norway.&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;On the beginning of June, I’ll be traveling to Oslo, with my friend and colleague &lt;a href="http://blogs.microsoft.co.il/blogs/idof/" target="_blank"&gt;Ido Flatow&lt;/a&gt; where we both will be speaking @ the Norwegian Developers Conference (NDC). If you are there I must recommend Ido’s Fiddler session (I have seen myself a couple of times).&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/NDC_logo_date_2012_4A641C45.jpg"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="NDC Hadoop on Azure" border="0" alt="NDC Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/NDC_logo_date_2012_thumb_12CE5B57.jpg" width="244" height="129" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;June 18-23 – &lt;a href="http://qconnewyork.com/" target="_blank"&gt;QCon New-York&lt;/a&gt;.&lt;/strong&gt; &lt;/p&gt;    &lt;p&gt;Towards the end of June, I will be traveling to New-York to speak at the first ever QCon New-York. I am honored to be joining real all-star panel of &lt;a href="http://qconnewyork.com/qcon-nyc-2012/speakers/" target="_blank"&gt;speakers&lt;/a&gt; and can’t wait to be a part of this exciting conference.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/speaking-at-ny_710282C5.jpg"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="QCon New-York Hadoop on Azure" border="0" alt="QCon New-York Hadoop on Azure" src="http://blogs.microsoft.co.il/blogs/roadan/speaking-at-ny_thumb_2F87D06C.jpg" width="104" height="104" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;If you are planning on attending QCon New-York, you are also invited to use my discount code: RODE100 and get a 100$ discount for all prices.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;There are some more talks coming on soon, but for now I have a lot of work ahead of me. I hope to see you in one of my talks, in a conference/develpers community near you.&lt;/p&gt;  &lt;p&gt;Yaniv&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1048921" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/ASP.NET+Web+API/default.aspx">ASP.NET Web API</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/REST/default.aspx">REST</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hadoop/default.aspx">Hadoop</category></item><item><title>ASP.NET Web API: Fun with verbs</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/02/21/asp-net-web-api-fun-with-verbs.aspx</link><pubDate>Tue, 21 Feb 2012 19:07:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1017588</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1017588</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/02/21/asp-net-web-api-fun-with-verbs.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2012/02/21/asp-net-web-api-fun-with-verbs.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;For those of you who do follow me on &lt;a href="https://twitter.com/#!/YRodenski" target="_blank"&gt;twitter&lt;/a&gt; (shame on you), last Thursday’s announcement about the reincarnation of the WCF Web API as the &lt;a href="http://www.asp.net/web-api/" target="_blank"&gt;ASP.NET Web API&lt;/a&gt; could not come in worst timing. As I was scheduled to deliver a 3 hours session in Microsoft for an audience of WCF developers entitled REST via the WCF Web API. Since yours truly is not one of those speakers that is willing to talk about last weeks technology, I have spent most of the weekend rewriting my demos and rebuilding the session (the demos can be found &lt;a href="https://skydrive.live.com/?cid=8de1cdea3626e8c0#cid=8DE1CDEA3626E8C0&amp;amp;id=8DE1CDEA3626E8C0%21364" target="_blank"&gt;here&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;Now the the storm have passed, I had some time to go back and revisit my new found love. Before we begin I have one confession to make: last time I actually wrote ASP code this is what it was called, ASP, and .NET was starting its first beta. I guess what I am going thru right now is going to be a common pain for WCF developers who developed HTTP services in the past few year. &lt;/p&gt;  &lt;p&gt;So for my session I built a fantasy football site called my footy. my first and most basic functionality was to create my&amp;#160; services controller (formally known as service) using the ASP.NET MVC 4 template for Web API. the basic template creates a project built more or less like most MVC projects (as far as a WCF guy like me can tell) with minor differences. My first stop was to create the players controller that looked more or less like this:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ce746db0-4fb9-4667-be29-8c556b74eb6a" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;PlayersController&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;ApiController&lt;/span&gt;&lt;br /&gt; {&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#008000;"&gt;// GET /players/neymar&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Player&lt;/span&gt; Get(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; name)&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color:#008000;"&gt;// method implementation&lt;/span&gt;&lt;br /&gt;     }&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#008000;"&gt;// POST /players&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;HttpResponseMessage&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Player&lt;/span&gt;&amp;gt; Post(&lt;span style="color:#2b91af;"&gt;Player&lt;/span&gt; player)&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color:#008000;"&gt;// method implementation&lt;/span&gt;&lt;br /&gt;     }&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#008000;"&gt;// DELETE /players/neymar&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Delete(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; name)&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color:#008000;"&gt;// method implementation&lt;/span&gt;&lt;br /&gt;     }&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;As you can see I have different methods (that’s C# methods) for different HTTP verbs. the verbs are mapped to the methods by convention (apparently this is called convention over configuration). This convention will map the verb to any method who&amp;#39;s name starts with the verb so I can have even more meaningful method names. As you can see my Post and Delete methods accept a name parameter that in the old days (last week) we used to map using a Uri template in our WebGet or WebInvoke attributes. Now in the days of ASP.NET web API this is mapped as part of the routing registration in the Global.asax like this:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:24ab3c31-d50f-4499-b75a-9973b50a0143" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;routes.MapHttpRoute(&lt;br /&gt;     name: &lt;span style="color:#a31515;"&gt;&amp;quot;DefaultApi&amp;quot;&lt;/span&gt;,&lt;br /&gt;     routeTemplate: &lt;span style="color:#a31515;"&gt;&amp;quot;{controller}/{name}&amp;quot;&lt;/span&gt;,&lt;br /&gt;     defaults: &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; { name = &lt;span style="color:#2b91af;"&gt;RouteParameter&lt;/span&gt;.Optional }&lt;br /&gt; );&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;This tells ASP.NET to use the above template when accessing the application, first parameter is the name of the controller second one is a parameter called name. Since I am using IIS to run my application, I needed to allow Delete which is blocked by default by WebDAV (and thanks to &lt;a href="https://twitter.com/#!/spederiva" target="_blank"&gt;Sebastian Pederiva&lt;/a&gt; for his IIS support) so I added the following section to my default web site’s Web.Config:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:22cc0b44-e51f-4061-9f74-687c3edeba92" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;system.webServer&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;modules&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;remove&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;WebDAVModule&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;modules&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;handlers&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;remove&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;WebDAV&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;handlers&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;system.webServer&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Works like a charm. The next functionality I had for my players service was to add a transfer functionality, so my users could trade players. I have added the Transfer method that looks like this:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6a57b1d6-41d4-4d94-a2f3-ea0552b8e2e9" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;HttpResponseMessage&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Player&lt;/span&gt;&amp;gt; Transfer(&lt;span style="color:#2b91af;"&gt;Player&lt;/span&gt; player, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; teamName)&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#008000;"&gt;// method implementation&lt;/span&gt;&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;So now I had to tweak my routing to support this, so I’ve added a second HTTP route mapping like this:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:68651cb7-47c2-40e0-a61b-a7b1f190bcf2" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;routes.MapHttpRoute(&lt;br /&gt;     name: &lt;span style="color:#a31515;"&gt;&amp;quot;TransferApi&amp;quot;&lt;/span&gt;,&lt;br /&gt;     routeTemplate: &lt;span style="color:#a31515;"&gt;&amp;quot;{controller}/{action}/{teamName}&amp;quot;&lt;/span&gt;,&lt;br /&gt;     defaults: &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; { name = &lt;span style="color:#2b91af;"&gt;RouteParameter&lt;/span&gt;.Optional }&lt;br /&gt; );&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Now I could have used HTTP Post to access my method using the Uri template: “players/transfer/{teamName}”. But wait, this is not all. I could now access my method using HTTP Get. This is apparently a usual behavior for ASP.NET MVC and we can solve this by adding the HttpPost attribute:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f11bf809-da61-4032-b2cd-3f71f89c7ba9" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;[&lt;span style="color:#2b91af;"&gt;HttpPost&lt;/span&gt;]&lt;br /&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;HttpResponseMessage&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Player&lt;/span&gt;&amp;gt; Transfer(&lt;span style="color:#2b91af;"&gt;Player&lt;/span&gt; player, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; teamName)&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#008000;"&gt;// method implementation &lt;/span&gt;&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;That’s better, but we are not nearly done. One of the side effects of my second route mapping is that now my Get, Post and Delete methods are also mapped as action (beside being mapped to HTTP verbs) so I can now get the representation of a player both by using &lt;a href="http://localhost/players/neymar"&gt;http://localhost/players/neymar&lt;/a&gt; and &lt;a href="http://localhost/players/get/neymar"&gt;http://localhost/players/get/neymar&lt;/a&gt; as an address. While I can live with two addresses exposing the same resource the issue is a bit trickier with my Delete method that is now accessible either by using the verb Delete using the &lt;a href="http://localhost/players/neymar"&gt;http://localhost/players/neymar&lt;/a&gt; Uri and using the verb Get and the &lt;a href="http://localhost/players/delete/neymar"&gt;http://localhost/players/delete/neymar&lt;/a&gt; Uri. Using Get to delete resources is just bad HTTP, if for no other reason than due to fact HTTP assumes get is both safe and idempotent (you can read more about safe and idempotent verbs &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html" target="_blank"&gt;here&lt;/a&gt;)&amp;#160; so I added the HttpDelete attribute to make sure my service is consumed the way I planned it to be consumed:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a156de9a-7184-4a70-b0e6-e898270c9fee" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;[&lt;span style="color:#2b91af;"&gt;HttpDelete&lt;/span&gt;]&lt;br /&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Delete(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; name)&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#008000;"&gt;// method implementation&lt;/span&gt;&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;That’s better &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.microsoft.co.il/blogs/roadan/wlEmoticon-smile_49DB5C26.png" /&gt;&lt;/p&gt;  &lt;p&gt;I guess if you are coming from ASP.NET MVC background most of what I showed here might seem trivial but for WCF developer there are a lot of things to notice here. With that said and done I do hope ASP.NET web API will encourage developers do write more HTTP services no matter what your background is.&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2012%2f02%2f21%2fasp-net-web-api-fun-with-verbs.aspx"&gt;&lt;img src="http://www.dotnetkicks.com//Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2012%2f02%2f21%2fasp-net-web-api-fun-with-verbs.aspx" alt="" /&gt;&lt;/a&gt; &lt;a href="http://dotnetshoutout.com/ASPNET-Web-API-Fun-with-verbs"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fblogs.microsoft.co.il%2Fblogs%2Froadan%2Farchive%2F2012%2F02%2F21%2Fasp-net-web-api-fun-with-verbs.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1017588" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/ASP.NET+Web+API/default.aspx">ASP.NET Web API</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/HTTP/default.aspx">HTTP</category></item><item><title>Improve WCF services testability with simple Dependency Injection</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/01/30/improve-wcf-services-testability-with-simple-dependency-injection.aspx</link><pubDate>Mon, 30 Jan 2012 17:38:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:1002247</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=1002247</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/01/30/improve-wcf-services-testability-with-simple-dependency-injection.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2012/01/30/improve-wcf-services-testability-with-simple-dependency-injection.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Dependency_injection" target="_blank"&gt;Dependency injection&lt;/a&gt; is a great technique to reduce coupling between components and improve testability. There are few techniques we can create dependency injections, you can use a framework like MEF or spring to Automate dependency injection but I personally favor &lt;strong&gt;manually injected dependencies&lt;/strong&gt;. call me old fashion, but I like creating object via simple constructor calls (most of the time).&lt;/p&gt;  &lt;p&gt;This is really straight forward most of the time but when dealing with WCF services there is a slight complexity to take in to consideration. In most scenarios WCF is in charge of instantiating the service class (the only exception here is with single instance context mode, where we can supply ServiceHost with a ready made instance of our service class).&lt;/p&gt;  &lt;p&gt;Lately I have come across a really cool (and simple) option in &lt;a href="http://wcf.codeplex.com/" target="_blank"&gt;WCF Web API&lt;/a&gt;. The WCF Web API supply an HttpConfiguration API that exposes a CreateInstance delegate we can use to manually create a new instance of our service class:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a38cc0bb-2192-4bdb-8f43-df672c591339" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#2b91af;"&gt;HttpConfiguration&lt;/span&gt; config = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;HttpConfiguration&lt;/span&gt;();&lt;br /&gt; config.CreateInstance = (type, context, message) =&amp;gt;&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#2b91af;"&gt;IPlayersDal&lt;/span&gt; dal = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;PlayersDal&lt;/span&gt;();&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;PlayersCURD&lt;/span&gt;(dal);&lt;br /&gt; };&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; factory = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;HttpServiceHostFactory&lt;/span&gt;() { Configuration = config };&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;While this API is cool, it can only be used for http based services (using the WCF Web API). I really felt like using something like that in a SOAP based project I am currently working on so I figured what the hack, I can create the similar solution (source code can be found &lt;a href="https://skydrive.live.com/?cid=8de1cdea3626e8c0#cid=8DE1CDEA3626E8C0&amp;amp;id=8DE1CDEA3626E8C0!123" target="_blank"&gt;here&lt;/a&gt;) for any WCF service host out there.&lt;/p&gt;  &lt;p&gt;The first stop was creating an &lt;strong&gt;IExtension&amp;lt;ServiceHostBase&amp;gt;&lt;/strong&gt; that can transport the delegate down the WCF pipeline:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:1ebd1c7d-9892-47d8-9ef6-f53a81271025" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;InstanceInitializerExtension&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;IExtension&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;ServiceHostBase&lt;/span&gt;&amp;gt;&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&amp;gt; InstanceInitializer;&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Attach(&lt;span style="color:#2b91af;"&gt;ServiceHostBase&lt;/span&gt; owner)&lt;br /&gt;     {&lt;br /&gt;     }&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Detach(&lt;span style="color:#2b91af;"&gt;ServiceHostBase&lt;/span&gt; owner)&lt;br /&gt;     {&lt;br /&gt;     }&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Next we need to create an instance provider. this is the runtime component that WCF actually uses to create a new instance of the service class:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:17808074-eb90-4ab4-a51a-ed49be8cec97" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ManualInstanceProvider&lt;/span&gt; : &lt;span style="color:#2b91af;"&gt;IInstanceProvider&lt;/span&gt;&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; GetInstance(&lt;span style="color:#2b91af;"&gt;InstanceContext&lt;/span&gt; instanceContext, &lt;span style="color:#2b91af;"&gt;Message&lt;/span&gt; message)&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; extension = instanceContext.Host.Extensions.Find&amp;lt;&lt;span style="color:#2b91af;"&gt;InstanceInitializerExtension&lt;/span&gt;&amp;gt;();&lt;br /&gt;         &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; extension.InstanceInitializer();&lt;br /&gt;     }&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; GetInstance(System.ServiceModel.&lt;span style="color:#2b91af;"&gt;InstanceContext&lt;/span&gt; instanceContext)&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; GetInstance(instanceContext, &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);&lt;br /&gt;     }&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ReleaseInstance(System.ServiceModel.&lt;span style="color:#2b91af;"&gt;InstanceContext&lt;/span&gt; instanceContext, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; instance)&lt;br /&gt;     {&lt;br /&gt;     }&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;To hook the the ManualInstanceProvider we need to create a service behavior and implement the ApplyDispatchBehavior method like this:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:fbbef6a2-40f8-487f-bf03-cd3cdb24d830" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ApplyDispatchBehavior(&lt;span style="color:#2b91af;"&gt;ServiceDescription&lt;/span&gt; serviceDescription, &lt;span style="color:#2b91af;"&gt;ServiceHostBase&lt;/span&gt; serviceHostBase)&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;ChannelDispatcherBase&lt;/span&gt; cdb &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; serviceHostBase.ChannelDispatchers)&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color:#2b91af;"&gt;ChannelDispatcher&lt;/span&gt; cd = cdb &lt;span style="color:#0000ff;"&gt;as&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ChannelDispatcher&lt;/span&gt;;&lt;br /&gt;         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (cd != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;br /&gt;         {&lt;br /&gt;             &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#2b91af;"&gt;EndpointDispatcher&lt;/span&gt; ed &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; cd.Endpoints)&lt;br /&gt;             {&lt;br /&gt;                 ed.DispatchRuntime.InstanceProvider = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ManualInstanceProvider&lt;/span&gt;();&lt;br /&gt;             }&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;The last thing we need to do is create an extension method for &lt;strong&gt;ServiceHostBase&lt;/strong&gt; that will allow setting the delegate as the factory function of our host:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:95930096-9674-448d-8791-7ead0222f2d7" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ConfigureInstanceFactory(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ServiceHostBase&lt;/span&gt; host, &lt;span style="color:#2b91af;"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&amp;gt; instanceInitializer)&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#008000;"&gt;// adding a behavior that hocks up the ManualInstanceProvider&lt;/span&gt;&lt;br /&gt;     host.Description.Behaviors.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;InstanceCreationBehavior&lt;/span&gt;());&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#008000;"&gt;// passing the instance initialize down the rabbit hole&lt;/span&gt;&lt;br /&gt;     host.Extensions.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;InstanceInitializerExtension&lt;/span&gt; &lt;br /&gt;                             { InstanceInitializer = instanceInitializer });&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Now we are ready to create our service host:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4acdced2-ae36-4afb-8d85-e5f0cd985078" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; host = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;ServiceHost&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;PlayersService&lt;/span&gt;));&lt;br /&gt; host.ConfigureInstanceFactory(() =&amp;gt; &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;PlayersService&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;PlayersDal&lt;/span&gt;()));&lt;br /&gt; &lt;br /&gt; host.Open();&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Using dependency injection can some (if not most) of the time a simple task. Using this extension we can utilize whichever technique we choose.&lt;/p&gt;  &lt;p&gt;Yaniv&lt;/p&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2012%2f01%2f30%2fimprove-wcf-services-testability-with-simple-dependency-injection.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com//Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2012%2f01%2f30%2fimprove-wcf-services-testability-with-simple-dependency-injection.aspx" /&gt;&lt;/a&gt; &lt;a href="http://dotnetshoutout.com/Improve-WCF-services-testability-with-simple-Dependency-Injection"&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fblogs.microsoft.co.il%2Fblogs%2Froadan%2Farchive%2F2012%2F01%2F30%2Fimprove-wcf-services-testability-with-simple-dependency-injection.aspx" /&gt;&lt;/a&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=1002247" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/TDD/default.aspx">TDD</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/testability/default.aspx">testability</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Dependency+Injection/default.aspx">Dependency Injection</category></item><item><title>MSDN Israel Windows Azure and SQL Azure forum</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/01/19/msdn-israel-windows-azure-and-sql-azure-forum.aspx</link><pubDate>Thu, 19 Jan 2012 19:23:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:992272</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=992272</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2012/01/19/msdn-israel-windows-azure-and-sql-azure-forum.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2012/01/19/msdn-israel-windows-azure-and-sql-azure-forum.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;I am very happy to announce the opening of a new &lt;a href="http://social.msdn.microsoft.com/Forums/he-IL/azurehe/threads" target="_blank"&gt;Windows Azure and SQL Azure forum&lt;/a&gt; in Hebrew. The new forum is managed by Shay Friedman and myself. &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/Azure_42A20AD0.jpg"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Azure" border="0" alt="Azure" align="right" src="http://blogs.microsoft.co.il/blogs/roadan/Azure_thumb_6B10C717.jpg" width="106" height="95" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you are new to Windows Azure, I would like to use this opportunity to invite you to experience cloud development with our support and guidance. If you are already experienced with Windows Azure development I would like to assure you that you can find in our forum help from highly experienced professionals. &lt;/p&gt;  &lt;p&gt;With your participation I am sure we can create an awesome and vibrant community. &lt;/p&gt;  &lt;p&gt;Hope the catch you there soon&lt;/p&gt;  &lt;p&gt;Yaniv&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=992272" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/MSDN/default.aspx">MSDN</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Hebrew/default.aspx">Hebrew</category></item><item><title>Understanding Widows Azure Queue Storage Throughput</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2011/08/23/understanding-widows-azure-queue-storage-throughput.aspx</link><pubDate>Tue, 23 Aug 2011 15:42:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:887469</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>91</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=887469</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2011/08/23/understanding-widows-azure-queue-storage-throughput.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2011/08/22/understanding-widows-azure-queue-storage-throughput.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;The &lt;a href="http://soapatterns.org/asynchronous_queuing.php"&gt;Asynchronous Queuing Pattern&lt;/a&gt; describes a classic way to improve service throughput in distributed applications. &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/Azure2_40EFEF1C.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Azure2" border="0" alt="Azure2" align="right" src="http://blogs.microsoft.co.il/blogs/roadan/Azure2_thumb_2E77789A.png" width="240" height="50" /&gt;&lt;/a&gt;Over the years I have seen quite a few implementations of this pattern, from the use of MSMQ to &lt;a href="http://blogs.microsoft.co.il/blogs/yuvmaz/archive/2010/06/05/reactivequeue-example-increasing-throughput-for-stateless-wcf-services.aspx"&gt;ReactiveQueue&lt;/a&gt;, each with its own strengths and weaknesses. Windows Azure queue storage is designed for passing messages between applications in a persisted, scalable and controlled manner. With the above attributes, queue storage is a natural choice for enabling the Asynchronous Queuing Pattern, as described in detail in this &lt;a href="http://msdn.microsoft.com/en-us/magazine/ee335719.aspx"&gt;MSDN magazine&lt;/a&gt; article. &lt;/p&gt;  &lt;p&gt;A recent implementation I ran across at a client challenged the performance of the Azure queue storage, especially when dealing with a large queue. Their initial implementation was too slow due to a design issue we identified easily, but now they were stuck with a queue containing millions of records and they could not retrieve the messages fast enough. I decided to measure the length of the different queue operations they were using.&lt;/p&gt;  &lt;p&gt;The code I used to measure the performance is very simple and can be found &lt;a href="https://skydrive.live.com/?cid=8de1cdea3626e8c0&amp;amp;sc=documents&amp;amp;uc=1&amp;amp;id=8DE1CDEA3626E8C0%21123#"&gt;here&lt;/a&gt; so you can reproduce the tests for yourself. Keep these considerations in mind: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;We are using a public storage infrastructure that is prone to preemption by other applications.&amp;#160; &lt;/li&gt;    &lt;li&gt;The Windows Azure storage infrastructure and API implementations are subject to change. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The following totals reflect 1000 iterations (minus the first 2 to remove the additional cost of the JIT compiler and other potential initialization overhead) of a standard consumer/producer use of Windows Azure queue storage:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;table style="border-collapse:collapse;margin-left:4.65pt;mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt;" class="MsoNormalTable" cellspacing="0" cellpadding="0"&gt;             &lt;tr style="height:15pt;mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#ffffff"&gt;Total ticks&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="right"&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#ffffff"&gt;% Execution&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:1;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;new CloudQueueMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;3013727&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;0.000513214&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:2;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;AddMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;444328027497&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;75.66556694&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:3;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;GetMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;79718072883&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;13.57536056&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:4;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;DeleteMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;63164926400&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;10.75648996&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:5;mso-yfti-lastrow:yes;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;AsString&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;12151612&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;0.002069324&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;           &lt;/table&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_20C4BC92.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/roadan/image_thumb_5D993E64.png" width="307" height="186" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;The first thing we notice is that we can easily improve is the message retrieval code. In the above code we used the GetMessage method to retrieve the messages one by one. However the Windows Azure Queue API also exposes an API that allows the retrieval of up to 32 messages at a time using the GetMessages method. As you can see in the results from the following run, messages retrieval was over 6 times faster. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;since I omitted the first two iterations of GetMessages, I also omitted the first 64 iterations of every other queue operation, so at the end of the day we are looking at 936 messages rather than 998, but still the improvement is clearly noticeable.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;table style="border-collapse:collapse;margin-left:4.65pt;mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt;" class="MsoNormalTable" cellspacing="0" cellpadding="0"&gt;             &lt;tr style="height:15pt;mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#ffffff"&gt;Total ticks&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#ffffff"&gt;% Execution&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:1;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;new CloudQueueMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;2907419&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;0.000599733&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:2;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;AddMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;428481361062&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;88.3858044&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:3;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;GetMessages(32)&lt;font face="Calibri"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;12041770036&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;2.483938924&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:4;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;DeleteMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;44255399085&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;9.128866277&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:5;mso-yfti-lastrow:yes;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;strong&gt;AsString&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;3833020&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p&gt;&lt;font face="Calibri"&gt;0.000790663&lt;/font&gt;&lt;/p&gt;               &lt;/td&gt; &lt;/td&gt;&lt;/tr&gt;           &lt;/table&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image20_72C7440C.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/roadan/image20_thumb_7684E8DC.png" width="311" height="190" /&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;The next stop on our quest for throughput improvement is the deletion of messages from the queue after we retrieve them. The consumer has to perform this operation in order to clear the message from the queue and ensure reliability. The call to DeleteMessage can also be easily improved. If you take a closer look at the code, you can see that we are using the DeleteMessage method, which is a synchronous call to the Azure Queue service. However there is no real need to wait for this call, so we can use its async implementation by calling BeginDeleteMessage. The results of this run (again for 1000 iterations minus 64) are shown here: &lt;/p&gt;  &lt;p align="right"&gt;&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;table style="border-collapse:collapse;margin-left:4.65pt;mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt;" class="MsoNormalTable" cellspacing="0" cellpadding="0"&gt;             &lt;tr style="height:15pt;mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#ffffff"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#ffffff"&gt;Total ticks&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#4f81bd;border-top:#95b3d7 1pt solid;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#ffffff"&gt;% Execution&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:1;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;strong&gt;new CloudQueueMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;4904719&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;0.001183763&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:2;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;strong&gt;AddMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;401853371789&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;96.98804476&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:3;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p align="left"&gt;&lt;strong&gt;GetMessages(32)&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;12041770036&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;2.906303177&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:4;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p align="left"&gt;&lt;strong&gt;BeginDeleteMessage&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;429024316&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;0.103545802&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;              &lt;tr style="height:15pt;mso-yfti-irow:5;mso-yfti-lastrow:yes;"&gt;               &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:#95b3d7 1pt solid;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-left-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p align="left"&gt;&lt;strong&gt;AsString&lt;/strong&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:medium none;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;3822202&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;                &lt;td style="border-bottom:#95b3d7 1pt solid;border-left:medium none;padding-bottom:0in;padding-left:5.4pt;padding-right:5.4pt;background:#dce6f1;border-top:medium none;border-right:#95b3d7 1pt solid;padding-top:0in;mso-border-top-alt:solid #95b3d7 .5pt;mso-border-bottom-alt:solid #95b3d7 .5pt;mso-border-right-alt:solid #95b3d7 .5pt;" valign="bottom" nowrap="nowrap"&gt;                 &lt;p style="line-height:normal;margin:0in 0in 0pt;" class="MsoNormal" align="left"&gt;&lt;span style="mso-ascii-font-family:calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:calibri;mso-bidi-font-family:calibri;mso-bidi-language:he;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;0.000922495&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;               &lt;/td&gt;             &lt;/tr&gt;           &lt;/table&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p align="right"&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_3763B881.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;float:left;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" align="left" src="http://blogs.microsoft.co.il/blogs/roadan/image_thumb_709A1F76.png" width="314" height="182" /&gt;&lt;/a&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;In our sample code, we do not handle exceptions for BeginDeleteMessage (as well as for DeleteMessage) but we can easily do so by passing a callback function to BeginDeleteMessage, which calls the EndDeleteMessage method inside a try/catch block.&lt;/p&gt;  &lt;p&gt;Until this point, we have dramatically improved the consumer code for our queue, which I must admit the easy part. For the producer part it is going to be a bit more problematic. Windows Azure Queue Storage exposes an APM based API for adding messages to the queue (using the BeginAddMessage/EndAddMessage methods). If you are adding to the queue from a client application you can use this API to release the calling thread and using the network card to perform the majority of the heavy lifting. &lt;/p&gt;  &lt;p&gt;If you are adding to the queue from a WCF service this will not be enough, you should consider using an asynchronous service contract. More information about implementing asynchronous services (and asynchronous calls in WCF in general) can be found in &lt;a href="http://blogs.msdn.com/b/wenlong/archive/2009/02/09/scale-wcf-application-better-with-asynchronous-programming.aspx"&gt;this&lt;/a&gt; blog post by Wenlong dong.&lt;/p&gt;  &lt;h5&gt;Summary&lt;/h5&gt;  &lt;p&gt;Windows Azure Queue Storage was created with the SOA Asynchronous Queuing Pattern in mind. Using it’s async APIs (based on WCFs awesome async capabilities) and calling the GetMessages batch method we ware able to improve it’s throughput and lower the need for more compute instances.&lt;/p&gt; &lt;a href="http://dotnetshoutout.com/Understanding-Widows-Azure-Queue-Storage-Throughput"&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fblogs.microsoft.co.il%2Fblogs%2Froadan%2Farchive%2F2011%2F08%2F22%2Funderstanding-widows-azure-queue-storage-throughput.aspx" /&gt;&lt;/a&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2011%2f08%2f22%2funderstanding-widows-azure-queue-storage-throughput.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2011%2f08%2f22%2funderstanding-widows-azure-queue-storage-throughput.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=887469" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/SOA/default.aspx">SOA</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Queue+Storage/default.aspx">Queue Storage</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+Azure/default.aspx">Windows Azure</category></item><item><title>LINQ to HPC (Formerly known as DryadLINQ) Tutorial: Part 2–Data Partitioning (DSC)</title><link>http://blogs.microsoft.co.il/blogs/roadan/archive/2011/08/09/linq-to-hpc-formerly-known-as-dryadlinq-tutorial-part-2-data-partitioning-dsc.aspx</link><pubDate>Tue, 09 Aug 2011 18:39:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:881685</guid><dc:creator>Yaniv Rodenski</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/roadan/rsscomments.aspx?PostID=881685</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/roadan/archive/2011/08/09/linq-to-hpc-formerly-known-as-dryadlinq-tutorial-part-2-data-partitioning-dsc.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/roadan/archive/2011/08/02/linq-to-hpc-formerly-known-as-dryadlinq-tutorial-part-2-data-partitioning-dsc.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;A new &lt;a href="http://blogs.technet.com/b/windowshpc/archive/2011/07/07/announcing-linq-to-hpc-beta-2.aspx"&gt;beta&lt;/a&gt; has been released since I wrote &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/archive/2011/06/14/dryadlinq-tutorial-part-1-distributed-storage-catalog-dsc-basics.aspx"&gt;part 1&lt;/a&gt; of this tutorial. While very little was changed in the product, we have a new name. Another thing held me back personally from publishing this part was the fact that LINQ to HPC is not a part of Windows HPC R2 SP2. So without farther ado I am proud to present the second part of my tutorial about LINQ to HPC.&lt;/p&gt;  &lt;p&gt;In &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/archive/2011/06/14/dryadlinq-tutorial-part-1-distributed-storage-catalog-dsc-basics.aspx"&gt;part 1&lt;/a&gt; of this tutorial we discussed the fundamentals of DSC: how to manually write data to DSC files and how to use the FromEnumerable&amp;lt;T&amp;gt; extension method (from the &lt;b&gt;HpcLinqExtras&lt;/b&gt; project) to implicitly save object data to a temporary file set (in order to use it inline in a subsequent query). We also saw a caveat in this method, namely that because FromEnumerable&amp;lt;T&amp;gt; saves the data to a single file in the temporary file set, &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/logo_hpc_466x165_014B1D74_4909AB78.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Windows HPC Server 2008 R2 " border="0" alt="Windows HPC Server 2008 R2 DSC DryadLINQ Dryad LINQ to HPC" align="right" src="http://blogs.microsoft.co.il/blogs/roadan/logo_hpc_466x165_014B1D74_thumb_7D6A3226.png" width="198" height="107" /&gt;&lt;/a&gt;the subsequent query cannot be parallelized. This is due to the fact that LINQ to HPC runs any query logic locally on the DSC node containing the data to which it refers. &lt;/p&gt;  &lt;p&gt;The task at hand is quite straight forward: we would like to partitions our data into logical pieces that can be distributed across the cluster. Before we start discussing how we can physically partition data in LINQ to HPC, I would like to consider the logic we will use for dividing the data into groups. in order to do so we will take a look at vertices, which are the basic tasks that execute the query on the cluster. I will describe vertices in detail in a later part of this tutorial but for now there are few facts I would like you to consider:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A vertex can only use data from a single DSC file, located on the node it is executing on. This is, of course, in order to preserve data locality. The main implication of this little fun fact is that we should make sure that pieces of data that are dependent on each other will reside continuously in the DSC file set. A good example for this is the use of GroupBy in a query. Lets create a Student class defined as follows:      &lt;br /&gt;      &lt;br /&gt;      &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:dcde419d-d821-46a4-9c15-7796cc71c91a" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;[&lt;span style="color:#2b91af;"&gt;Serializable&lt;/span&gt;]&lt;br /&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; Id { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Name { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Nationality { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;double&lt;/span&gt; AvgGrade { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;      &lt;br /&gt;      &lt;br /&gt;Now let’s say we are grouping our Persons by nationality, so our data should be ordered like this:       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_3670E95C.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="A file set containing students" border="0" alt="Windows HPC Server 2008 R2 DSC DryadLINQ Dryad LINQ to HPC" src="http://blogs.microsoft.co.il/blogs/roadan/image_thumb_072ED7F8.png" width="524" height="359" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;&amp;#160; &lt;br /&gt;Dryad can execute local queries in each vertex and then union all the groups. If the same data needs to be reordered by the query (let’s say items were ordered by Id in the query), the first thing LINQ to HPC would need to do is to reorganize the data into intermediate files, and only then execute the necessary logic.       &lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; grouping operators are a bit more complex when it comes to LINQ to HPC and will be discussed in a later part of this tutorial.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;A vertex will process all the data in the DSC file it is accessing. This means that if we would like to break down the processing of local queries in to smaller pieces we need to break the data in to smaller files. This is possible since DSC file set support creating more files than the number of nodes. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We can control the order in which our objects are written to file when using custom HPC serialization (as I have shown in &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/archive/2011/06/14/dryadlinq-tutorial-part-1-distributed-storage-catalog-dsc-basics.aspx"&gt;part 1&lt;/a&gt; of the tutorial). However this can become tedious, especially if we need to use the same data in different queries that can benefit from different partitioning and ordering. &lt;/p&gt;  &lt;h5&gt;Repartitioning Operators&lt;/h5&gt;  &lt;p&gt;Repartitioning operators are LINQ to HPC operators that result in intermediate DSC files partitioned in a way that is not dependent on the partitioning of the input files. There are two Repartitioning operators in LINQ to HPC: Hash and Range Partitioning.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Hash Partitioning &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Hash partitioning provides a mechanism for partitioning data that is not sorted; Returning to our students sample, nationality is a prime candidate for hash partitioning. To use hash partitioning you need to call the HashPartition operation, which provides an overload that accepts the number of partitions to be created, once called you can use the ToDsc operator to create a new DSC file set and call SubmitAndWait to commit the operation (I have reviewed this steps in &lt;a href="http://blogs.microsoft.co.il/blogs/roadan/archive/2011/06/14/dryadlinq-tutorial-part-1-distributed-storage-catalog-dsc-basics.aspx"&gt;part 1&lt;/a&gt; of this tutorial):&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:26694206-f26f-4a48-b249-839d7a66ce09" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#008000;"&gt;// getting the list of students&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt; students = GetStudentsList();&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#008000;"&gt;// saving the students range partitioned to the file set with 5 partitions &lt;/span&gt;&lt;br /&gt; context.FromEnumerable&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt;(students)&lt;br /&gt;        .HashPartition(std =&amp;gt; std.AvgGrade, 5)&lt;br /&gt;        .ToDsc&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;StudentsFileSet&amp;quot;&lt;/span&gt;)&lt;br /&gt;        .SubmitAndWait(context);&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;The Why hash partitioning selects the partition for a specific entity is by performing a mod operation between the hash code of the key selector and the number of partitions, the following code mimics the behavior of hash partitioning regarding the partition selection:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:2580fa4b-1400-46d1-95ab-cea821ecc784" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; students = GetStudentsList();&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; student &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; students)&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; portNum = student.GetHashCode() % 5;&lt;br /&gt; &lt;br /&gt;     &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; str = &lt;span style="color:#a31515;"&gt;&amp;quot;the student {0} with nationality {1} will be written into partition no: {2}&amp;quot;&lt;/span&gt;;&lt;br /&gt;     &lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(str, &lt;br /&gt;                       student.Name, &lt;br /&gt;                       student.Nationality,&lt;br /&gt;                       portNum);&lt;br /&gt; }&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;This method is disappointingly crude. If you run this code (supplied with my &lt;a href="https://skydrive.live.com/?cid=8de1cdea3626e8c0&amp;amp;sc=documents&amp;amp;id=8DE1CDEA3626E8C0%21172#"&gt;samples&lt;/a&gt;) you will see that although we have instructed the HashPartition operator to create 5 partitions, the result of the mod operation results in only four different values. This is of course due to the nature of the values in our key selector (none of them divides evenly by 5). This result is somewhat arbitrary, and we could have had the result distributed in many ways (even and un even) dependent on the result of the key selector GetHashCode. To overcome this pitfall, HashPartition has another overload that accepts an IEqualityComparer that can be used to override the implementation of GetHashCode of the key selector.&lt;/p&gt;  &lt;h5&gt;Range Partitioning&lt;/h5&gt;  &lt;h5&gt;&lt;font style="font-weight:normal;"&gt;Range partitioning allows the ordered partitioning of sorted keys. Returning once more to our student’s sample, the average grade can be used as such a key. This is useful if our query uses this key selector ordering in its logic. The way range partitioning works is by assigning a range of keys for every file: any object whose key belongs in that range will be placed in the DSC file. By using this method files can be created un-evenly, but we can ensure that objects within a specific range will reside in the same file. Range separators are used to define ranges: these are values that mark the border points between one range and another. Let’s say we now would like to partition our students into files that are partitioned by grades. We will use two range separators to split the data in to three files&lt;/font&gt;&lt;font style="font-weight:normal;"&gt;: &lt;/font&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/roadan/image_53A2A334.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="A file set containing students" border="0" alt="Windows HPC Server 2008 R2 DSC DryadLINQ Dryad LINQ to HPC" src="http://blogs.microsoft.co.il/blogs/roadan/image_thumb_3E6477BF.png" width="550" height="388" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;font style="font-weight:normal;"&gt;In this case our range separators are 3 and 6. One thing that is very easy to overlook is the fact that if our student’s grade equals the value of a range separator, it can belong, range-wise to the two files on both sides of the separator. Range separators can be assigned in two ways:&lt;/font&gt;&lt;/h5&gt;  &lt;ul&gt;   &lt;li&gt;Statically assigned by user:      &lt;br /&gt;In some cases we would like to explicitly force the range structure. This is useful when we know our data and queries structure and believe we can benefit from it. Let’s say we know our queries mostly filter students with grades of 6 and above, we can reflect this knowledge into our file structure even dough it results in an uneven distribution.       &lt;br /&gt;We can pass an array of range separators like this:&amp;#160; &lt;br /&gt;      &lt;br /&gt;      &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d4990d36-d333-4568-b125-092e1a6b4d6f" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:500px;overflow:auto;padding:2px 5px;"&gt;&lt;span style="color:#008000;"&gt;// getting the list of students&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt; students = GetStudentsList();&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#008000;"&gt;// saving the students range partitioned to the file set&lt;/span&gt;&lt;br /&gt; context.FromEnumerable&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt;(students)&lt;br /&gt;        .RangePartition(std =&amp;gt; std.AvgGrade, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt;[] { 3d, 6d })&lt;br /&gt;        .ToDsc&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;StudentsFileSet&amp;quot;&lt;/span&gt;)&lt;br /&gt;        .SubmitAndWait(context);&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;      &lt;br /&gt;      &lt;br /&gt;All we need to provide here is a key selector delegate, to select the value on which we partition and the rangeKeys parameter which holds the array of range separators of the same type as the return type of the key selector. &lt;/li&gt;    &lt;li&gt;Dynamically sampled:&amp;#160; &lt;br /&gt;Another, perhaps simpler approach is to use a different overload that allows LINQ to HPC to generate partition separators for us. When we allow RangePartition to select the range separators for us, it will try to create DSC files of approximately equal size, but on the other hand we do lose much of the control we had creating the range separators ourselves. There are few overloads of RanePartition; the simplest looks like this:       &lt;br /&gt;      &lt;br /&gt;      &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:008f8b7f-6ca6-43b0-a34b-8f58648deddd" class="wlWriterSmartContent"&gt; &lt;div class="le-pavsc-container"&gt; &lt;div style="background-color:#ffffff;max-height:300px;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#008000;"&gt;// getting the list of students&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt; students = GetStudentsList();&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#008000;"&gt;// saving the students range partitioned to the file set with 5 partitions &lt;/span&gt;&lt;br /&gt; context.FromEnumerable&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt;(students)&lt;br /&gt;        .RangePartition(std =&amp;gt; std.AvgGrade, 5)&lt;br /&gt;        .ToDsc&amp;lt;&lt;span style="color:#2b91af;"&gt;Student&lt;/span&gt;&amp;gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;StudentsFileSet&amp;quot;&lt;/span&gt;)&lt;br /&gt;        .SubmitAndWait(context);&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;      &lt;br /&gt;      &lt;br /&gt;Other than losing control with dynamic range partitioning there are few key points you should bear in mind:       &lt;ul&gt;       &lt;li&gt;Currently dynamic sampling will take place for every 1,000 records - not really useful for small datasets. &lt;/li&gt;        &lt;li&gt;Dynamic range partitioning is using range separators even if you did not set them yourself. If the key selector will return non-proportional ranges, the files will have to differ in size. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h5&gt;Summary&lt;/h5&gt;  &lt;p&gt;Data partitioning allows us to implicitly distribute our data over the cluster, thus adding more control to how (and where) our queries will execute. Now that we got all our data just where we want it, we can start creating distributed kick-ass queries. But this calls for a completely different post. &lt;/p&gt;  &lt;p&gt;Source code for all the samples can be found &lt;a href="https://skydrive.live.com/?cid=8de1cdea3626e8c0&amp;amp;sc=documents&amp;amp;id=8DE1CDEA3626E8C0%21172#"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;a href="http://dotnetshoutout.com/LINQ-to-HPC-Formerly-known-as-DryadLINQ-Tutorial-Part-2Data-Partitioning-DSC"&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3A%2F%2Fblogs.microsoft.co.il%2Fblogs%2Froadan%2Farchive%2F2011%2F08%2F02%2Flinq-to-hpc-formerly-known-as-dryadlinq-tutorial-part-2-data-partitioning-dsc.aspx" /&gt;&lt;/a&gt; &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblogs.microsoft.co.il%2fblogs%2froadan%2farchive%2f2011%2f08%2f02%2flinq-to-hpc-formerly-known-as-dryadlinq-tutorial-part-2-data-partitioning-dsc.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%253a%252f%252fblogs.microsoft.co.il%252fblogs%252froadan%252farchive%252f2011%252f08%252f02%252flinq-to-hpc-formerly-known-as-dryadlinq-tutorial-part-2-data-partitioning-dsc.aspx" /&gt;&lt;/a&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=881685" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/HPC/default.aspx">HPC</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Parallel+Programing/default.aspx">Parallel Programing</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DryadLINQ/default.aspx">DryadLINQ</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Dryad/default.aspx">Dryad</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/DSC/default.aspx">DSC</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/HashPartition/default.aspx">HashPartition</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/RanePartition/default.aspx">RanePartition</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/Windows+HPC+Server+2008+R2+SP2/default.aspx">Windows HPC Server 2008 R2 SP2</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/LINQ+to+HPC/default.aspx">LINQ to HPC</category><category domain="http://blogs.microsoft.co.il/blogs/roadan/archive/tags/HpcLinqExtras/default.aspx">HpcLinqExtras</category></item></channel></rss>