<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/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>Search results matching tags 'Azure' and 'codeplex'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Azure,codeplex&amp;orTags=0</link><description>Search results matching tags 'Azure' and 'codeplex'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Tweetpoll and RESTful Northwind go bye-bye</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2010/01/23/tweetpoll-and-restful-northwind-go-bye-bye.aspx</link><pubDate>Sat, 23 Jan 2010 10:25:23 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:21376</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;On 31st January 2010 Windows Azure and SQL Azure will transition to becoming services that you have to pay for which means that my three small demos that are hosted up there are going to disappear hence I thought now would be a good time to review before they are digitally ground into dust.&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;Tweetpoll&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://tweetpoll.cloudapp.net/" target="_blank"&gt;Tweetpoll&lt;/a&gt; was a demo that I wrote back in April 2009 and is hosted on Windows Azure at &lt;a title="http://tweetpoll.cloudapp.net/" href="http://tweetpoll.cloudapp.net/"&gt;http://tweetpoll.cloudapp.net/&lt;/a&gt;. Here’s what it does:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;periodically polls &lt;a href="http://twitter.com/public_timeline" target="_blank"&gt;Twitter’s public timeline&lt;/a&gt; and gets returned a list of the latest tweets &lt;/li&gt;    &lt;li&gt;pushes each returned tweet onto a Windows Azure queue as a message &lt;/li&gt;    &lt;li&gt;picks each message off the queue, measures the length of the tweet, and increments a counter (in Windows Azure table store) for each length &lt;/li&gt;    &lt;li&gt;Displays the distribution of tweet lengths on a graph at &lt;a title="http://tweetpoll.cloudapp.net/" href="http://tweetpoll.cloudapp.net/"&gt;http://tweetpoll.cloudapp.net/&lt;/a&gt; (using some questionable HTML and Javascript :) &lt;/li&gt;    &lt;li&gt;Counts the number of hits on &lt;a title="http://tweetpoll.cloudapp.net/" href="http://tweetpoll.cloudapp.net/"&gt;http://tweetpoll.cloudapp.net/&lt;/a&gt; and maintains that count in Windows Azure table storage too &lt;/li&gt;    &lt;li&gt;Displays the current contents of the Windows Azure queue &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here’s a diagram that shows that a little better and demonstrates which parts use Azure web and worker roles. It was built at a time when one could only have one worker role per application therefore two threads are used to simulate the pushing onto and picking off the queue:&lt;/p&gt;  &lt;p&gt;&lt;img title="tweetpoll architecture" alt="tweetpoll architecture" src="http://blogs.conchango.com/blogs/jamiethomson/image_1EFE3E20.png" /&gt;&lt;/p&gt;  &lt;p&gt;Its a very noddy application and the use of a queue is gratuitous but nevertheless its a useful demo of what can be achieved and enabled me to get some experience of building an app on Azure. The source code is available at &lt;a title="http://tweetpoll.codeplex.com" href="http://tweetpoll.codeplex.com"&gt;http://tweetpoll.codeplex.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I wrote a blog entry back in May 2009 called &lt;a href="http://consultingblogs.emc.com/jamiethomson/archive/2009/05/06/tweetpoll-my-first-windows-azure-application-is-live.aspx" target="_blank"&gt;Tweetpoll – My first Windows Azure application is live&lt;/a&gt; that introduced Tweetpoll. In that blog entry I provided a screenshot of the graph that gets displayed at &lt;a href="http://tweetpoll.cloudapp.net"&gt;http://tweetpoll.cloudapp.net&lt;/a&gt; and here it is again:&lt;/p&gt;  &lt;p&gt;&lt;img title="tweet length distribution May 2009" border="0" alt="tweet length distribution May 2009" src="http://blogs.conchango.com/blogs/jamiethomson/image_thumb_690B9617.png" width="728" height="352" /&gt;&lt;/p&gt;  &lt;p&gt;Here’s what it looked like in July 2009:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamiethomson/image_5216863A.png"&gt;&lt;img title="tweet length distribution July 2009" border="0" alt="tweet length distribution July 2009" src="http://blogs.conchango.com/blogs/jamiethomson/image_thumb_3CB8D0D2.png" width="713" height="243" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And finally today in January 2010:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2F8DE293.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="tweet length distribution January 2010" border="0" alt="tweet length distribution January 2010" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_1EC637E5.png" width="736" height="282" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I said at the time that it would “be interesting to see if the graph smoothes out over time” and sure enough that is what has happened. We still get a massive spike around 140 characters of course but its clear to see that the curve has smoothed out before that spike. I also find it interesting that there are more tweets in the 30-50 range than 90-120; something for academics to ponder over perhaps. Finally, if you are wondering why some tweets appear to be over 140 characters in length then take a read of my blog entry &lt;a href="http://consultingblogs.emc.com/jamiethomson/archive/2009/07/10/the-longest-tweet.aspx" target="_blank"&gt;The Longest Tweet&lt;/a&gt; where I explain why that is.&lt;/p&gt;  &lt;p&gt;Incidentally, by adding up the counter for each tweet length I can determine how many messages Tweetpoll has gotten off of the public timeline since April 2009 and I display that number at &lt;a href="http://tweetpoll.cloudapp.net"&gt;http://tweetpoll.cloudapp.net&lt;/a&gt; too:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_6EBBE663.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="tweetpoll total tweets polled" border="0" alt="tweetpoll total tweets polled" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0268CFF8.png" width="294" height="80" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Last but not least here’s how many hits the site has had:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_6BC681B0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="tweetpoll page hits" border="0" alt="tweetpoll page hits" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5FC4917C.png" width="293" height="68" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Again, if you’re interested in looking under the bonnet of Tweetpoll then the source code is available at &lt;a title="http://tweetpoll.codeplex.com" href="http://tweetpoll.codeplex.com"&gt;http://tweetpoll.codeplex.com&lt;/a&gt;.&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;RESTful Northwind&lt;/h2&gt;  &lt;p&gt;When SQL Azure entered public beta I wanted to build an app that would demonstrate its capabilities so I built &lt;a title="http://northwindazure.cloudapp.net/Northwind.svc/" href="http://northwindazure.cloudapp.net/Northwind.svc/"&gt;http://northwindazure.cloudapp.net/Northwind.svc/&lt;/a&gt;. Its is, quite simply, a copy of the venerable Northwind database hosted on SQL Azure with a WCF Data Services (née Astoria) head on top of it which is hosted on Windows Azure. If you hit the &lt;a href="http://northwindazure.cloudapp.net/Northwind.svc/" target="_blank"&gt;WCF Data Services head&lt;/a&gt; then this is what you see (make sure you have feed reading turned on in your browser):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_172AA2AB.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="restful northwind head" border="0" alt="restful northwind head" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_39528864.png" width="440" height="620" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Some sample queries that you can issue:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Customer ALFKI      &lt;br /&gt;&lt;a href="http://northwindazure.cloudapp.net/Northwind.svc/Customers('ALFKI')"&gt;http://northwindazure.cloudapp.net/Northwind.svc/Customers('ALFKI')&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Order items with a price &amp;gt; 250      &lt;br /&gt;&lt;a href="http://northwindazure.cloudapp.net/Northwind.svc/Order_Details?$filter=UnitPricegt250"&gt;http://northwindazure.cloudapp.net/Northwind.svc/Order_Details?$filter=UnitPrice gt 250&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;All orders by customer ANATR      &lt;br /&gt;&lt;a href="http://northwindazure.cloudapp.net/Northwind.svc/Customers('ANATR')?$expand=Orders"&gt;http://northwindazure.cloudapp.net/Northwind.svc/Customers('ANATR')?$expand=Orders&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;All order details of all orders by customer ANATR      &lt;br /&gt;&lt;a href="http://northwindazure.cloudapp.net/Northwind.svc/Customers('ANATR')?$expand=Orders/Order_Details"&gt;http://northwindazure.cloudapp.net/Northwind.svc/Customers('ANATR')?$expand=Orders/Order_Details&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;All order details for the first 3 customers      &lt;br /&gt;&lt;a href="http://northwindazure.cloudapp.net/Northwind.svc/Customers?$top=3&amp;amp;$expand=Orders/Order_Details"&gt;http://northwindazure.cloudapp.net/Northwind.svc/Customers?$top=3&amp;amp;$expand=Orders/Order_Details&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;All products in all orders for the first 3 customers      &lt;br /&gt;&lt;a href="http://northwindazure.cloudapp.net/Northwind.svc/Customers?$top=3&amp;amp;$expand=Orders/Order_Details/Products"&gt;http://northwindazure.cloudapp.net/Northwind.svc/Customers?$top=3&amp;amp;$expand=Orders/Order_Details/Products&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;All the code is available on Codeplex at &lt;a href="http://nwindazure.codeplex.com/"&gt;http://nwindazure.codeplex.com/&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you want to read more about RESTful Northwind then go read my blog entry &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2009/09/10/restful-northwind-on-sql-azure.aspx" target="_blank"&gt;RESTful Northwind on SQL Azure&lt;/a&gt; where I also talk a little about how I attempted to use datadude (aka Visual Studio Team System for DB Pros aka whatever-its-called-today) against SQL Azure.&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;TwitterCache&lt;/h2&gt;  &lt;p&gt;This one is a lot simpler than Tweetpoll or RESTful Northwind, it is simply a SQL database hosted up on SQL Azure. In December 2009 Brent Ozar &lt;a href="http://www.brentozar.com/archive/2009/12/twitter-historical-database-of-my-tweeps/"&gt;blogged about how he had been archiving tweets from various people that he follows into a SQL Server database&lt;/a&gt; and he made a backup of that database available for anyone that wanted to use it. I thought it would be cool to host that database up on SQL Azure both because it would demonstrate SQL Azure’s abilities and because it would save anyone else having to go through the rigmarole of restoring it themselves so I copied the schema up there and pumped the data in using SSIS.&lt;/p&gt;  &lt;p&gt;Read more (including instructions on how to access it before it disappears) at &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2009/12/03/twittercache-now-hosted-on-sql-azure.aspx" target="_blank"&gt;TwitterCache now hosted on SQL Azure&lt;/a&gt;.&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;These apps/services will be disappearing in about one week from now so if you’re interested in using them go and do it now. Remember, the code for Tweetpoll and RESTful Northwind is up on Codeplex at:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a title="http://tweetpoll.codeplex.com/" href="http://tweetpoll.codeplex.com/"&gt;http://tweetpoll.codeplex.com/&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="http://nwindazure.codeplex.com/" href="http://nwindazure.codeplex.com/"&gt;http://nwindazure.codeplex.com/&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Hope these have been useful to someone, they certainly have been for me!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>