<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7322524202280465623</id><updated>2011-12-07T11:46:11.490-08:00</updated><category term='Printing'/><category term='ArcGIS Server'/><category term='Dojo'/><category term='Technology'/><category term='Heatmap.js'/><category term='Studio'/><category term='Mapvelope'/><category term='Microsoft Silverlight'/><category term='Partying'/><category term='RIA'/><category term='Ajax'/><category term='Supply'/><category term='ESRI'/><category term='Virtual CloneDrive'/><category term='Virtual CD'/><category term='My Birthday'/><category term='Clubbing'/><category term='College Station'/><category term='Fall 2008'/><category term='License'/><category term='Dell'/><category term='Low Level Datastore API'/><category term='Software'/><category term='Indexes'/><category term='Internship'/><category term='Demand'/><category term='Laptop'/><category term='Datastore'/><category term='Zune HD'/><category term='AGS'/><category term='.NET 3.5'/><category term='Threading'/><category term='Drinking'/><category term='Nokia N97'/><category term='Apple Iphone 3Gs'/><category term='Windows Vista'/><category term='Adobe Flash'/><category term='Web Maps'/><category term='PDF'/><category term='REST'/><category term='FIFA'/><category term='Nokia'/><category term='Google Chart Generator'/><category term='Random Stuff'/><category term='ArcGIS'/><category term='Graduation'/><category term='Java'/><category term='Asynchronous Methods'/><category term='Xps'/><category term='Google App Engine'/><category term='Delegates'/><category term='SOAP'/><category term='Locking'/><category term='ISO Mounting Software'/><category term='9.3'/><category term='Bindings'/><category term='FIFA 2010 World Cup'/><category term='Corporate Greed. ISO'/><category term='Web Applications'/><category term='ArcGIS Server JavaScript API'/><category term='Bleeding Edge'/><category term='JavaScript'/><category term='ArcGIS Server REST API'/><category term='Thesis'/><category term='Google Chart'/><title type='text'>Personal Experiences</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-588510976514578856</id><published>2011-12-06T18:36:00.001-08:00</published><updated>2011-12-07T11:46:11.498-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Heatmap.js'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server JavaScript API'/><title type='text'>Client Side Heatmaps</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Heatmaps are very useful spatial visualization tools. However, they become a lot more interesting when they are interactive.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I always wanted to write an interactive Heatmap layer, that could be overlaid on a client side map control (e.g. ESRI's JavaScript map control / Google Maps etc.). I came across a cool JavaScript library called (heatmap.js) that could be used to generate client side heatmaps using the new HTML5 canvas API's and could also fallback on SVG is the browser was not modern enough.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To achieve overlay-able client side heatmaps, all I had to do was to use the HTML 5 canvas (where the heatmap was rendered) and generate a data-uri, that could be transparently overlaid on the map control.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Being reasonably familiar with the ESRI JavaScript API, I sub-classed (esri.layers.DynamicMapServiceLayer) as shown below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;iframe class="codetidy" frameborder="0" height="850px" src="http://codetidy.com/paste/embed/1579" type="text/html" width="100%"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Essentially, I just create an invisible canvas, and use that to generate the heatmap for a random dataset and finally generate animage-url, that i can overlay on the map control.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The HTML page that drives the script is given below:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;iframe class="codetidy" frameborder="0" height="600px" src="http://codetidy.com/paste/embed/1580" type="text/html" width="100%"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The overall effect is pretty cool. &lt;a href="http://feature-notifier.appspot.com/client/heatmap/index.html"&gt;Check it out !&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-588510976514578856?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/588510976514578856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=588510976514578856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/588510976514578856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/588510976514578856'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2011/12/heatmaps-are-very-useful-spatial.html' title='Client Side Heatmaps'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-1732203564258321617</id><published>2011-08-23T06:50:00.000-07:00</published><updated>2011-08-23T06:53:17.629-07:00</updated><title type='text'>Reboot</title><content type='html'>It's been a really long time since i wrote about something interesting. Attempting a reboot on the blog. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-1732203564258321617?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/1732203564258321617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=1732203564258321617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/1732203564258321617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/1732203564258321617'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2011/08/reboot.html' title='Reboot'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-2473859410640548835</id><published>2010-07-28T05:50:00.000-07:00</published><updated>2011-06-15T12:56:24.694-07:00</updated><title type='text'>Firefox Add-on's with the Jetpack SDK</title><content type='html'>&lt;div&gt;&lt;p&gt;I have been following the development of the Jetpack SDK (&lt;a title="https://jetpack.mozillalabs.com/" href="https://jetpack.mozillalabs.com/"&gt;https://jetpack.mozillalabs.com/&lt;/a&gt;) with great interest. The idea, that one can use standard web technologies (HTML, CSS and JavaScript) to build Firefox add-on’s is very tempting. &lt;/p&gt;  &lt;p&gt;The Jetpack project, is very active and they hope to be at 1.0 by end of the year. Right now the most stable &lt;em&gt;release &lt;/em&gt;version of the Jetpack SDK is at &lt;strong&gt;0.6&lt;/strong&gt;. It already has many of the features that one would want. Support for &lt;em&gt;widgets, &lt;/em&gt;working with &lt;em&gt;tabs&lt;/em&gt;, &lt;em&gt;context-menu, &lt;/em&gt;XMLHttpRequest(&lt;em&gt;xhr)&lt;/em&gt; are all available already. For more information, check out the Jetpack documentation at &lt;a title="https://jetpack.mozillalabs.com/sdk/0.5/docs/#guide/getting-started" href="https://jetpack.mozillalabs.com/sdk/0.5/docs/#guide/getting-started"&gt;https://jetpack.mozillalabs.com/sdk/0.5/docs/#guide/getting-started&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I built a very simple Firefox add-on with Jetpack to test how easy it was to build add-on’s. The documentation is very well done, and therefore it took me very little time to get started. Jetpack’s philosophy with developing add-on’s is &lt;em&gt;convention over configuration&lt;/em&gt;.&lt;em&gt; &lt;/em&gt;To create an add-on, the first thing that you need to do is to define a &lt;em&gt;package. &lt;/em&gt;To do that, you will need to go to the folder where you have un-zipped the Jetpack SDK and create a new directory under the &lt;em&gt;packages&lt;/em&gt; folder. Every package has a &lt;em&gt;package.json&lt;/em&gt; which defines &lt;em&gt;meta-data &lt;/em&gt;about your package. &lt;/p&gt;  &lt;div style="border: 1px solid silver; text-align: left; padding: 4px; line-height: 12pt; background-color: rgb(244, 244, 244); margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New',courier,monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text;" id="codeSnippetWrapper"&gt;   &lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: rgb(244, 244, 244); margin: 0em; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;" id="codeSnippet"&gt;{ &lt;br&gt; version: &lt;span style="color: rgb(0, 96, 128);"&gt;"1.0"&lt;/span&gt;,&lt;br&gt; license: &lt;span style="color: rgb(0, 96, 128);"&gt;"BSD"&lt;/span&gt;,&lt;br&gt; author: &lt;span style="color: rgb(0, 96, 128);"&gt;"Rahul Ravikumar (http://rahulswackyworld.blogspot.com)"&lt;/span&gt;,&lt;br&gt; description: &lt;span style="color: rgb(0, 96, 128);"&gt;"Description about your add-on goes here !"&lt;/span&gt;,&lt;br&gt; dependencies: [&lt;br&gt;  &lt;span style="color: rgb(0, 96, 128);"&gt;"jetpack-core"&lt;/span&gt;&lt;br&gt; ]&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;/div&gt;&lt;p&gt;Very simple. You add a little bit of meta-data about your add-on, and declare that it depends on the &lt;em&gt;jetpack-core&lt;/em&gt; libraries. The Jetpack SDK looks for a file called &lt;em&gt;&lt;strong&gt;main.js&lt;/strong&gt;&lt;/em&gt; inside your package’s &lt;em&gt;&lt;strong&gt;lib&lt;/strong&gt;&lt;/em&gt; folder. Think of it as a &lt;em&gt;public static void main(…){}&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;The “View in ArcGIS.com” Add-On&lt;/h3&gt;&lt;p&gt;The “View in ArcGIS.com” add-on’s goal is very simple. It looks for links (anchor tags) in any webpage and as long as they look like &lt;em&gt;&lt;strong&gt;*/services/…/MapServer&lt;/strong&gt;&lt;/em&gt; or &lt;em&gt;&lt;strong&gt;*/services/…/FeatureServer&lt;/strong&gt; &lt;/em&gt;or &lt;em&gt;&lt;strong&gt;*/services/…/ImageServer&lt;/strong&gt;, &lt;/em&gt;the add-on adds a new &lt;em&gt;item &lt;/em&gt;into the context menu called “View in ArcGIS.com”.&lt;/p&gt;&lt;p&gt;The &lt;strong&gt;lib/main.js &lt;/strong&gt;file looks like this:&lt;/p&gt;&lt;div style="border: 1px solid silver; text-align: left; padding: 4px; line-height: 12pt; background-color: rgb(244, 244, 244); margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New',courier,monospace; direction: ltr; max-height: 600px; font-size: 8pt; overflow: auto; cursor: text;" id="codeSnippetWrapper"&gt;&lt;br&gt;  &lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: rgb(244, 244, 244); margin: 0em; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;" id="codeSnippet"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; contextMenu = require(&lt;span style="color: rgb(0, 96, 128);"&gt;"context-menu"&lt;/span&gt;);&lt;br&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; tabs = require(&lt;span style="color: rgb(0, 96, 128);"&gt;"tabs"&lt;/span&gt;);&lt;br&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;var&lt;/span&gt; menuItem = contextMenu.Item({&lt;br&gt;  label: &lt;span style="color: rgb(0, 96, 128);"&gt;"View in ArcGIS.com"&lt;/span&gt;,&lt;br&gt;  context: [&lt;br&gt;   &lt;span style="color: rgb(0, 96, 128);"&gt;"a[href*='services'][href*='/MapServer']"&lt;/span&gt;,&lt;br&gt;   &lt;span style="color: rgb(0, 96, 128);"&gt;"a[href*='services'][href*='/FeatureServer']"&lt;/span&gt;,&lt;br&gt;   &lt;span style="color: rgb(0, 96, 128);"&gt;"a[href*='services'][href*='/ImageServer']"&lt;/span&gt;&lt;br&gt;  ],&lt;br&gt;  onClick: &lt;span style="color: rgb(0, 0, 255);"&gt;function&lt;/span&gt;(context, item) {&lt;br&gt;    tabs.open({&lt;br&gt;      url: &lt;span style="color: rgb(0, 96, 128);"&gt;"http://www.arcgis.com/home/webmap/viewer.html?url="&lt;/span&gt; + context.node.href&lt;br&gt;    });&lt;br&gt;  }&lt;br&gt;});&lt;br&gt;contextMenu.add(menuItem);&lt;/pre&gt;&lt;br&gt;&lt;/div&gt;&lt;p&gt;Essentially, i get a handle to the &lt;em&gt;context-menu&lt;/em&gt; and &lt;em&gt;tabs. &lt;/em&gt;I need to add a new &lt;em&gt;Item&lt;/em&gt; to the context-menu that has a label “View in ArcGIS.com”.&lt;/p&gt;&lt;p&gt;The &lt;em&gt;items&lt;/em&gt; in a context menu are defined by its &lt;em&gt;&lt;strong&gt;context&lt;/strong&gt;&lt;/em&gt;. Contexts are &lt;strong&gt;CSS selectors&lt;/strong&gt;, and the &lt;em&gt;onClick &lt;/em&gt;property defines the function that is executed when the &lt;em&gt;item&lt;/em&gt; in the context-menu is clicked. The onClick function, in this case opens a new tab with a URL based on the context’s DOM node.&lt;/p&gt;&lt;p&gt;That’s it. The result looks something like this.&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_5lvju4SHYt0/TFAk88xrBzI/AAAAAAAADJM/x3l3pANsl7I/s1600-h/Preview%5B4%5D.png"&gt;&lt;img style="border: 0px none; display: inline;" title="Preview" alt="Preview" src="http://lh4.ggpht.com/_5lvju4SHYt0/TFAk9QXyCZI/AAAAAAAADJQ/qO1pkSVUl3o/Preview_thumb%5B2%5D.png?imgmax=800" border="0" height="338" width="572"&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Moral of the story: JavaScript is Awesome !&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-2473859410640548835?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/2473859410640548835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=2473859410640548835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/2473859410640548835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/2473859410640548835'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2010/07/firefox-add-ons-with-jetpack-sdk.html' title='Firefox Add-on&amp;#39;s with the Jetpack SDK'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_5lvju4SHYt0/TFAk9QXyCZI/AAAAAAAADJQ/qO1pkSVUl3o/s72-c/Preview_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-1104483178562298613</id><published>2010-06-03T02:33:00.001-07:00</published><updated>2010-06-03T02:33:01.269-07:00</updated><title type='text'>Searchable FIFA World Cup 2010 Schedules on App Engine</title><content type='html'>&lt;p&gt;I have deployed an application, that will help me keep track of&amp;#160; the upcoming 2010 FIFA World Cup Schedules. You can query match schedules by date or by country. The application is running at &lt;a href="http://rahulswackyworld.appspot.com"&gt;http://rahulswackyworld.appspot.com&lt;/a&gt; and is my first Python based web application running on Google App Engine :)&lt;/p&gt;  &lt;p&gt;I will continue to keep up as we progress with the group stage of the World Cup. I am also working to add more features to the application. If you have any interesting ideas, that you would like as part of the application, please do let me know. &lt;/p&gt;  &lt;p&gt;I hope you have as much fun as I do with the most popular sporting event in the world !&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-1104483178562298613?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/1104483178562298613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=1104483178562298613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/1104483178562298613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/1104483178562298613'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2010/06/searchable-fifa-world-cup-2010.html' title='Searchable FIFA World Cup 2010 Schedules on App Engine'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-6539007322716553334</id><published>2010-05-17T05:44:00.001-07:00</published><updated>2011-06-15T02:29:57.367-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='FIFA 2010 World Cup'/><category scheme='http://www.blogger.com/atom/ns#' term='Dojo'/><category scheme='http://www.blogger.com/atom/ns#' term='FIFA'/><title type='text'>FIFA World Cup 2010 and why I love JavaScript…</title><content type='html'>&lt;div&gt;&lt;p&gt;As an ardent football (soccer) fan, I am working on an Android Application which will help me with the schedules for the 2010 FIFA World Cup. I wanted to use Google App Engine as my backend, which would help in storing and presenting the same data as a neat web application. &lt;/p&gt;  &lt;p&gt;The first step in this process was gathering the data for the FIFA 2010 group schedules. This was proving to be a more difficult task that I had thought. FIFA has published great HTML and PDF pages with all the relevant information about the group schedules of the world cup; but i could not find this data in formats that i could use programmatically (XML/JSON/RSS etc..). &lt;/p&gt;  &lt;p&gt;Enter Dojo and JavaScript. I navigated to the official schedules page (&lt;a title="http://www.fifa.com/worldcup/matches/index.html" href="http://www.fifa.com/worldcup/matches/index.html"&gt;http://www.fifa.com/worldcup/matches/index.html&lt;/a&gt;), opened up a Firebug Console and did the following:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 96.16%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 390px; max-height: 600px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;//Adding Dojo to the page&lt;/span&gt;&lt;br /&gt;scriptTag = document.createElement(&lt;span style="color: #006080"&gt;&amp;quot;script&amp;quot;&lt;/span&gt;);&lt;br /&gt;scriptTag.src = &lt;span style="color: #006080"&gt;&amp;quot;http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js&amp;quot;&lt;/span&gt;&lt;br /&gt;document.getElementsByTagName(&lt;span style="color: #006080"&gt;&amp;quot;head&amp;quot;&lt;/span&gt;)[0].appendChild(scriptTag)&lt;br /&gt;&lt;span style="color: #008000"&gt;//CSS3 Queries&lt;/span&gt;&lt;br /&gt;matchNums = dojo.query(&lt;span style="color: #006080"&gt;&amp;quot;.fixture tbody tr .c.mNum&amp;quot;&lt;/span&gt;);&lt;br /&gt;matchTimes = dojo.query(&lt;span style="color: #006080"&gt;&amp;quot;.fixture tbody tr .l.dt span&amp;quot;&lt;/span&gt;);&lt;br /&gt;matchVenues = dojo.query(&lt;span style="color: #006080"&gt;&amp;quot;.fixture tbody tr .l.v a&amp;quot;&lt;/span&gt;);&lt;br /&gt;homeTeams = dojo.query(&lt;span style="color: #006080"&gt;&amp;quot;.fixture tbody tr .l.homeTeam a&amp;quot;&lt;/span&gt;);&lt;br /&gt;homeTeamsIcons = dojo.query(&lt;span style="color: #006080"&gt;&amp;quot;.fixture tbody tr td:nth-of-type(4) a&amp;quot;&lt;/span&gt;);&lt;br /&gt;awayTeams = dojo.query(&lt;span style="color: #006080"&gt;&amp;quot;.fixture tbody tr .r.awayTeam a&amp;quot;&lt;/span&gt;);&lt;br /&gt;awayTeamsIcons = dojo.query(&lt;span style="color: #006080"&gt;&amp;quot;.fixture tbody tr td:nth-of-type(8) a&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: #008000"&gt;//Compiling the Final List&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; final_list = [];&lt;br /&gt;dojo.forEach(matchNums, &lt;span style="color: #0000ff"&gt;function&lt;/span&gt;(matchNum, i) {&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; match_info = {};&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;no&amp;quot;&lt;/span&gt;] = matchNum.innerHTML;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;time&amp;quot;&lt;/span&gt;] = matchTimes[i].innerHTML;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;venue&amp;quot;&lt;/span&gt;] = matchVenues[i].innerHTML;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;venue_link&amp;quot;&lt;/span&gt;] = matchVenues[i].href;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;homeTeamLink&amp;quot;&lt;/span&gt;] = homeTeamsIcons[i].href;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;homeTeamIcon&amp;quot;&lt;/span&gt;] = homeTeamsIcons[i].innerHTML;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;homeTeamName&amp;quot;&lt;/span&gt;] = homeTeams[i].innerHTML;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;awayTeamLink&amp;quot;&lt;/span&gt;] = awayTeamsIcons[i].href;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;awayTeamIcon&amp;quot;&lt;/span&gt;] = awayTeamsIcons[i].innerHTML;&lt;br /&gt;  match_info[&lt;span style="color: #006080"&gt;&amp;quot;awayTeamName&amp;quot;&lt;/span&gt;] = awayTeams[i].innerHTML;&lt;br /&gt;  final_list.push(match_info);&lt;br /&gt;});&lt;br /&gt;&lt;span style="color: #008000"&gt;//Print&lt;/span&gt;&lt;br /&gt;console.info(dojo.toJson(final_list, &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;));&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And Done..! With CSS3 Queries, Dojo and a little bit of JavaScript, I was able to generate a representation of the same data in JSON format. I uploaded this data to the App Engine data store and my back end's data store was ready to serve !&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-6539007322716553334?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/6539007322716553334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=6539007322716553334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/6539007322716553334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/6539007322716553334'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2010/05/fifa-world-cup-2010-and-why-i-love.html' title='FIFA World Cup 2010 and why I love JavaScript…'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-3726521016153593225</id><published>2010-04-13T02:00:00.001-07:00</published><updated>2011-06-15T02:29:58.277-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PDF'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Maps'/><category scheme='http://www.blogger.com/atom/ns#' term='Google App Engine'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Mapvelope'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server REST API'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS'/><title type='text'>Mapvelopes on Google App Engine</title><content type='html'>&lt;div&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:79cb84fd-8f6c-490b-9b0f-956b6be17260" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/AppEngine" rel="tag"&gt;AppEngine&lt;/a&gt;,&lt;a href="http://technorati.com/tags/PDF" rel="tag"&gt;PDF&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ArcGIS+Server" rel="tag"&gt;ArcGIS Server&lt;/a&gt;,&lt;a href="http://technorati.com/tags/REST" rel="tag"&gt;REST&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Google+Maps" rel="tag"&gt;Google Maps&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Mapvelope" rel="tag"&gt;Mapvelope&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;I came across Nick Johnson’s &lt;a href="http://blog.notdot.net/" target="_blank"&gt;blog&lt;/a&gt; (Nick Johnson works in the Google App Engine team); he was talking about &lt;a href="http://blog.notdot.net/2010/04/Generating-PDFs-on-App-Engine-Python-and-introducing-Mapvelopes" target="_blank"&gt;Mapvelopes&lt;/a&gt; and how you could go about creating &lt;em&gt;mapvelopes&lt;/em&gt; in App Engine with the Python Runtime. &lt;/p&gt;  &lt;p&gt;I decided to create Mapvelopes using the Java Runtime, mashing up the Google Static Maps API, Google Geocoding service, ArcGIS REST API and the iText PDF engine. The result is &lt;a href="http://gmapvelopes.appspot.com"&gt;http://gmapvelopes.appspot.com&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Although the result works in general, you cannot generate mapvelopes for addresses that are &lt;em&gt;too far away&lt;/em&gt; from each other, because of a restriction with the Google static maps API. &lt;/p&gt;  &lt;p&gt;To try out the application you can use: &lt;a title="http://gmapvelopes.appspot.com/generateEnvelope?from=Redlands,CA&amp;amp;to=Los%20Angeles,CA&amp;amp;f=pdf" href="http://gmapvelopes.appspot.com/generateEnvelope?from=Redlands,CA&amp;amp;to=Los%20Angeles,CA&amp;amp;f=pdf"&gt;http://gmapvelopes.appspot.com/generateEnvelope?from=Redlands,CA&amp;amp;to=Los%20Angeles,CA&amp;amp;f=pdf&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-3726521016153593225?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/3726521016153593225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=3726521016153593225' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/3726521016153593225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/3726521016153593225'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2010/04/mapvelopes-on-google-app-engine.html' title='Mapvelopes on Google App Engine'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-772279947703871526</id><published>2010-03-28T19:16:00.001-07:00</published><updated>2010-03-28T23:41:05.438-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PDF'/><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server REST API'/><category scheme='http://www.blogger.com/atom/ns#' term='AGS'/><category scheme='http://www.blogger.com/atom/ns#' term='Printing'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server JavaScript API'/><title type='text'>Some updates to Map2PDF</title><content type='html'>&lt;p&gt;I am a little surprised with the kind of feedback/enthusiasm and response that i have received with Map2PDF. I thank you all for that. &lt;/p&gt;  &lt;p&gt;I have therefore made a couple of updates to the Map2PDF that makes it easier for you to integrate it with your application. I have included scripts that give out of the box support for client side graphics (points, poly-lines and polygons). I have also made some performance enhancements to the web application, which has improved the memory footprint of the application.&amp;#160; &lt;/p&gt;  &lt;p&gt;Check them out, and your comments/suggestions are appreciated.&lt;/p&gt;  &lt;p&gt;The latest web application archive is at : &lt;a title="http://map2pdf.googlecode.com/files/Map2PDF.war" href="http://map2pdf.googlecode.com/files/Map2PDF.war"&gt;http://map2pdf.googlecode.com/files/Map2PDF.war&lt;/a&gt;&lt;/p&gt;  &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:0767317B-992E-4b12-91E0-4F059A8CECA8:830ee68f-bc91-470d-82e6-fe2e7f231dae" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Map2PDF" rel="tag"&gt;Map2PDF&lt;/a&gt;,&lt;a href="http://technorati.com/tags/PDF" rel="tag"&gt;PDF&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Printing" rel="tag"&gt;Printing&lt;/a&gt;,&lt;a href="http://technorati.com/tags/JSAPI" rel="tag"&gt;JSAPI&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ArcGIS+Server" rel="tag"&gt;ArcGIS Server&lt;/a&gt;,&lt;a href="http://technorati.com/tags/JavaScript+Printing" rel="tag"&gt;JavaScript Printing&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-772279947703871526?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/772279947703871526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=772279947703871526' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/772279947703871526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/772279947703871526'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2010/03/some-updates-to-map2pdf.html' title='Some updates to Map2PDF'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-3416026096765186805</id><published>2010-03-22T13:39:00.001-07:00</published><updated>2010-03-22T13:41:43.626-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Low Level Datastore API'/><category scheme='http://www.blogger.com/atom/ns#' term='Google App Engine'/><category scheme='http://www.blogger.com/atom/ns#' term='Datastore'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Applications'/><category scheme='http://www.blogger.com/atom/ns#' term='Indexes'/><title type='text'>Dynamic Indexes with Google App Engine</title><content type='html'>&lt;p&gt;Over the past couple of days, i have been experimenting a lot with Google App Engine; I am thrilled with the platform in general (both the Python as well as the Java Runtime). &lt;/p&gt;  &lt;p&gt;I use the lower level Java Datastore API because it gives me the convenience of storing data in a completely schema-less way. However one caveat is that while the Datastore is schema-less; index definitions need to be uploaded during deployment time. &lt;/p&gt;  &lt;p&gt;The Google App Engine team recommends that you use the development server to run the required queries and a file ‘datastore-indexes-auto.xml’ is generated. This file is your index configuration file; which then gets used by the appcfg.cmd command to create indexes on Google’s datastore. For me this was a major deal breaker as i did not know which Entity properties’ to index as a soft schema would actually get generated on the fly based on the user using my application. &lt;/p&gt;  &lt;p&gt;If you look at the current feature requests for the App Engine runtime, the ability to programmatically create indexes is on the list, but it is unfortunately low on priority – or so it seems. However, I was not going to give up; I tried to determine what the appcfg.cmd was doing to generate these indexes at deployment time. To my surprise I found that the App Engine datastore exposes a set of RESTful endpoints, one of which is -&lt;a href="http://appengine.google.com/api/datastore/index/add"&gt;http://appengine.google.com/api/datastore/index/add&lt;/a&gt;; using which appcfg.cmd adds the indexes at deployment time. &lt;/p&gt;  &lt;p&gt;On further analysis, i found that most of the code that you need to take advantage of this endpoint already exists in ‘google.appengine.tools’ package (for the Python Runtime). All you need to do is explained in the script below:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 600px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;from google.appengine.tools import appengine_rpc&lt;br /&gt;&lt;br /&gt;host = &lt;span style="color: #006080"&gt;'appengine.google.com'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;def auth_function():&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (&lt;span style="color: #006080"&gt;'yourusername'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'yourpassword'&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;source = &lt;span style="color: #006080"&gt;'yourapplication.appspot.com'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;rpc_server = appengine_rpc.HttpRpcServer(host, auth_function, &lt;span style="color: #006080"&gt;'Python 2.6'&lt;/span&gt;, source)&lt;br /&gt;&lt;br /&gt;#Authenticate&lt;br /&gt;rpc_server._Authenticate();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; rpc_server.authenticated == True:&lt;br /&gt;    print &lt;span style="color: #006080"&gt;'Authentication Successful.'&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; cookie &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; rpc_server.cookie_jar:&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; cookie.name and cookie.name == &lt;span style="color: #006080"&gt;'ACSID'&lt;/span&gt;:&lt;br /&gt;            print &lt;span style="color: #006080"&gt;'Authentication Token Obtained (%s =&amp;gt; %s)'&lt;/span&gt; % (cookie.name, cookie.value)&lt;br /&gt;      &lt;br /&gt;&lt;span style="color: #006080"&gt;''&lt;/span&gt;&lt;span style="color: #006080"&gt;'index_payload is description of your indexes in YAML - This can be generated in various different ways. '&lt;/span&gt;&lt;span style="color: #006080"&gt;''&lt;/span&gt;&lt;br /&gt;index_payload = &lt;span style="color: #006080"&gt;'indexes:\n- kind: Comment\n  properties:\n  - name: name\n    direction: asc\n  - name: comment\n    direction: asc'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#Uploading Index&lt;br /&gt;print rpc_server.Send(request_path=&lt;span style="color: #006080"&gt;'/api/datastore/index/add'&lt;/span&gt;, payload= index_payload, app_id=&lt;span style="color: #006080"&gt;'&amp;lt;yourApplicationId&amp;gt;'&lt;/span&gt;, version=&lt;span style="color: #006080"&gt;'&amp;lt;yourVersionString&amp;gt;'&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;print &lt;span style="color: #006080"&gt;'Uploading Index Successful'&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I deployed the above as a Python application and gave it a version string ‘&lt;em&gt;tasks’&lt;/em&gt;. Therefore the URL of the this application became ‘&lt;em&gt;tasks.myapp.appspot.com’&lt;/em&gt;. This application had access to the same datastore and thus i could generate indexes dynamically !&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;All I needed was the YAML for my index configuration which could be generated in a variety of ways. I used JAXB to generate the bindings for ‘datastore-indexes.xsd’ and used it to generate the YAML. Once i had the YAML, I passed it on to &lt;em&gt;tasks.myapp.appspot.com&lt;/em&gt; and I was done !&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-3416026096765186805?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/3416026096765186805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=3416026096765186805' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/3416026096765186805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/3416026096765186805'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2010/03/dynamic-indexes-with-google-app-engine.html' title='Dynamic Indexes with Google App Engine'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-4285555731185997495</id><published>2010-01-14T09:39:00.000-08:00</published><updated>2010-01-14T12:08:04.166-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Threading'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>“JavaScripty” Asynchronous execution in Java.</title><content type='html'>&lt;p&gt;The Java programming language provides interfaces like &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Future.html"&gt;Future&amp;lt;T&amp;gt;&lt;/a&gt; and &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Callable.html"&gt;Callable&amp;lt;T&amp;gt;&lt;/a&gt; for supporting asynchronous tasks. However, one thing i miss in this design is the ability to execute JavaScript like callbacks at the end of an asynchronous task. &lt;/p&gt;  &lt;p&gt;If you are like me, and would like to have callbacks executed at the end of a long running asynchronous task you can do the following:&lt;/p&gt;  &lt;p&gt;The AsyncTask&amp;lt;T&amp;gt; is an abstract class implementing the Runnable interface, which defines a method executeTask(), which needs to be overridden. There are helper methods to add/register callbacks and error backs.&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 844px; max-height: 900px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.util.ArrayList;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.util.List;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;abstract&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AsyncTask&amp;lt;T&amp;gt; &lt;span style="color: #0000ff"&gt;implements&lt;/span&gt; Runnable {&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; List&amp;lt;AsyncCallback&amp;lt;T&amp;gt;&amp;gt; callbacks = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArrayList&amp;lt;AsyncCallback&amp;lt;T&amp;gt;&amp;gt;();&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; List&amp;lt;AsyncErrback&amp;gt; errbacks = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArrayList&amp;lt;AsyncErrback&amp;gt;();&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;boolean&lt;/span&gt; isTaskComplete;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; List&amp;lt;Exception&amp;gt; exceptions = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArrayList&amp;lt;Exception&amp;gt;();&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; T result;&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #008000"&gt;//override this method to create your async task.&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;abstract&lt;/span&gt; T executeTask() &lt;span style="color: #0000ff"&gt;throws&lt;/span&gt; Exception;&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AsyncTask () {&lt;br /&gt;    &lt;span style="color: #008000"&gt;//default constructor&lt;/span&gt;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AsyncTask(AsyncCallback&amp;lt;T&amp;gt; callback) {&lt;br /&gt;    callbacks.add(callback);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AsyncTask(AsyncCallback&amp;lt;T&amp;gt; callback, AsyncErrback errback){&lt;br /&gt;    callbacks.add(callback);&lt;br /&gt;    errbacks.add(errback);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  @Override&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; run() {&lt;br /&gt;    &lt;span style="color: #008000"&gt;//execute the main task.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;try&lt;/span&gt; {&lt;br /&gt;      result = executeTask();&lt;br /&gt;      isTaskComplete = true;&lt;br /&gt;      &lt;span style="color: #008000"&gt;//execute callbacks&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;(AsyncCallback&amp;lt;T&amp;gt; callback : callbacks){&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;try&lt;/span&gt; {&lt;br /&gt;          callback.callback(result);&lt;br /&gt;        }&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception error) {&lt;br /&gt;          exceptions.add(error);&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;    }&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception error){&lt;br /&gt;      exceptions.add(error);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #008000"&gt;//execute errbacks&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;(AsyncErrback errback : errbacks){&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;(Exception exception : exceptions){&lt;br /&gt;        &lt;span style="color: #008000"&gt;//error back is invoked once per every exception&lt;/span&gt;&lt;br /&gt;        errback.errback(exception);&lt;br /&gt;      }&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;boolean&lt;/span&gt; isTaskComplete() {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; isTaskComplete;&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; registerCallback(AsyncCallback&amp;lt;T&amp;gt; callback){&lt;br /&gt;    callbacks.add(callback);&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; registerErrback(AsyncErrback errback)  {&lt;br /&gt;    errbacks.add(errback);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; List&amp;lt;AsyncCallback&amp;lt;T&amp;gt;&amp;gt; getCallbacks() {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; callbacks;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; List&amp;lt;AsyncErrback&amp;gt; getErrBacks() {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; errbacks;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The callback and the err backs are defined below:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 92px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; AsyncCallback&amp;lt;T&amp;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; callback(T result) &lt;span style="color: #0000ff"&gt;throws&lt;/span&gt; Exception;&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 92px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; AsyncErrback {&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; errback(Exception error);&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;An example using the classes defined above are :&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 500px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AsyncExecutor {&lt;br /&gt;&lt;br /&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; main(String[] args) {&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Thread(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AsyncTask&amp;lt;String&amp;gt;(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AsyncCallback&amp;lt;String&amp;gt;() {&lt;br /&gt;      @Override&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; callback(String result) &lt;span style="color: #0000ff"&gt;throws&lt;/span&gt; Exception {&lt;br /&gt;        System.out.println(&lt;span style="color: #006080"&gt;&amp;quot;On Callback - &amp;gt; &amp;quot;&lt;/span&gt; + result);&lt;br /&gt;        &lt;span style="color: #008000"&gt;//testing errbacks&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Exception(&lt;span style="color: #006080"&gt;&amp;quot;Error in Callback #1&amp;quot;&lt;/span&gt;);&lt;br /&gt;      }&lt;br /&gt;    }, &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AsyncErrback() {&lt;br /&gt;      @Override&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; errback(Exception error) {&lt;br /&gt;        System.out.println(&lt;span style="color: #006080"&gt;&amp;quot;Oop's something wrong happened - &amp;gt; &amp;quot;&lt;/span&gt; + error.getMessage());&lt;br /&gt;      }&lt;br /&gt;    }) {&lt;br /&gt;      @Override&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; String executeTask() &lt;span style="color: #0000ff"&gt;throws&lt;/span&gt; Exception {&lt;br /&gt;        System.out.println(&lt;span style="color: #006080"&gt;&amp;quot;Doing Something complicated -&amp;gt; don't wait for me to complete.&amp;quot;&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;;&lt;br /&gt;      }&lt;br /&gt;    }).start();&lt;br /&gt;    &lt;br /&gt;    System.out.println(&lt;span style="color: #006080"&gt;&amp;quot;--DONE ! --&amp;quot;&lt;/span&gt;);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Most of the code is self explanatory and very simple to understand. Although the end result is not as “clean” as JavaScript it is definitely a start in the right direction.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-4285555731185997495?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/4285555731185997495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=4285555731185997495' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/4285555731185997495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/4285555731185997495'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2010/01/javascripty-asynchronous-execution-in.html' title='“JavaScripty” Asynchronous execution in Java.'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-8538631095412689515</id><published>2009-12-10T05:15:00.001-08:00</published><updated>2009-12-13T19:57:16.179-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Threading'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Locking'/><title type='text'>wait(), notify(), and notifyAll()</title><content type='html'>&lt;p&gt;One of the most misunderstood parts of the Java language is the use of three methods defined in the class “Object” – wait(), notify(), and notifyAll(). These methods are pivotal for Thread synchronization using guarded locks using &lt;em&gt;shared objects&lt;/em&gt;. Hopefully, this post will help you understand this a little better.&lt;/p&gt;  &lt;p&gt;wait(), notify() and notifyAll() can only be used within a &lt;em&gt;synchronized&lt;/em&gt; context – that is&amp;#160; one cannot call these methods without acquiring an exclusive lock on the shared object.&lt;/p&gt;  &lt;p&gt;The scenario here in the below example is that of a PUBLISHER-&amp;gt;SUBSCRIBER. The Subscriber thread waits for published messages from the Publisher thread, and terminates when it encounters a special “DONE !” message.&lt;/p&gt;  &lt;p&gt;The shared object, using which locking is done is defined as a class &lt;strong&gt;Message.&lt;/strong&gt;&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 750px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;package&lt;/span&gt; com.threads.sync;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.util.logging.Logger;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Message {&lt;br /&gt;  &lt;br /&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;final&lt;/span&gt; Logger logger = Logger.getLogger(Message.&lt;span style="color: #0000ff"&gt;class&lt;/span&gt;.getName());;&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; String message;&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #008000"&gt;//when isEmpty = false -&amp;gt; message is ready to be consumed&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;boolean&lt;/span&gt; isEmpty;&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;synchronized&lt;/span&gt; String getMessage(){&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(isEmpty){&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;{&lt;br /&gt;        logger.info(&lt;span style="color: #006080"&gt;&amp;quot;Consumer Waiting...&amp;quot;&lt;/span&gt;);&lt;br /&gt;        wait();&lt;br /&gt;      }&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;(InterruptedException e) {&lt;br /&gt;        logger.info(e.getMessage());&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #008000"&gt;//notification received., isEmpty = false -&amp;gt; toggle status&lt;/span&gt;&lt;br /&gt;    isEmpty = true;&lt;br /&gt;    &lt;span style="color: #008000"&gt;//notify all that status has changed&lt;/span&gt;&lt;br /&gt;    notifyAll();&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; message;&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;synchronized&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; publish(String message){&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(!isEmpty){&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;{&lt;br /&gt;        logger.info(&lt;span style="color: #006080"&gt;&amp;quot;Producer Waiting...&amp;quot;&lt;/span&gt;);&lt;br /&gt;        wait();&lt;br /&gt;      }&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;(InterruptedException e){&lt;br /&gt;        logger.info(e.getMessage());&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: #008000"&gt;//isEmpty -&amp;gt; true, update message&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.message = message;&lt;br /&gt;    &lt;span style="color: #008000"&gt;//toggle status&lt;/span&gt;&lt;br /&gt;    isEmpty = false;&lt;br /&gt;    notifyAll();&lt;br /&gt;  }  &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The above class is pretty self explanatory. The &lt;strong&gt;Message &lt;/strong&gt;class defines a &lt;em&gt;flag &lt;/em&gt;called &lt;strong&gt;isEmpty &lt;/strong&gt;which is false when there is a message to be read by the consumer (which in this case is the Subscriber thread). When the Subscriber thread receives a notify() / notifyAll() from the Publisher it reads the message and toggles the isEmpty flag.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;The classes Publisher.java and Subscriber.java are defined below:&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 750px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;package&lt;/span&gt; com.threads.sync;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.util.logging.Logger;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Publisher &lt;span style="color: #0000ff"&gt;implements&lt;/span&gt; Runnable {&lt;br /&gt;  &lt;br /&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;final&lt;/span&gt; Logger logger = Logger.getLogger(Publisher.&lt;span style="color: #0000ff"&gt;class&lt;/span&gt;.getName());&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; String [] messages;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; Message msg;&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Publisher(Message msg){&lt;br /&gt;    messages = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; String [] {&lt;br /&gt;      &lt;span style="color: #006080"&gt;&amp;quot;Lorem&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;Ipsum&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;Testing Thread Synchronization&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;DONE !&amp;quot;&lt;/span&gt;&lt;br /&gt;    };&lt;br /&gt;    &lt;span style="color: #008000"&gt;//pass in the shared objectS&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.msg = msg;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Publisher(String [] messages, Message msg){&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.messages = messages;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.msg = msg;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  @Override&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; run() {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(messages == null)&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;(String message : messages) {&lt;br /&gt;      msg.publish(message);&lt;br /&gt;      &lt;span style="color: #008000"&gt;//simulating thread randomness using sleep between 1-5 seconds&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; factor = (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;)(Math.random() * 4 + 1);&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;long&lt;/span&gt; millis = factor * 1000;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;try&lt;/span&gt; {&lt;br /&gt;        logger.info(&lt;span style="color: #006080"&gt;&amp;quot;Publisher sleeping for &amp;quot;&lt;/span&gt; + millis + &lt;span style="color: #006080"&gt;&amp;quot;ms.&amp;quot;&lt;/span&gt;);&lt;br /&gt;        Thread.sleep(millis);&lt;br /&gt;      }&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;(InterruptedException e){&lt;br /&gt;        logger.info(e.getMessage());&lt;br /&gt;      }&lt;br /&gt;      &lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 650px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;package&lt;/span&gt; com.threads.sync;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.util.logging.Logger;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Subscriber &lt;span style="color: #0000ff"&gt;implements&lt;/span&gt; Runnable {&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; Message msg;&lt;br /&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;final&lt;/span&gt; Logger logger = Logger.getLogger(Subscriber.&lt;span style="color: #0000ff"&gt;class&lt;/span&gt;.getName());&lt;br /&gt;  &lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Subscriber(Message msg){&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.msg = msg;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  @Override&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; run() {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;while&lt;/span&gt;(true){&lt;br /&gt;      String message = msg.getMessage();&lt;br /&gt;      &lt;span style="color: #008000"&gt;//sometimes the call to getMessage can result in a wait() -&amp;gt; handle 'null' cases&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(message != null)&lt;br /&gt;        logger.info(&lt;span style="color: #006080"&gt;&amp;quot;Message recd : &amp;quot;&lt;/span&gt; + message);&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(&lt;span style="color: #006080"&gt;&amp;quot;DONE !&amp;quot;&lt;/span&gt;.equalsIgnoreCase(message))&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;      &lt;br /&gt;      &lt;span style="color: #008000"&gt;//simulating thread randomness using sleep between 1-5 seconds&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; factor = (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;)(Math.random() * 4 + 1);&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;long&lt;/span&gt; millis = factor * 1000;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;try&lt;/span&gt; {&lt;br /&gt;        logger.info(&lt;span style="color: #006080"&gt;&amp;quot;Subscriber sleeping for &amp;quot;&lt;/span&gt; + millis + &lt;span style="color: #006080"&gt;&amp;quot;ms.&amp;quot;&lt;/span&gt;);&lt;br /&gt;        Thread.sleep(millis);&lt;br /&gt;      }&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;(InterruptedException e){&lt;br /&gt;        logger.info(e.getMessage());&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The ThreadSyncTest.java which is the driver program is defined as -&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 220px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;package&lt;/span&gt; com.threads.sync;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ThreadSyncTests {&lt;br /&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; main(String[] args) {&lt;br /&gt;    &lt;span style="color: #008000"&gt;//-&amp;gt;Initialize Shared Object&lt;/span&gt;&lt;br /&gt;    Message msg = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Message();&lt;br /&gt;    &lt;span style="color: #008000"&gt;//-&amp;gt;Initialize Publisher&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Thread(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Publisher(msg)).start();&lt;br /&gt;    &lt;span style="color: #008000"&gt;//-&amp;gt;Initialize Subscriber&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Thread(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Subscriber(msg)).start();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once you get around the small details, the implementation of Thread synchronization using locks is quite simple to understand.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-8538631095412689515?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/8538631095412689515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=8538631095412689515' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8538631095412689515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8538631095412689515'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/12/wait-notify-and-notifyall.html' title='wait(), notify(), and notifyAll()'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-6988974036740808219</id><published>2009-09-11T16:09:00.001-07:00</published><updated>2009-12-13T19:44:47.010-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Threading'/><category scheme='http://www.blogger.com/atom/ns#' term='Delegates'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Asynchronous Methods'/><title type='text'>Asynchronous HttpWebRequests</title><content type='html'>&lt;p&gt;I had a neat KML/KMZ validator that i wanted to expose as a web service so that others could use the service to test their KML outputs. &lt;/p&gt;  &lt;p&gt;For this, i allowed folks to enter the URL where the generated KML / KMZ was available; I would use this URL to download the content and then validate it. The initial validator was written in .NET (as Java was not being able to handle multiple name spaces defined in the KML / KMZ -&amp;gt; don't even get me started... ) and therefore I decided to expose this web service using WCF. &lt;/p&gt;  &lt;p&gt;I was using the System.Net.HttpWebRequest to download content, and once i was done to my dismay i found that conventional use of HttpWebRequest would place a blocking call and was therefore very expensive (unlike Java's URL.openConnection()). I therefore experimented with .NET delegates and the .NET threading model and finally managed to write a clean wrapper that would make the HttpWebRequest's asynchronously. For those who are interested in doing something similar - i have shared the code. &lt;/p&gt;  &lt;p&gt;The AsyncDownload wrapper is defined as :&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 1450px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Threading;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; AsyncTests&lt;br /&gt;{&lt;br /&gt;  &lt;span style="color: #008000"&gt;//define delegate&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Download(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; url, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; path);&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AsyncDownload&lt;br /&gt;  {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; isComplete { get; set; }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; url { get; set; }&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; path { get; set; }&lt;br /&gt;&lt;br /&gt;    Download downloader { get; set; }&lt;br /&gt; &lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AsyncDownload(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; url, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; path)&lt;br /&gt;    {&lt;br /&gt;      isComplete = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.url = url;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.path = path;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.downloader = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Download(DownloadUrl);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DownloadUrl(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; url, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; path)&lt;br /&gt;    {&lt;br /&gt;      HttpWebRequest request = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;br /&gt;      BinaryWriter writer = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;br /&gt;      Stream stream = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;br /&gt;      {&lt;br /&gt;        request = HttpWebRequest.Create(url) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; HttpWebRequest;&lt;br /&gt;        request.Method = &lt;span style="color: #006080"&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        IAsyncResult dHandle = request.BeginGetResponse(&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;);&lt;br /&gt;        HttpWebResponse resp = request.EndGetResponse(dHandle) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; HttpWebResponse;&lt;br /&gt;        stream = resp.GetResponseStream();&lt;br /&gt;        writer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; BinaryWriter(File.Create(path));&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[] buffer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[32 * 1024];&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; readBytes = 0;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;while&lt;/span&gt; ((readBytes = stream.Read(buffer, 0, 32 * 1024)) != 0)&lt;br /&gt;        {&lt;br /&gt;          writer.Write(buffer, 0, readBytes);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #008000"&gt;//flush bytes&lt;/span&gt;&lt;br /&gt;        writer.Flush();&lt;br /&gt;      }&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception exception)&lt;br /&gt;      {&lt;br /&gt;        Trace.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Exception : {0} &amp;quot;&lt;/span&gt;, exception.Message);&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (request != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;          Trace.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Aborting Request : {0} &amp;quot;&lt;/span&gt;, request.ToString());&lt;br /&gt;          request.Abort();&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;finally&lt;/span&gt;&lt;br /&gt;      {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (stream != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;          stream.Close();&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (writer != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;          writer.Close();&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; IAsyncResult BeginDownload(AsyncCallback callback, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; state)&lt;br /&gt;    {&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; downloader.BeginInvoke(url, path, callback, state);&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; EndDownload(IAsyncResult result)&lt;br /&gt;    {&lt;br /&gt;      downloader.EndInvoke(result);&lt;br /&gt;      &lt;span style="color: #008000"&gt;//set is complete to true&lt;/span&gt;&lt;br /&gt;      isComplete = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To use the wrapper, you can do the following:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 600px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Threading;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; AsyncTests&lt;br /&gt;{&lt;br /&gt;  &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Program&lt;br /&gt;  {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Main(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;    {&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; url = &lt;span style="color: #006080"&gt;&amp;quot;http://...&amp;quot;&lt;/span&gt;;&lt;br /&gt;      &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; path = &lt;span style="color: #006080"&gt;&amp;quot;C:/Temp/...&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;      AsyncDownload downloader = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AsyncDownload(url, path);&lt;br /&gt;&lt;br /&gt;      AsyncCallback callback = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AsyncCallback(&lt;br /&gt;        iar =&amp;gt;&lt;br /&gt;        {&lt;br /&gt;          Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Testing Callbacks&amp;quot;&lt;/span&gt;);&lt;br /&gt;          &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;       );&lt;br /&gt;&lt;br /&gt;      IAsyncResult handle = downloader.BeginDownload(callback, &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;);&lt;br /&gt;      downloader.EndDownload(handle);&lt;br /&gt;&lt;br /&gt;      Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Done Downloading&amp;quot;&lt;/span&gt;);&lt;br /&gt;      Console.Read();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-6988974036740808219?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/6988974036740808219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=6988974036740808219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/6988974036740808219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/6988974036740808219'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/09/asynchronous-httpwebrequests_11.html' title='Asynchronous HttpWebRequests'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-1377209200255642987</id><published>2009-08-14T02:33:00.000-07:00</published><updated>2009-08-14T02:44:01.658-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zune HD'/><category scheme='http://www.blogger.com/atom/ns#' term='My Birthday'/><category scheme='http://www.blogger.com/atom/ns#' term='Random Stuff'/><title type='text'>An Early Birthday Gift.</title><content type='html'>My Birthday is a couple of weeks away and i turn 26. To celebrate, I have gifted myself a Zune HD(pre-ordered at Amazon.com). I can't wait for September 15th, which is when the Zune HD will be officially in my hands. September is going to be an awesome month with the Zune HD release, the Apple Event, the Xbox 360 update and House M.D. (Season 6).&lt;br /&gt;&lt;br /&gt;PS :&lt;br /&gt;&lt;br /&gt;With all the stuff that i buy from Amazon.com, I think that it would be a lot easier to transfer 5% of what i earn per month to Amazon.com straightaway and avoid a lot of the drama involved with making payments [:)]. &lt;br /&gt;&lt;br /&gt;If you have not checked out the Zune HD already, you should. Its powered by Nvidia Tegra has a gorgeous OLED screen with an unbelievable user interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-1377209200255642987?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/1377209200255642987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=1377209200255642987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/1377209200255642987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/1377209200255642987'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/08/early-birthday-gift.html' title='An Early Birthday Gift.'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-8618420490027725672</id><published>2009-07-28T21:59:00.000-07:00</published><updated>2009-07-28T22:08:54.815-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Maps'/><category scheme='http://www.blogger.com/atom/ns#' term='RIA'/><category scheme='http://www.blogger.com/atom/ns#' term='Adobe Flash'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Silverlight'/><title type='text'>Flash and memory leaks.</title><content type='html'>Is it just me or have you stopped playing Flash videos on your personal computer? I avoid playing any Flash videos, unless i know that they are really worth it. Why you ask? Flash has a huge problem with memory allocation and deallocation. I have noticed that as i keep playing more videos, my computer starts using more and more RAM and gets slower.&lt;br /&gt;&lt;br /&gt;Adobe says that they are aware of the problem and they are planning on fixing these problems. But the real question is, even after 10 major releases of the supposedly most popular video delivery / Rich Internet Applications platform why is there a memory leak? &lt;br /&gt;&lt;br /&gt;Yay for Microsoft Silverlight, and lets hope that the success of Silverlight drives Adobe to fix these leaks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-8618420490027725672?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/8618420490027725672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=8618420490027725672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8618420490027725672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8618420490027725672'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/07/flash-and-memory-leaks.html' title='Flash and memory leaks.'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-5959200405293365971</id><published>2009-06-29T16:47:00.001-07:00</published><updated>2009-07-28T18:26:14.052-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PDF'/><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server REST API'/><category scheme='http://www.blogger.com/atom/ns#' term='AGS'/><category scheme='http://www.blogger.com/atom/ns#' term='Printing'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS Server JavaScript API'/><title type='text'>Map2PDF</title><content type='html'>A lot of people have been wanting to print web maps authored with the ArcGIS JavaScript API. There have also been numerous requests for the ability to print web maps as a PDF. I wrote a simple RESTful service called Map2PDF, that exposes the ability to print web maps as PDF. Check out this &lt;a href="http://restfulsamples.appspot.com/"&gt;sample&lt;/a&gt;, that uses the Map2PDF RESTful web service.&lt;br /&gt;&lt;br /&gt;There is support for Tiled Map services, Dynamic Map Services as well as Graphic Features (limited support). The sample also includes a &lt;a href="http://orthogonal.esri.com/Map2PDF/PrintMap.js"&gt;&lt;span style="font-style: italic;"&gt;PrintMap.js&lt;/span&gt;&lt;/a&gt; script, that helps developers serialize the 'map state' in a format that the Map2PDF service expects.&lt;br /&gt;&lt;br /&gt;The web service uses the Java Advanced Imaging API for mosaicing and overlay of images. Graphic Features are rendered on the server side using java.awt.Graphics2D. I have used the iText PDF engine to generate the PDF's. For source code check the &lt;a href="http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2009/07/27/ArcGIS-JavaScript-API-printing-through-PDF.aspx"&gt;ArcGIS Server Blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For more help on how to effectively use Map2PDF check out the API &lt;a href="http://orthogonal.esri.com/Map2PDF/help.html"&gt;documentation&lt;/a&gt; and the &lt;a href="http://orthogonal.esri.com/Map2PDF/index.jsp"&gt;services directory&lt;/a&gt; page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-5959200405293365971?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/5959200405293365971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=5959200405293365971' title='26 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/5959200405293365971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/5959200405293365971'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/06/map2pdf.html' title='Map2PDF'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>26</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-8543072563286109874</id><published>2009-06-10T14:22:00.000-07:00</published><updated>2009-06-10T16:24:04.741-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apple Iphone 3Gs'/><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Nokia'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='Bleeding Edge'/><category scheme='http://www.blogger.com/atom/ns#' term='Nokia N97'/><title type='text'>Life on the Bleeding Edge</title><content type='html'>Sometimes i wonder if being on the bleeding edge of technology is worth it. Imagine having to pay the highest markup for goods/services and a couple of months later realizing that the stuff you bought back then is not even worth half its value. Look at Nokia, every time they come up with a new phone they price it at $699. Wait for a couple of months and it becomes $399. I realize that every company needs to make profit, but i don't understand the need to arbitrarily mark-up on the price of a commodity and then decreasing it a couple of weeks/ months later. Had you started off with a low price a lot more people would have probably bought it, or at least given it a lot of thought - and done some word of mouth marketing for you.&lt;br /&gt;&lt;br /&gt;Another example of this is Apple's new iPhone 3GS. Just to create an arbitrary distinction, they decided not to support voice commands and video recording on the 3G. Apparently the hardware on the 3G is not good enough. Give me a break ! I have been seeing voice commands and video recording on a phone since Pocket PC days.&lt;br /&gt;&lt;br /&gt;Also the fact that they charge iPod touch's $9.99 for software updates is just criminal ! Nobody, I mean' nobody' charges for updates on an OS. I guess folks who buy OS X are used to paying for updates, but not me. And then there is the carrier AT&amp;amp;T. Every Windows Mobile 6 + / Android smart phone can do VoIP over 3G but not the iPhone. And then you are expected to pay up another $70.00 (+/-) for tethering after paying for "unlimited data". No MMS support until further notice. What the hell ?&lt;br /&gt;&lt;br /&gt;Stuff like this, really makes me wish that Android / Windows Mobile / Symbian would evolve faster. Then i can choose not to put up with all this nonsense. As it stands today, the iPhone is old news as other platforms are getting better. Here's to more choice for the consumer !!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-8543072563286109874?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/8543072563286109874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=8543072563286109874' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8543072563286109874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8543072563286109874'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/06/bleeding-edge-of-technology.html' title='Life on the Bleeding Edge'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-118223113736750801</id><published>2009-06-03T21:58:00.000-07:00</published><updated>2009-06-03T22:30:09.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Corporate Greed. ISO'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtual CD'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO Mounting Software'/><category scheme='http://www.blogger.com/atom/ns#' term='Xps'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtual CloneDrive'/><category scheme='http://www.blogger.com/atom/ns#' term='Dell'/><category scheme='http://www.blogger.com/atom/ns#' term='Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Laptop'/><title type='text'>My new Laptop</title><content type='html'>&lt;span style="font-size:100%;"&gt;I just bought a new laptop, my pride and joy a Dell Studio XPS 16. It took me some time to set it up because of the sheer amount of Dell 'Bloatware' in it. Corporate greed can ruin even the most wonderful of things. I think these companies have to start getting their act together and stop shoving crap up into our laptops. Otherwise the laptop is pure awesomeness. The RGB LEB back lit screen and the back-lit keyboard is just a dream.&lt;br /&gt;&lt;br /&gt;On a side-note, I have ISO's for most of my software setups, and while i could use Virtual CD in Windows XP, for the longest time i could not find a decent ISO mounting software &lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;that was free&lt;/span&gt;&lt;span style="font-size:100%;"&gt; for Windows Vista. I finally &lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;rediscovered &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Virtual CloneDrive&lt;/span&gt;&lt;span style="font-size:100%;"&gt; for Windows Vista. It's a free, clean ISO mounting software that i could use hassle free on Vista. It's also extremely efficient in terms of both size on disk and memory used. Check it out !&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-118223113736750801?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/118223113736750801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=118223113736750801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/118223113736750801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/118223113736750801'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/06/my-new-laptop.html' title='My new Laptop'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-5331547062316201164</id><published>2009-05-15T12:39:00.000-07:00</published><updated>2009-05-15T14:21:56.232-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google Chart'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Bindings'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Chart Generator'/><title type='text'>Java Bindings to Google Charts</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:georgia;"&gt;I love Google charts, and find them to be an excellent alternative to plug-in based chart renderers / JavaScript based chart tool kits.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;While working on multiple projects i realized that whenever i was working with Google charts, i kept rewriting bindings that would generate Google chart URL's. So in my spare time, i wrote a general set of &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-family:georgia;font-size:100%;"  &gt;useful&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:georgia;"&gt; Java bindings that &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-family:georgia;font-size:100%;"  &gt;&lt;span style="font-weight: bold;"&gt;validate chart data &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:georgia;"&gt;that the user is passing and &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;font-family:georgia;font-size:100%;"  &gt;generate&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:georgia;"&gt; the chart URL's.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;These bindings support all basic chart types (line bar, and pie charts) and support various forms of data encoding.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;The source is open and can be modified in which ever way you want ! (as long as you give me some credit for writing the original framework...)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;There is not too much documentation yet, but there are samples in the source that will help you understand how you can use these bindings. I have kept things extremely simple.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;If you have any questions / comments you can contact me @ rahul (DOT) ravikumar (AT) hotmail(DOT)com.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;The source code has been shared at :: &lt;a href="http://code.google.com/p/javagchart/"&gt;http://code.google.com/p/javagchart/&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-5331547062316201164?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/5331547062316201164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=5331547062316201164' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/5331547062316201164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/5331547062316201164'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2009/05/java-bindings-to-google-charts.html' title='Java Bindings to Google Charts'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-3490730046633316801</id><published>2008-09-08T07:42:00.000-07:00</published><updated>2008-09-08T07:43:42.742-07:00</updated><title type='text'>Getting there...!</title><content type='html'>The last couple of weeks have been pretty monotonous. It has been very difficult for me to collect my thoughts and put them in a understandable manner in the form of a thesis... But guess what, I am getting there..! [:-)]&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-3490730046633316801?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/3490730046633316801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=3490730046633316801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/3490730046633316801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/3490730046633316801'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2008/09/getting-there.html' title='Getting there...!'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-6981266751299200833</id><published>2008-08-17T22:16:00.000-07:00</published><updated>2008-08-17T22:28:46.262-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='License'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='My Birthday'/><title type='text'>Tidbits</title><content type='html'>Man.. the last couple of days i have been writing my thesis and boy is it tough! I did not think that it would be this difficult. Oh well, i guess i will just have to keep working on it. The good thing at least is that i do not have any course work this semester..!Lets hope that i maintain a decent pace and get things done.&lt;br /&gt;&lt;br /&gt;I have also finally managed to get myself a Driving License... I &lt;span style="font-weight: bold;"&gt;don't&lt;/span&gt; need to carry my passport around any more which is a huge relief.&lt;br /&gt;&lt;br /&gt;One a side not, I am going to be 25 years old very soon..and my dad just gifted my a Nikon D60 (Awesome, right?). I gifted myself a book on Professional C# .NET platform 3.5. The only &lt;span style="font-style: italic;"&gt;other&lt;/span&gt; advantage in turning 25 is  do not have to pay the ruddy underage fee while renting a car [:-)].&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-6981266751299200833?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/6981266751299200833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=6981266751299200833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/6981266751299200833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/6981266751299200833'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2008/08/tidbits.html' title='Tidbits'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-8585448177666586550</id><published>2008-08-05T15:05:00.000-07:00</published><updated>2008-08-05T15:14:43.857-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='College Station'/><category scheme='http://www.blogger.com/atom/ns#' term='Fall 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Graduation'/><category scheme='http://www.blogger.com/atom/ns#' term='Internship'/><category scheme='http://www.blogger.com/atom/ns#' term='ESRI'/><title type='text'>Back in College Station</title><content type='html'>Alas, the internship with ESRI is over. Time to get back to work and start working on my thesis. Although i have not got to doing anything since i have come back, i really need to pull my socks up, if i am serious about graduating in December.&lt;br /&gt;&lt;br /&gt;Things at College Station have not changed too much. Its still the same sleepy little town that i love. Although i must say that i am feeling a bit odd, as my friends are not back from their internships and classes don't start for a couple of weeks. There is still a lot happening, considering the inflow of graduate students who will be starting this fall. As we get closer to the beginning of the semester, College Station will to wake up after 'hibernating' in summer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-8585448177666586550?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/8585448177666586550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=8585448177666586550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8585448177666586550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/8585448177666586550'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2008/08/back-in-college-station.html' title='Back in College Station'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-514768625630504995</id><published>2008-07-31T14:10:00.001-07:00</published><updated>2008-07-31T14:17:56.928-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='Dojo'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS'/><title type='text'>Oh Dojo...!</title><content type='html'>Over the last couple of days, as i have used the ArcGIS JavaScript(REST) API, i have come to realize the importance of the Dojo toolkit. When i use Dojo, i do not have to worry about the browser and its quirks, which is a relief. The firebug console is pure class. It makes debugging so simple. I am so impressed that i actually have started reading up on Dojo.&lt;br /&gt;&lt;br /&gt;I really hope Microsoft get their act together with IE-8 and relieve us of all the stupid quirks. I also hope the Debug console in IE works as "advertised". On a lighter note, they should be given credit for coming up with the fabled XMLHttpRequest in the first place, don't you think?&lt;br /&gt;&lt;br /&gt;PS: I sincerely thank the REST team at ESRI, who decided to use Dojo for REST. I also thank them for sponsoring my training in Dojo during the course of my internship.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-514768625630504995?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/514768625630504995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=514768625630504995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/514768625630504995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/514768625630504995'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2008/07/oh-dojo.html' title='Oh Dojo...!'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-901363188799172194</id><published>2008-07-30T02:31:00.000-07:00</published><updated>2008-08-05T15:30:11.896-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOAP'/><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='9.3'/><category scheme='http://www.blogger.com/atom/ns#' term='Internship'/><category scheme='http://www.blogger.com/atom/ns#' term='ArcGIS'/><category scheme='http://www.blogger.com/atom/ns#' term='ESRI'/><title type='text'>An Internship that changed my perspective.</title><content type='html'>&lt;span style="font-family:verdana;"&gt;I worked for ESRI as a Software Developer intern, in the ArcGIS Server (Java) team. This summer has been a fruitful learning experience, as i got a "firsthand" account of the inner-workings of the ArcGIS Server.&lt;br /&gt;&lt;br /&gt;I worked with the Web-Services team for performance enhancement of the current ArcGIS SOAP SDK. With Axis 1.x based tool kits XML parsing was identified as a bottleneck and therefore we wanted to make a switch to a tool kit that uses the Streaming API for XML Parsing (StAX). We identified that Metro (Glassfish's SOAP Stack) was the way to go and i generated the new Metro based SDK for accessing Web-Services. One of the problems that we faced was that the stubs that were generated by Axis 1.x and Metro looked very different, and a big part of the project was to maintain 100% backward compatibility with the old SDK. The result of this project is an increased performance of the ArcGIS Server's SOAP stack (by about 90%). I am also delighted that the new toolkit will actually (most probably) be shipped to customers as a part of Service Pack 1 to ArcGIS 9.3.&lt;br /&gt;&lt;br /&gt;I also got the opportunity to look at the new ArcGIS Server's RESTful services and the JavaScript API. I must say that i am absolutely sold on the idea that REST is perhaps the way to go. Using the ArcGIS JavaScript API is an absolute breeze and compatibility with Google Maps and the Virtual Earth API is a delight. Dynamic languages seem to be the way to go, with the advent of Ajax and i cant help wonder that productivity seems to be improve dramatically with JavaScript. With just a few lines of code, you have a full blown Web-GIS application. On a side-note i am still jealous that the Windows platform does not (?) have an equalant to TextMate on the Mac.&lt;br /&gt;&lt;br /&gt;Now that i have worked with the Web-Services tier, i have realized SOAP is very over-rated. In my opinion it's just glorified XML based RPC. Java tool kits for SOAP are not compatible. Heck even Axis 2.x is not backward compatible with Axis 1.x.&lt;br /&gt;&lt;br /&gt;One of the challenges that we face everyday, is with respect to achieving interoperability with different layers in the technology stack. Imagine having to write a Java application, which actually uses COM/DCOM based ArcObjects in the background...! I would say that this is what makes life very interesting (albeit a little difficult) at ESRI.&lt;br /&gt;&lt;br /&gt;The good thing is that the team was impressed with what i had accomplished over the summer and now i have a full time job offer from the Geo-spatial technology leader. I don't have much to complain about... [:-)].&lt;br /&gt;&lt;br /&gt;PS:&lt;br /&gt;&lt;br /&gt;My department included this piece of information in their newsletter: &lt;a href="http://geosciences.tamu.edu/content/view/310/70/"&gt;Geography Students Awarded ESRI Internships&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-901363188799172194?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/901363188799172194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=901363188799172194' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/901363188799172194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/901363188799172194'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2008/07/internship-that-changed-my-perspective.html' title='An Internship that changed my perspective.'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7322524202280465623.post-2848441321858605931</id><published>2008-03-16T02:02:00.001-07:00</published><updated>2008-07-31T14:04:38.780-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Clubbing'/><category scheme='http://www.blogger.com/atom/ns#' term='Partying'/><category scheme='http://www.blogger.com/atom/ns#' term='Supply'/><category scheme='http://www.blogger.com/atom/ns#' term='Drinking'/><category scheme='http://www.blogger.com/atom/ns#' term='Demand'/><title type='text'>Clubbing and the Laws of Supply and Demand</title><content type='html'>For me clubbing does not come naturally. In fact i am quite reluctant when it comes to shaking a leg, on the dance floor. I have never been to a club ever; in India. For years, my friends kept telling me that i was missing out on one of the fundamental joys of life; Pubbing, Dancing and 'Socializing' at clubs.&lt;br /&gt;&lt;br /&gt;The first time I walked into a club, i wanted to see for myself, as to what the fuss was all about. I admit, that i had a bit of fun. I was a part of a dynamic group of graduate students from all over the world and the sheer joy of hearing an Bollywood number after what seemed a lifetime of hip-hop brought about the dancer in me. Since then, I have ventured into a couple of clubs in places ranging from the university town of College Station, a Spring-Break destination like South Padre to downtown San Diego.&lt;br /&gt;&lt;br /&gt;I like to think that i am an analytical person and some analysis of commonalities in the various Clubs that i have been to have reinforced the idea that the laws of Supply and Demand rule the world of Clubs.&lt;br /&gt;&lt;br /&gt;Most clubs have a "restricted elite" who make all the "rules" of the club. They have a say on all things like, people who have access to the club, the dress code and the whole schabang. The next level in the hierarchy, are the folks with the V.I.P / V.V.I.P access. These people are the ones who are regulars in the club, and know most of the names of the bartenders by heart. Then there are those, who have to pay a "cover" charge to get in. Reasons ranging from a high profile event like a popular band or a Dj; to not having a partner to dance with.&lt;br /&gt;&lt;br /&gt;So where does Supply and Demand come in? Almost everywhere. There are folks who are forced to wait in extremely long queues to come into the club. Most often than not, these folks can get in with V.I.P access with an "added" cover charge for the night - in case they would like to skip waiting in queues. The clubs create a demand for shorter waiting periods by &lt;span style="font-style: italic;"&gt;bottlenecking &lt;/span&gt;the normal queues and thus the "added" cover charge for access without wait is quite justified. Thus they capitalize on the demand that they themselves created..!&lt;br /&gt;&lt;br /&gt;Drinking at a club has never been cheap.  The United States does not have a concept of "maximum retail price" for a product, something I am all too familiar with; being from India. What this maximum retail does, is that it forces the seller of a product to sell stuff at a price not exceeding the maximum retail price(M.R.P). Therefore the sellers cannot charge exorbitant prices for products as they are restricted by the M.R.P. The clubs however, capitalize on the demand for drinks and charge exorbitant prices. The "common folk" inside have no option but to pay those prices. Thus we have a classic example of a monopoly, where the seller decides on the price and the buyer has no option but to pay up.&lt;br /&gt;&lt;br /&gt;When ever special events are organized in a club, the laws of supply and demand come to the fore front. People with "elite-access" are given access to the stage area and are allowed to do what ever they want to. The people with "V.I.P" access are the ones, that are given access to vantage points where it is more convenient to watch and enjoy the event. Now all this could have been easily avoided, had the stage been properly designed; thus making it easier for everyone to enjoy the event. The "common" access somehow always seems to be a lot more crowded than the other places. So much so, that some clubs charge an "addition fee" for granting access to the "V.I.P" section so that some of the "common lot" can enjoy the event. Eventually,it turns out that this charge is never really worth it. The club creates a demand for areas where one can actually get to see the event, and charge an "additional fee" for it.&lt;br /&gt;&lt;br /&gt;Putting all this in perspective, I have come to the conclusion that Clubbing is all about Supply and Demand. Clubs create a demand for shorter queues, monopolize on the drinks and rule who gets to do what. Thus the key to running a good club is to have a great "restricted elite" whose presence entices others to come to the club. Normally this is a couple of very hot girls and the social elite. You also need to know a couple of friends who know great Dj's; thus you have good music. Finally restrict, capitalize and monopolize all you want..! Also, make sure that a few lucky folk get to be treated as "V.I.P's" as they get more and more frequent in their visits. Make sure there is some incentive for hot girls, even though they may not belong to the "elite" or the "V.I.P's". Once all this is in place, with a few great events , some great advertising and some "happy hour" specials you have an awesome club which everyone wants to be a part of..!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7322524202280465623-2848441321858605931?l=rahulswackyworld.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rahulswackyworld.blogspot.com/feeds/2848441321858605931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7322524202280465623&amp;postID=2848441321858605931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/2848441321858605931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7322524202280465623/posts/default/2848441321858605931'/><link rel='alternate' type='text/html' href='http://rahulswackyworld.blogspot.com/2008/03/clubbing-and-laws-of-supply-and-demand.html' title='Clubbing and the Laws of Supply and Demand'/><author><name>Rahul</name><uri>http://www.blogger.com/profile/07066636293055040889</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp0.blogger.com/_5lvju4SHYt0/R911QJAlPhI/AAAAAAAABXQ/auTfmiChmDQ/S220/Rahul_Ravikumar.JPG'/></author><thr:total>0</thr:total></entry></feed>
