<?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>Engwar &#187; cloud apps</title>
	<atom:link href="http://engwar.com/tags/cloud-apps/feed" rel="self" type="application/rss+xml" />
	<link>http://engwar.com</link>
	<description>Chintana Wilamuna&#039;s weblog</description>
	<lastBuildDate>Wed, 30 Nov 2011 13:28:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Java PaaS : Building multitenant applications</title>
		<link>http://engwar.com/post/617?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=java-paas-building-multitenant-applications</link>
		<comments>http://engwar.com/post/617#comments</comments>
		<pubDate>Tue, 13 Sep 2011 00:06:40 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloud apps]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[paas]]></category>
		<category><![CDATA[stratos]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=617</guid>
		<description><![CDATA[This shows you how to write multitenant applications. If you haven&#8217;t already, please read the following two posts before you read this. Those two sets the stage for the rest of this post. Java Paas : Building your first app &#8230; <a href="http://engwar.com/post/617">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This shows you how to write multitenant applications. If you haven&#8217;t already, please read the following two posts before you read this. Those two sets the stage for the rest of this post.</p>
<ol>
<li><a href="http://engwar.com/post/570">Java Paas : Building your first app</a></li>
<li><a href="http://engwar.com/post/578">Java PaaS : Handling authentication in your web apps</a></li>
</ol>
<p>Before proceeding further let me clarify some terms that we&#8217;ll be using . It has become a bit cloudy (no pun intended) since many people mean different things for the same word.</p>
<p>Multitenancy &#8211; In the context of Stratos, I&#8217;m using the word multitenancy to mean as <a href="http://en.wikipedia.org/wiki/Multitenancy">defined in Wikipedia</a>.</p>
<blockquote><p>Multitenancy refers to a principle in software architecture where a single instance of the software runs on a server, serving multiple client organizations (tenants).</p></blockquote>
<p>When you register and get an account in Stratos, that&#8217;s a tenant. An organization. Your data will be isolated from other tenants/organizations in the system. When you sign up, you&#8217;ll be creating the administrator account for your tenant. Which we naturally refer to as the tenant admin. Tenant admin can add users to your domain, turn off/on various Stratos services such as the ESB, App Server, Data Services Server etc&#8230; Monitor data and bandwidth usage of your users, grant/revoke permissions to users.</p>
<p>Let&#8217;s me take a little step back here. When you talk about Stratos, there are two major deployment scenarios. One that&#8217;s hosted by WSO2. That&#8217;s available to users as a service, you sign up, you get an account, your data is hosted on hardware that we manage. This version is called <a href="http://stratoslive.wso2.com">StratosLive</a>. Other scenario, you setup Stratos on your hardware in your private data center, you control everything it&#8217;s not accessible to anyone else.</p>
<p>2 scenarios. StratosLive vs Stratos on your private cloud.</p>
<p>Now, coming back to multitenancy, there&#8217;s one user we called the <em>super tenant</em>. This acts as an admin account for all the tenants in Stratos.  It&#8217;s configured at the time of setting up Stratos. In StratosLive scenario, super tenant is WSO2. In the other scenario, super tenant is you. You can do stuff which will affect to all the tenants across the system. Why would you need this? It&#8217;s necessary when you&#8217;re developing SaaS applications. You&#8217;re providing a service which all the tenants can use.</p>
<p>In Stratos, to make your applications SaaSify you need to add a context parameter to your deployment descriptor.</p>
<pre class="prettyprint ">
&lt;context-param&gt;
    &lt;param-name&gt;carbon.enable.saas&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
&lt;/context-param&gt;
</pre>
<p>Authentication mechanism will be the standard form based authentication that we configured in the <a href="http://engwar.com/post/570">Jwitter app we developed earlier</a>. This however, does not mean that this is the only thing that you need to build SaaS applications, nor does it allow you to take any existing web app out their and magically turn it to a multitenanted app. For that you need to have a <a href="http://msdn.microsoft.com/en-us/library/aa479086.aspx">multitenant data architecture for you application</a>.</p>
<p>When you add the context parameter and deploy the web application as the super tenant, Stratos will authenticate against any user account in the system that has sufficient permissions. When you call <code>request.getPrincipal().getName()</code>, user account will appear in the format foo@example.com. From this point on it&#8217;s upto you to move to the bits of your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/617/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloudapps</title>
		<link>http://engwar.com/post/345?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cloudapps</link>
		<comments>http://engwar.com/post/345#comments</comments>
		<pubDate>Mon, 31 May 2010 09:44:33 +0000</pubDate>
		<dc:creator>Chintana</dc:creator>
				<category><![CDATA[cloud apps]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://engwar.com/?p=345</guid>
		<description><![CDATA[When the cloud buzzword hit the intrawebs, one issue I kept thinking about turned out to be more interesting than I thought. Different type of applications have varying requirements when it comes to running inside a cloud. A virtualized environment &#8230; <a href="http://engwar.com/post/345">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When the cloud buzzword hit the intrawebs, one issue I kept thinking about turned out to be more interesting than I thought. Different type of applications have varying requirements when it comes to running inside a cloud. A virtualized environment to be more precise. A virtualized environment means it&#8217;s just another computer right? So, it&#8217;s just a VPS somewhere isn&#8217;t it? Yes but there&#8217;s more to the story.</p>
<p>&#8220;Cloud requirements&#8221; differ from person to person and for what they&#8217;ll be using the technology. And of course,  methods for reaching to the clouds are as diverse as the requirements (ahem).</p>
<ul>
<li>For a hosting company adopting cloud technologies means having an infrastructure that enable them to create virtual machines from a cluster of servers upon customer requests. Using Xen/KVM/OpenNebula etc&#8230; they can easily do this. Additionally what they need is a nice web based interface that they can integrate into their existing customer portals.</li>
<li>A web based application vendor, changes they need to make their applications to run in the cloud is minimal. Here, a differentiation should be made for single-tenanted vs. <a href="http://en.wikipedia.org/wiki/Multitenancy">multi-tenanted applications</a>. Popular multi-tenanted web applications include Google Apps and Salesforce.com. <a href="http://www.microsoft.com/windowsazure/sqlazure/">SQL Azure</a>, the popular database as a service platform runs on a multi-tenanted version of SQL Server.
</li>
<li>When it&#8217;s not a web based application things start to get interesting. <a href="http://pzf.fremantle.org/2010/05/cloud-native.html">Paul has written a wonderful post</a> explaining the requirements that need to fulfill in order to be called a &#8220;cloud native&#8221; application.</li>
</ul>
<p>As Paul mentions, being &#8220;on the cloud&#8221;, applications need to have features like autoscaling. Pay for what you use has a huge advantage of paying for resources depending on your daily resource needs. Several more aspects are listed on his post.</p>
]]></content:encoded>
			<wfw:commentRss>http://engwar.com/post/345/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

