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

<channel>
	<title>Bandos&#039; Arcade &#187; WSO2</title>
	<atom:link href="http://www.nuwanbando.com/tag/wso2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nuwanbando.com</link>
	<description>&#34;It&#039;s not about how it is, but how I see it &#34; - Stranger Than Fiction</description>
	<lastBuildDate>Mon, 30 Aug 2010 07:37:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Gadgets On the Cloud</title>
		<link>http://www.nuwanbando.com/2010/06/gadgets-on-the-cloud/</link>
		<comments>http://www.nuwanbando.com/2010/06/gadgets-on-the-cloud/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 06:11:10 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[PaaS]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[WSO2 Mashup Server]]></category>
		<category><![CDATA[WSO2 Stratos]]></category>
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=498</guid>
		<description><![CDATA[There is no doubt that JavaScript/XML gadgets make a great presentation layer over the web with increasing amount of data floating around. The ability of which these gadgets can be embedded in any place over the web, provides a great flexibility, and a wider reach. Google does this quite nicely with their iGoogle gadgets, enabling [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fgadgets-on-the-cloud%2F&title=Gadgets+On+the+Cloud&related=no" ><span style="display:none">There is no doubt that JavaScript/XML gadgets make a great presentation layer over the web with increasing amount of data floating around. The ability of which these gadgets can be embedded in any place over the web, provides a great flexibility, and a wider reach. Google does this quite nicely with their iGoogle gadgets, enabling [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fgadgets-on-the-cloud%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fgadgets-on-the-cloud%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>There is no doubt that <a href="http://code.google.com/apis/gadgets/docs/reference.html">JavaScript/XML gadgets</a> make a great presentation layer over the web with increasing amount of data floating around. The ability of which these gadgets can be embedded in any place over the web, provides a great flexibility, and a wider reach. Google does this quite nicely with their iGoogle gadgets, enabling the <a href="http://www.google.com/webmasters/gadgets/" target="_blank">gadgets to be embedded</a> in almost any web page. The success of this great idea, would be only logical if all the data, services and mashups are also available over the web with open access or maybe authenticated access. This is where a cloud story fits-in, and this the very reason why Google can do it quite easily.</p>
<p><a href="http://www.nuwanbando.com/wp-content/uploads/2010/06/stratos_logo_h42.gif"><img class="size-full  wp-image-508   alignnone" title="stratos_logo_h42" src="http://www.nuwanbando.com/wp-content/uploads/2010/06/stratos_logo_h42.gif" alt="" width="193" height="42" /></a><a href="http://www.nuwanbando.com/wp-content/uploads/2010/06/cloud-gadget.png"><img class="size-full wp-image-509 alignnone" title="cloud-gadget" src="http://www.nuwanbando.com/wp-content/uploads/2010/06/cloud-gadget.png" alt="" width="290" height="48" /></a></p>
<p>However, what if you want to do everything from the scratch and also provide a great presentation layer for the users. For an instance, lets say you have a lot of financial data within your enterprise, and you need to provide some of these to your customers, to general public and some for your employees. To do this, you will have to create appropriate data services, maybe mediate or transform some data, integrate with some legacy data sources, create some business work flows, mashup them with some 3rd party services like <a href="http://code.google.com/apis/finance/">Google finance</a> or <a href="http://code.google.com/apis/charttools/">charts</a> and finally expose the end results to the targeted user group. This is where <a href="http://wso2.com/cloud/stratos/">WSO2 Stratos PaaS</a> comes for your rescue <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If your requirements are such, you will need a strong middle-ware platform to full fill all the above tasks, and if its all on the cloud, you will not have to worry about anything other than writing your business logic. Once the business logic is correctly compiled, you can <a href="https://mashup.cloud.wso2.com/carbon/admin/login.jsp">Mashup</a> some of your data with external service APIs, and then write the presentation logic purely on javascript and xml as XML Gadgets and expose them to the users you need. Once the gadgets are published on <a href="https://gadget.cloud.wso2.com" target="_blank">WSO2 Cloud Gadget Server</a> its just a matter of linking them up in any web page you want over the web.<br />
<center><br />
<iframe src ="https://gadget.cloud.wso2.com/ifr?container=default&#038;mid=3&#038;nocache=1&#038;country=US&#038;lang=en&#038;view=default&#038;parent=https%3A%2F%2Fgadget.cloud.wso2.com%2F&#038;debug=1&#038;up_=undefined&#038;st=john.doe%3Ajohn.doe%3A10717%3Ashindig%3Ahttp%253A//gadget.cloud.wso2.com%253A80/registry/resource/_system/config/repository/gadget-server/gadgets/ngeo_vid.xml%3A0%3Adefault&#038;url=http%3A%2F%2Fgadget.cloud.wso2.com%3A80%2Fregistry%2Fresource%2F_system%2Fconfig%2Frepository%2Fgadget-server%2Fgadgets%2Fngeo_vid.xml#rpctoken=1304649864" style="width:400px; height:248px; padding: 10px;"></p>
<p>Your browser does not support iframes.</p>
<p></iframe><iframe src ="https://gadget.cloud.wso2.com/ifr?container=default&#038;mid=0&#038;nocache=1&#038;country=US&#038;lang=en&#038;view=default&#038;parent=https%3A%2F%2Fgadget.cloud.wso2.com%2F&#038;debug=1&#038;up_=undefined&#038;st=john.doe%3Ajohn.doe%3A10197%3Ashindig%3Ahttp%253A//gadget.cloud.wso2.com%253A80/registry/resource/_system/config/repository/gadget-server/gadgets/soa.xml%3A0%3Adefault&#038;url=http%3A%2F%2Fgadget.cloud.wso2.com%3A80%2Fregistry%2Fresource%2F_system%2Fconfig%2Frepository%2Fgadget-server%2Fgadgets%2Fsoa.xml#rpctoken=1304649864" style="width:400px; height:248px; padding: 10px; margin-left: 10px;"></p>
<p>Your browser does not support iframes.</p>
<p></iframe><br />
</center><br />
The above two gadgets are taken from WSO2 Cloud Gadget Server and have linked in to this blog, to convince about the great flexibility and reach it can add-up. You do not need to use the <a href="https://gadget.cloud.wso2.com/portal" target="_blank">Cloud Gadget Portal</a> as the only place for your data to be presented (Of cause if you are not using other gadget server specific privileges such as<a href="http://wso2.org/library/articles/2010/03/wso2-gadget-server-inter-gadget-communication-pubsub" target="_blank"> inter-gadget communication</a> etc). You can simply use the Gadget Server as your own gadget repository, and encourage users to discover the gadgets and embed them into their own web pages over the web.</p>
<p>To sum up the story I would say, try-out <a href="https://cloud.wso2.com" target="_blank">Stratos</a>, try out the available services and you will definitely find out more use cases, and creative ways to use the platform and leverage the advantages of the cloud</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2010/06/gadgets-on-the-cloud/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/06/gadgets-on-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSO2 Stratos &#8211; A true cloud story</title>
		<link>http://www.nuwanbando.com/2010/06/wso2-stratos-a-true-cloud-story/</link>
		<comments>http://www.nuwanbando.com/2010/06/wso2-stratos-a-true-cloud-story/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 08:37:15 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[PaaS]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Stratos]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=479</guid>
		<description><![CDATA[Stratos Services Yesterday (1st of June), A little over a 12 developer team at WSO2, took a great middle-ware platform in to the cloud. It&#8217;s not just putting all our server products on an EC2 instance, but embedding all cloud-native features into them. The PaaS (Platform as a Service) is named as WSO2 Stratos, which [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fwso2-stratos-a-true-cloud-story%2F&title=WSO2+Stratos+%26%238211%3B+A+true+cloud+story&related=no" ><span style="display:none">Stratos Services Yesterday (1st of June), A little over a 12 developer team at WSO2, took a great middle-ware platform in to the cloud. It&#8217;s not just putting all our server products on an EC2 instance, but embedding all cloud-native features into them. The PaaS (Platform as a Service) is named as WSO2 Stratos, which [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fwso2-stratos-a-true-cloud-story%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fwso2-stratos-a-true-cloud-story%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<div class="mceTemp">
<dl id="attachment_492" class="wp-caption alignleft" style="width: 306px;">
<dt class="wp-caption-dt"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/06/products1.png"><img class="size-full wp-image-492" title="products" src="http://www.nuwanbando.com/wp-content/uploads/2010/06/products1.png" alt="" width="296" height="354" /></a></dt>
<dd class="wp-caption-dd">Stratos  Services</dd>
</dl>
</div>
<p>Yesterday (1st of June), A little over a 12 developer team at WSO2, <a href="http://samisa-abeysinghe.blogspot.com/2010/06/six-weeks-and-12-people-magic.html">took a great middle-ware platform in to the cloud</a>. It&#8217;s not just putting all our server products on an EC2 instance, but embedding all <a href="http://pzf.fremantle.org/2010/05/cloud-native.html">cloud-native</a> features into them. The <a href="http://en.wikipedia.org/wiki/Platform_as_a_service">PaaS</a> (Platform as a Service) is named as WSO2 Stratos, which is based on award winning WSO2 Carbon middle-ware platform. As the Alpha-1 release, Stratos offers number of WSO2 products integrated, namely <a href="http://wso2.com/products/governance-registry">Governance Registry (GREG)</a>, <a href="http://wso2.com/products/identity-server">Identity Server (IS)</a>, <a href="http://wso2.com/products/business-activity-monitor">Business Activity Monitor (BAM)</a>, <a href="http://wso2.com/products/mashup-server">Mashup Server (MS)</a> and <a href="http://wso2.com/products/gadget-server">WSO2 Gadget Server (GS)</a>.</p>
<p>Stratos is also offered as a downloadable version for the private cloud within your enterprise. If you are quite serious about using SOA for your enterprise and do not need to worry about deployment, scalability and server maintenance, Stratos would be the ideal solution for you.</p>
<p><img class="alignnone" src="http://lh6.ggpht.com/_Ni8BgaCmQow/TAUt8ch38JI/AAAAAAAAAUg/C1TTIWkAvco/%5BUNSET%5D.png?imgmax=800" alt="" width="193" height="42" /></p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2010/06/wso2-stratos-a-true-cloud-story/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/06/wso2-stratos-a-true-cloud-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Scraping &amp; Parsing HTML to XML in Javascript</title>
		<link>http://www.nuwanbando.com/2010/04/web-scraping-parsing-html-to-xml-in-javascript/</link>
		<comments>http://www.nuwanbando.com/2010/04/web-scraping-parsing-html-to-xml-in-javascript/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 19:55:50 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Google gadgets]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[WSO2 Mashup Server]]></category>
		<category><![CDATA[Mashup]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=412</guid>
		<description><![CDATA[Today I was working on a customer POC and happened to create few Google gadgets to visualize selected data sets from *.gov.uk sites. The scenario which is implemented was, mixed with inter-gadget communication and content search over data.gov.uk sites. I created three simple gadgets which communicates with each other, and one acted as the controlling [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fweb-scraping-parsing-html-to-xml-in-javascript%2F&title=Web+Scraping+%26%23038%3B+Parsing+HTML+to+XML+in+Javascript&related=no" ><span style="display:none">Today I was working on a customer POC and happened to create few Google gadgets to visualize selected data sets from *.gov.uk sites. The scenario which is implemented was, mixed with inter-gadget communication and content search over data.gov.uk sites. I created three simple gadgets which communicates with each other, and one acted as the controlling [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fweb-scraping-parsing-html-to-xml-in-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fweb-scraping-parsing-html-to-xml-in-javascript%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Today I was working on a customer POC and happened to create few <a href="http://code.google.com/apis/gadgets/">Google gadgets</a> to visualize selected data sets from *.gov.uk sites. The scenario which is implemented was, mixed with inter-gadget communication and content search over data.gov.uk sites. I created three simple gadgets which communicates with each other, and one acted as the controlling gadget which pushed the search parameters to other two gadgets. The two content gadgets showed UK (1) primary school information and (2) electoral information. The pushed parameter was the postal code of different parts of UK. The <a href="http://www.direct.gov.uk/en/index.htm" target="_blank">direct.gov.uk</a> has a form based implementation of this.</p>
<p><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/Screenshot.png"><img class="size-medium wp-image-413 alignleft" title="Screenshot" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/Screenshot-241x300.png" alt="" width="241" height="300" /></a></p>
<p>The Requirements for the POC was, simple and we already had working samples of <a href="http://wso2.org/library/articles/2010/03/wso2-gadget-server-inter-gadget-communication-pubsub" target="_blank">such a scenario</a> at WSO2 library.</p>
<ol>
<li>Show how one gadget can pass the context to other gadgets</li>
<li>How gadgets can harvest data in various formats (in my previous post I explained on how to get data from RDF endpoints, which are also available in *.gov.uk sites)</li>
</ol>
<p>The building blocks for the implementation was the search url, which was quite straight forward. for all the requests based on postal codes the direct.gov site served in the same manner (because of this important fact, the automation process became trivial). for an instance the url for primary school information retrial was,</p>
<p><a href="http://local.direct.gov.uk/LDGRedirect/LocationSearch.do?LGSL=13&amp;searchtype=1&amp;LGIL=8&amp;Style=&amp;formsub=t&amp;text=SE1+7DU" target="_blank">http://local.direct.gov.uk/LDGRedirect/LocationSearch.do?LGSL=13&amp;searchtype=1&amp;LGIL=8&amp;Style=&amp;formsub=t&amp;text=<strong>SE1+7DU</strong></a></p>
<p>Where the param &#8220;text&#8221; changed according to the postal code. So far everything seemed straight forward, however at implementation, while using <a href="http://code.google.com/apis/gadgets/docs/dev_guide.html">Gadgets API</a> for content retrial, I faced problems in parsing text with javascript. Hence the <a href="http://code.google.com/apis/opensocial/docs/0.7/reference/gadgets.io.html#makeRequest" target="_blank">gadgets.io.makeRequest </a>supported HTML as text and the API method returned the retrieved HTML document as string making it quite impossible to process.</p>
<p>With some thinking and advise, I brought the <a href="http://wso2.com/products/mashup-server/">Mashup Server</a> in to the picture and used it to retrieve the data from the gov site and returned the result in XML format. Using the Mashup Server web scraping seems to be a piece of cake, We created a simple mashup using the scraper host-object and captured the result set in the search result page. The mashup code as follows,</p>
<pre class="js" name="code">
function search(searchUrl) {
	var scraper = new Scraper(
		<config>
		    <var-def name="url">{searchUrl}</var-def>
			<var-def name="response">
			    <xpath expression="//div[@id='bodyContent']//ul[@class='resultsList']/li/a">
				<html-to-xml>
				   <http method='get' url='${url}'/>
				</html-to-xml>
			     </xpath>
			</var-def>
		</config>
	);
	return new XMLList(scraper.response);
}
</pre>
<p>And finally the two gadgets were making service calls to the mashup service and retrieved the data as an XML object, making the data processing painless. The final version at the Gadget Server looked quite appealing.</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 829px"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/gs.png"><img class="size-large wp-image-427 " title="gs" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/gs-1024x509.png" alt="WSO2 Gadget Server with UK gov data" width="819" height="407" /></a><p class="wp-caption-text">Gadget Server look - in the end</p></div>
<p>Special thanks goes to <a href="http://ruchirawageesha.blogspot.com/">Ruchira</a> for helping me out with the mashup service <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You can <a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/wso2gs-samples.zip">download</a> the Gadget code and the Mashup service and try the scenario yourself.</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2010/04/web-scraping-parsing-html-to-xml-in-javascript/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/04/web-scraping-parsing-html-to-xml-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mashing up RDF data with WSO2 Mashup Server</title>
		<link>http://www.nuwanbando.com/2010/04/mashing-up-rdf-data-with-wso2-mashup-server/</link>
		<comments>http://www.nuwanbando.com/2010/04/mashing-up-rdf-data-with-wso2-mashup-server/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 20:27:21 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[SPARQL]]></category>
		<category><![CDATA[Semantic web]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[Mashup]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[WSO2 Mashup Server]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=341</guid>
		<description><![CDATA[Okey so this is the fun part that I promised to write about . I managed to cook up a use-case to demonstrate RDF querying and making use of the semantic data. The data that I am using for querying, is the rdf data sources available in the UK data.gov site. With some analysis I [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fmashing-up-rdf-data-with-wso2-mashup-server%2F&title=Mashing+up+RDF+data+with+WSO2+Mashup+Server&related=no" ><span style="display:none">Okey so this is the fun part that I promised to write about . I managed to cook up a use-case to demonstrate RDF querying and making use of the semantic data. The data that I am using for querying, is the rdf data sources available in the UK data.gov site. With some analysis I [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fmashing-up-rdf-data-with-wso2-mashup-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fmashing-up-rdf-data-with-wso2-mashup-server%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Okey so this is the fun part that I promised to write about <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . I managed to cook up a use-case to demonstrate RDF querying and making use of the semantic data. The data that I am using for querying, is the rdf data sources available in the UK data.gov site. With some analysis I figured out that this task can be fundamentally archived using the combination of Mashup and Gadget Technologies. My choice of tools were <a href="http://wso2.com/products/mashup-server/">WSO2 Mashup Server</a> and <a href="http://wso2.com/products/gadget-server/">WSO2 Gadget Server</a> for their great flexibility and of cause for other obvious reasons <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . However the Mashup Server does not natively support RDF data retrieval, hence I had to do some work to get such functionality integrated. The great fact about the mashup server is its extensibility, the <a href="http://en.wikipedia.org/wiki/WSO2_Mashup_Server">concept of host objects</a> and the ability to write custom host objects and its pluggable nature comes handy in such cases. The high level architecture of what I am trying to achieve is as follows.</p>
<div id="attachment_348" class="wp-caption aligncenter" style="width: 850px"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/rdf.png"><img class="size-full wp-image-348" style="background-color: #ffffff;" title="rdf" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/rdf.png" alt="" width="840" height="262" /></a><p class="wp-caption-text">RDF data retrival with WSO2 Mashup server / WSO2 Gadget Server</p></div>
<p style="text-align: left;">To implement the above architecture with the tools at hand I created a <a href="http://wso2.org/library/tutorials/writing-custom-hostobjectttp://" target="_blank">custom host object</a> that can be plugged to the Mashup Server. When dealing with semantic web related tasks and RDF data handling HP&#8217;s <a href="http://jena.sourceforge.net/" target="_blank">Jena</a> java library comes in handy. With the use of <a href="http://openjena.org/ARQ/">Jena-ARQ</a> (for <a href="http://en.wikipedia.org/wiki/SPARQL" target="_blank">SPARQL</a>) api I managed to get the host object working with few lines of code.</p>
<p style="text-align: left;">
<pre name="code" class="java">.....
            Dataset dataSet = DatasetFactory.create(sparqlObject.rdfDataSource);
            // Create a new query form a given user query
            String queryString = sparqlObject.spaqrlQuery;
            Query query = QueryFactory.create(queryString);
            QueryExecution qe = QueryExecutionFactory.create(query, dataSet);
            ResultSet results = qe.execSelect();
.....
           resultString = ResultSetFormatter.asXMLString(results);
..... OR.....
           ByteArrayOutputStream bos = new ByteArrayOutputStream();
           ResultSetFormatter.outputAsJSON(bos, results);
</pre>
<p style="text-align: left;">With the host object in place, the next task was to create a Mashup in-order to query the rdf data with a given source (EndPoint or data source). The javascript service (Mashup) is created to serve this purpose, where the consumer can specify the RDF endpoint or the data source with the SPARQL query and retrieve the dataset in XML or JSON.</p>
<pre name="code" class="js">.....
function RdfDocQueryService(rdfDataSource, rdfQuery, resultType) {
   var sparqlObj = new SparqlHostObject();
   sparqlObj.rdfDataSource = rdfDataSource;
   sparqlObj.spaqrlQuery = rdfQuery;
   sparqlObj.resultType = resultType;
   return new XML(sparqlObj.getDataFromRdfSource());
}
</pre>
<p>Finally to bind everything together, lets try querying some data. My example usecase is to use the query at <a href="http://blogs.talis.com/n2/archives/836" target="_blank">N2 blog</a> to retrieve traffic monitoring points in UK roads. The query to retrieve the data set as follows,</p>
<pre name="code" class="sql">#List the uri, latitude and longitude for road traffic monitoring points on the M5
PREFIX road:
PREFIX rdf:
PREFIX geo:
PREFIX wgs84:
PREFIX xsd:
SELECT ?point ?lat ?long WHERE {
  ?x a road:Road.
  ?x road:number "A4"^^xsd:NCName.
  ?x geo:point ?point.
  ?point wgs84:lat ?lat.
  ?point wgs84:long ?long.
}
</pre>
<p>To visualize these points I have created a gadget with the aid of Google Maps api. This gadget can be hosted in the Gadget Server, where it can dynamically retrieve traffic monitoring points for each road in the UK and display them in the map as follows.</p>
<p style="text-align: center;">
<div id="attachment_362" class="wp-caption aligncenter" style="width: 841px"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/WSO2-Gadget-Server_1271189245784.png"><img class="size-full wp-image-362" title="WSO2 Gadget Server_1271189245784" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/WSO2-Gadget-Server_1271189245784.png" alt="" width="831" height="414" /></a><p class="wp-caption-text">Traffic points in A4 road, UK</p></div>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2010/04/mashing-up-rdf-data-with-wso2-mashup-server/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/04/mashing-up-rdf-data-with-wso2-mashup-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WSO2 Gadget Server 1.1.0, What to expect</title>
		<link>http://www.nuwanbando.com/2010/03/wso2-gadget-server-1-1-0-what-to-expect/</link>
		<comments>http://www.nuwanbando.com/2010/03/wso2-gadget-server-1-1-0-what-to-expect/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 18:38:32 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Shindig]]></category>
		<category><![CDATA[WSO2 Carbon]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=310</guid>
		<description><![CDATA[WSO2 Carbon 3.0.0 &#8211; code name &#8220;Iridium&#8221; is just about to release in few more days. as of WSO2&#8242;s release strategy, all the products will graduate with their next version on top of carbon based platform. As for the newly released Gadget Server it would be version 1.1.0 Features were frozen for version 1.1.0 and [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F03%2Fwso2-gadget-server-1-1-0-what-to-expect%2F&title=WSO2+Gadget+Server+1.1.0%2C+What+to+expect&related=no" ><span style="display:none">WSO2 Carbon 3.0.0 &#8211; code name &#8220;Iridium&#8221; is just about to release in few more days. as of WSO2&#8242;s release strategy, all the products will graduate with their next version on top of carbon based platform. As for the newly released Gadget Server it would be version 1.1.0 Features were frozen for version 1.1.0 and [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F03%2Fwso2-gadget-server-1-1-0-what-to-expect%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F03%2Fwso2-gadget-server-1-1-0-what-to-expect%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignnone" title="carbon" src="http://wso2.com/wp-content/themes/wso2ng-v2/images/logos/carbon_logo_h42.gif" alt="" width="197" height="42" /> <img class="alignnone" title="GS" src="http://wso2.com/wp-content/themes/wso2ng-v2/images/logos/gs_logo_h42.gif" alt="" width="268" height="42" /></p>
<p><a href="http://wso2.com/products/carbon/" target="_blank">WSO2 Carbon</a> 3.0.0 &#8211; code name &#8220;Iridium&#8221; is just about to release in few more days. as of WSO2&#8242;s release strategy, all the products will graduate with their next version on top of carbon based platform. As for the newly released <a href="http://wso2.org/downloads/gadget-server" target="_blank">Gadget Server</a> it would be version 1.1.0</p>
<p>Features were frozen for version 1.1.0 and that was in the end of February as I recall. We (the GS team) managed to squeeze in few new very important features to this release.</p>
<ul>
<li><strong>Upgraded shindig to the latest version</strong></li>
</ul>
<p>This was a bummer, since WSO2 Carbon platform is running on OSGi, if you had to use a non native OSGi project (i.e. Shindig) you will have to create an OSGi aware <a href="https://svn.wso2.org/repos/wso2/trunk/carbon/orbit/shindig/pom.xml" target="_blank">carbon orbit bundle</a> and make use of it at run time. This was done some time back where shindig was on <em>r734876</em> revision. In-order to leverage new functionalities such as OAuth, Pub-Sub etc. and to patch the bug fixes we thought of updating the shindig carbon orbit bundle. So now shindig is on <em>r910768</em> and is quite up to date.</p>
<ul>
<li><strong>i18n internationalization support for gadgets</strong></li>
</ul>
<p>i18n is not a big deal for Google gadgets since the <a href="http://code.google.com/apis/gadgets/docs/i18n.html" target="_blank">gadget API itself supports it</a>, What we had to do is enable i18n support in shindig. (Which was already implemented by the shindig community)</p>
<ul>
<li><strong>Inter Gadget communication</strong></li>
</ul>
<p>Inter gadget communication, seemed to be the hot topic in our forums and webinars, all most in all tech talks we did about the Gadget Server, some person in the audience raised the question about gadget-to-gadget communication. Our answer was &#8220;it can be done at shindig level, and we are yet to support it&#8221;. So without a long await, with GS v1.1.0 we enabled this feature. The architecture is quite fascinating where there will be zero backend calls and all the communication is done simply on the front-end. Basically each publisher will have a publishing channel and the subscribers can subscribe to this channel. After that its simple pub-sub.</p>
<ul>
<li><strong>The portal will completely run on HTTP transport</strong></li>
</ul>
<p>This was a limitation we had in our fist release. The portal was running only on HTTPS, and the reason behind was that all WSO2 products are running on secure transport and the Gadget Server is also a combination of some specific components which ran on the same platform. For this release we went the extra mile and enabled HTTP for the portal. So once you go to the login page it will switch to the secure transport (HTTPS) and after successful login you will redirect back to the HTTP non-secure mode. (Of cause you can disable HTTP any time and run the portal purely on HTTPS, it all depends on the requirement.)</p>
<p>One disappointment I have is that we couldn&#8217;t integrate OAuth on time. even though it is supported at shindig level we have to do a considerable amount of work from the Gadget Server side to fully support it, hence it is postponed to our next release. You can try the sample <a href="http://dirk.balfanz.googlepages.com/contacts.xml" target="_blank">OAuth GData Gadget</a>, simply adding it by the URL, and that will work like a charm. (nothing useful but just to let you know that we are only few steps behind on it)</p>
<p>Okey so enough sneak peak <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  <a href="http://builder.wso2.org/~carbon/releases/carbon/3.0.0/2PreBeta13/wso2gs-1.1.0.zip" target="_blank">download</a> the Gadget Server pre-beta, play with it, and help us to improve (even in the last minute) by <a href="https://wso2.org/jira/browse/GS">reporting any issues</a>.</p>
<p>Cheers !!</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2010/03/wso2-gadget-server-1-1-0-what-to-expect/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/03/wso2-gadget-server-1-1-0-what-to-expect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Time for family and friends, Time to party and time to relax :D</title>
		<link>http://www.nuwanbando.com/2009/12/time-for-family-and-friends-time-to-party-and-time-to-relax-d/</link>
		<comments>http://www.nuwanbando.com/2009/12/time-for-family-and-friends-time-to-party-and-time-to-relax-d/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 12:31:09 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[Holidays]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=270</guid>
		<description><![CDATA[Today I got holidays. yeah I know some of you might be wondering whether am still schooling (Yeah I got the same feeling first lol) !!! !@#$%^&#38; But yeah we got a super awesome two whole weeks to have some fun, go some where, anywhere out from checking mail, and doing the stuff we do [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F12%2Ftime-for-family-and-friends-time-to-party-and-time-to-relax-d%2F&title=Time+for+family+and+friends%2C+Time+to+party+and+time+to+relax+%3AD&related=no" ><span style="display:none">Today I got holidays. yeah I know some of you might be wondering whether am still schooling (Yeah I got the same feeling first lol) !!! !@#$%^&amp; But yeah we got a super awesome two whole weeks to have some fun, go some where, anywhere out from checking mail, and doing the stuff we do [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F12%2Ftime-for-family-and-friends-time-to-party-and-time-to-relax-d%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F12%2Ftime-for-family-and-friends-time-to-party-and-time-to-relax-d%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Today I got holidays. <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  yeah I know some of you might be wondering whether am still schooling (Yeah I got the same feeling first lol) !!! !@#$%^&amp; But yeah we got a super awesome two whole weeks to have some fun, go some where, anywhere out from checking mail, and doing the stuff we do day to day. Had the <a href="http://picasaweb.google.com/bandara.nuwan/WSO2YearEndParty">last-office-day party</a> at <a href="http://www.colombotown.com/business_directory_listing.php?id=114">flag and whistle</a> dressed up like pirates, doing some crazy games and enjoying nice food. <a href="http://sanjiva.weerawarana.org/">Dr. Sanjiva</a> gave an inspiring speech, talked about <a href="http://pzf.fremantle.org/2009/12/looking-back-on-2009.html">what we achived as a team</a> at WSO2 in 2009 and what we should do in the coming year.</p>
<p>I am still 5 months old at <a href="http://wso2.com">WSO2 </a>and all these things inspires me, the friendly open culture (with a very Geeky backdrop), the challenging work, friendly people with an amazing passion and team work. All those make me think how great it is to be apart of it all. So now its holidays for us, till Jan 4th we take a break from work and enjoy with everything else but work. My plan is to sleep about two days, Going on a trip to North (Yeah north since there NO WAR any more) for like 3 ~ 4 days, visit some old friends and la..di..da..di..da&#8230; <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So yeah until then HAPPY HOLIDAYS</p>
<p><img class="aligncenter" src="http://www.lionking.org/~kimya/drawings/Link_Minish_Ezlo_Happy_Holidays.jpg" alt="" width="325" height="265" style="margin-left: 110px;" /></p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2009/12/time-for-family-and-friends-time-to-party-and-time-to-relax-d/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2009/12/time-for-family-and-friends-time-to-party-and-time-to-relax-d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The SOA Workshop day</title>
		<link>http://www.nuwanbando.com/2009/09/the-soa-workshop-day/</link>
		<comments>http://www.nuwanbando.com/2009/09/the-soa-workshop-day/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:59:48 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=217</guid>
		<description><![CDATA[Today was &#8220;THE Workshop Day&#8221; for WSO2 folks, an event organized by WSO2 with an intention to make an awareness of SOA building blocks. I was (proudly ) among the audience as a WSO2 crew member, listening to all the tech talks of my collogues. It was a great session we had today, starting from [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F09%2Fthe-soa-workshop-day%2F&title=The+SOA+Workshop+day&related=no" ><span style="display:none">Today was &#8220;THE Workshop Day&#8221; for WSO2 folks, an event organized by WSO2 with an intention to make an awareness of SOA building blocks. I was (proudly ) among the audience as a WSO2 crew member, listening to all the tech talks of my collogues. It was a great session we had today, starting from [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F09%2Fthe-soa-workshop-day%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F09%2Fthe-soa-workshop-day%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Today was &#8220;THE Workshop Day&#8221; for WSO2 folks, an event organized by <a href="http://wso2.com/">WSO2</a> with an intention to make an awareness of SOA building blocks. I was (proudly <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) among the audience as a WSO2 crew member, listening to all the tech talks of my collogues. It was a great session we had today, starting from <a href="http://pzf.fremantle.org/">Paul&#8217;s</a> introduction to SOA  and until <a href="http://www.asankama.com/">Asanka&#8217;s</a> talk about enterprise SOA pattern&#8217;s. The whole set of talks took me back in time where I was reading about SOA concepts for my bachelor&#8217;s thesis. If I had experienced this workshop then, life would have been much easier <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .</p>
<p>Guys,.. cheers !! for a job well done <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><center><img class="aligncenter size-medium wp-image-218" title="com-workshop-banner" src="http://www.nuwanbando.com/wp-content/uploads/2009/09/com-workshop-banner-300x126.jpg" alt="com-workshop-banner" width="300" height="126" /></center></p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2009/09/the-soa-workshop-day/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2009/09/the-soa-workshop-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SL vs NZ T20 &#124; My 1st time among international cricket audience</title>
		<link>http://www.nuwanbando.com/2009/09/sl-vs-nz-t20-my-1st-time-among-international-cricket-audience/</link>
		<comments>http://www.nuwanbando.com/2009/09/sl-vs-nz-t20-my-1st-time-among-international-cricket-audience/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 05:42:50 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[Cricket]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=188</guid>
		<description><![CDATA[Its like this, I am not a huge cricket fan, the matches make me bored along the game. One guy balls, another guy slowly hits and 8 people try to send him to bench (but should mention, when the batsmen hits hard or when others send him to bench its always fun ). Being in [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F09%2Fsl-vs-nz-t20-my-1st-time-among-international-cricket-audience%2F&title=SL+vs+NZ+T20+%7C+My+1st+time+among+international+cricket+audience&related=no" ><span style="display:none">Its like this, I am not a huge cricket fan, the matches make me bored along the game. One guy balls, another guy slowly hits and 8 people try to send him to bench (but should mention, when the batsmen hits hard or when others send him to bench its always fun ). Being in [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F09%2Fsl-vs-nz-t20-my-1st-time-among-international-cricket-audience%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F09%2Fsl-vs-nz-t20-my-1st-time-among-international-cricket-audience%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Its like this, I am not a huge cricket fan, the matches make me bored along the game. One guy balls, another guy slowly hits and 8 people try to send him to bench (but should mention, when the batsmen hits hard or when others send him to bench its always fun <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ). Being in Sri Lanka one thing you inherit is the cricket fever, from your grand dad to siblings, they all watch (or maybe play) cricket. The Wills world cup (1996), I just rem from here and there, (I was in grade 5 <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  good times) is one nice memory I have, Sri Lanka winning the big cup and we all were staring at the TV with great joy.</p>
<p>Anyways with all that background story, yesterday I happened to be there at R. Premadasa international cricket stadium to watch the Sri Lanka vs New Zealand T20 match. Folks at work made plans to watch the match for weeks and finally 12 turned up. (This time the numbers were low coz there was a rumor that SL lost the SL vs Pakistan match coz they were there that day) however I took a ticket (Dumindu Threatened me to buy <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) and was there few minutes before the game started.</p>
<p><img src="http://static.cricinfo.com/db/PICTURES/CMS/107700/107764.jpg" alt="Dilshan on fire :D" width="300" height="235" /> <img class="alignnone" src="http://static.cricinfo.com/db/PICTURES/CMS/107700/107751.jpg" alt="" width="300" height="303" /></p>
<p>New Zealand batted 1st  and the game became fun, with all the cheering, shouting and screaming. The foreigners were good they played 141 for 8 wickets and it was the time for the home players. I was amused, I was not bored in fact I enjoyed it so much and was waiting till our innings start.</p>
<p><img title="Image174" src="http://www.nuwanbando.com/wp-content/uploads/2009/09/Image174-300x225.jpg" alt="WSO2 Cricket fans" width="300" height="225" /> <img class="alignnone" title="Image174" src="http://www.nuwanbando.com/wp-content/uploads/2009/09/Image168-300x225.jpg" alt="WSO2 Cricket fans" width="300" height="225" /></p>
<p>The SL inning started after about half an hour with some drops of rain, but it was all good. The fans were shouting.. &#8220;Go SRI LANKA&#8221;, &#8220;Common SANGA / SANA / DILSHAN&#8221; and I was among them too. The 1st half of the innings was great, Dilshan played well with a 50 in 23 balls lifting the SL run rate. My hopes were for Jayasuriya coz he was my hero since 96, but he was out with 1 run and it was disappointing. With Sri Lanka&#8217;s 3rd wicket (Sangakara) the batsmen kept falling. and there was no one to carry on Dilshan&#8217;s run rate. but until the last over we had the chance to win, it was 9 runs with 7 balls, then 8 with 5 and finally 3 with 1. So we lost. <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I saw the faces of people around me, all their happy faces are turned dark, and it was sad indeed. But well for me I was happy, (Not for we lost) I enjoyed the match, the time I spent, even the defeat, we gave a good fight. So yeah it was one great experience for a newbie cricket fan.</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2009/09/sl-vs-nz-t20-my-1st-time-among-international-cricket-audience/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2009/09/sl-vs-nz-t20-my-1st-time-among-international-cricket-audience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing custom queries to retrieve data from WSO2 Governance Registry</title>
		<link>http://www.nuwanbando.com/2009/08/custom-queries-to-retrieve-data-from-wso2-governance-registry/</link>
		<comments>http://www.nuwanbando.com/2009/08/custom-queries-to-retrieve-data-from-wso2-governance-registry/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 11:58:55 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[G-reg]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=176</guid>
		<description><![CDATA[WSO2 Governance Registry is a big part of wso2 governance product stack. Even though it is primarily aimed at managing, versioning, rating, and commenting on SOA artifacts it can also be used as a simple data store. with the 3.0 version the G-Reg gave support to custom query execution from the client side. This feature [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F08%2Fcustom-queries-to-retrieve-data-from-wso2-governance-registry%2F&title=Writing+custom+queries+to+retrieve+data+from+WSO2+Governance+Registry&related=no" ><span style="display:none">WSO2 Governance Registry is a big part of wso2 governance product stack. Even though it is primarily aimed at managing, versioning, rating, and commenting on SOA artifacts it can also be used as a simple data store. with the 3.0 version the G-Reg gave support to custom query execution from the client side. This feature [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F08%2Fcustom-queries-to-retrieve-data-from-wso2-governance-registry%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F08%2Fcustom-queries-to-retrieve-data-from-wso2-governance-registry%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://wso2.org/projects/governance-registry">WSO2 Governance Registry</a> is a big part of wso2 governance product stack. Even though it is primarily aimed at managing, versioning, rating, and commenting on SOA artifacts it can also be used as a simple data store. with the 3.0 version the G-Reg gave support to custom query execution from the client side. This feature helps immensely when you use the registry for non-standard tasks. For me I had to do some pagination work for the comments that belongs to a particular resource, hence my approach was to write few custom quires to get the job done. The code is as follows.</p>
<pre name="code" class="java">
	/**
	 * Returns a chunk of comments
	 *
	 * @param resPath	Path to the comment
	 * @param start		The beginning index
	 * @param size		Size of the chunk
	 * @return			an array of comments
	 */
 public Comment[] getCommentSet(String resPath, int start, int size) {
		Registry registry = null;
		try {
			registry = ; // get an instance of the registry 

			Resource comQuery = registry.newResource();

                        // The Sql Statement
			String sql = "SELECT REG_COMMENT_ID FROM REG_RESOURCE_COMMENT RC, REG_RESOURCE R, REG_PATH P WHERE "
					+ "RC.REG_VERSION=R.REG_VERSION AND "
					+ "R.REG_NAME=? AND "
					+ "P.REG_PATH_VALUE=? AND "
					+ "P.REG_PATH_ID=R.REG_PATH_ID LIMIT ?, ?";

			// Set SQL statement as the resource content
                        comQuery.setContent(sql);

                       // Setting the media type and properties
			comQuery.setMediaType(RegistryConstants.SQL_QUERY_MEDIA_TYPE);
			comQuery.addProperty(RegistryConstants.RESULT_TYPE_PROPERTY_NAME, RegistryConstants.COMMENTS_RESULT_TYPE);

			registry.put("system/myQueries/query", comQuery);
                 String resourceName = "testResource";
                 String pathToResource = "/system/myResources"

			Map<String, String> params = new HashMap<String, String>();

                        //Setting the parameters
			params.put("1", resourceName);
			params.put("2", pathToResource);
			params.put("3", start);
			params.put("4", size);

                       // Executing the SQL statement
			Collection qResults = registry.executeQuery("system/myQueries/query", params);

			String[] qPaths = (String[]) qResults.getContent();

			Comment[] comments = new Comment[qPaths.length];
                        // Loading the comment data to comment object array
			for (int i = 0; i < qPaths.length; i++) {
				if (registry.resourceExists(qPaths[i])) {
					comments[i] = (Comment) registry.get(qPaths[i]);
				}
			}

			return comments;

		} catch (Exception e) {
			String errorMsg = "Backend server error - could not get comment set";
			log.error(new MyTestException(errorMsg, e));
			return null;
		}

	}
</pre>
<p>Yeah simple as that you get your resources set without much effort. A big thank goes to <a href="http://www.dimuthu.org/">Dimuthu</a></p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2009/08/custom-queries-to-retrieve-data-from-wso2-governance-registry/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2009/08/custom-queries-to-retrieve-data-from-wso2-governance-registry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best of SOA Summer School</title>
		<link>http://www.nuwanbando.com/2009/08/best-of-soa-summer-school/</link>
		<comments>http://www.nuwanbando.com/2009/08/best-of-soa-summer-school/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 16:07:09 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=160</guid>
		<description><![CDATA[During this entire summer, WSO2 conducted a series of trainings on SOA best practices, How-Tos and trends, titled &#8220;SOA Summer School&#8220;. With the dawn of the autumn the series of online summer classes came to an end. With the popular demand, a 3 hour session is going to be held tomorrow the 13th August summarizing [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F08%2Fbest-of-soa-summer-school%2F&title=Best+of+SOA+Summer+School&related=no" ><span style="display:none">During this entire summer, WSO2 conducted a series of trainings on SOA best practices, How-Tos and trends, titled &#8220;SOA Summer School&#8220;. With the dawn of the autumn the series of online summer classes came to an end. With the popular demand, a 3 hour session is going to be held tomorrow the 13th August summarizing [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F08%2Fbest-of-soa-summer-school%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2009%2F08%2Fbest-of-soa-summer-school%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>During this entire summer, <a href="http://www.wso2.com" target="_blank">WSO2</a> conducted a series of trainings on SOA best practices, How-Tos and trends, titled &#8220;<a href="http://wso2.org/training/best_soa_summer_school_encore_session" target="_blank">SOA Summer School</a>&#8220;. With the dawn of the autumn the series of online summer classes came to an end. With the popular demand, a 3 hour session is going to be held tomorrow the 13th August summarizing the 8 weeks of lessons and highlighting their key areas.<br/><br />
<img class="aligncenter" title="summer sschool" src="http://wso2.org/files/ot_ss_banner.jpg" alt="" width="608" height="219" /><br/><br />
<img class="size-full wp-image-161 aligncenter" title="Untitled" src="http://www.nuwanbando.com/wp-content/uploads/2009/08/Untitled.png" alt="Untitled" width="640" height="400" /><br/><br />
for a better insight I have attached tomorrow&#8217;s agenda, and it is conducted by <a href="http://samisa-abeysinghe.blogspot.com/">Samisa Abeysinghe</a>, <a href="http://blog.ruwan.org/">Ruwan Linton</a>, <a href="http://psiriwardena.blogspot.com/">Prabath Siriwardena</a>, <a href="http://www.keith-chapman.org/">Keith Chapman</a> and <a href="http://nandikaj.blogspot.com/">Nandika Jayawardena</a>. The online trainings are totally free and any one who is interested in SOA and EA can gain a good knowledge of its dynamics.</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2009/08/best-of-soa-summer-school/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2009/08/best-of-soa-summer-school/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
