WSO2Con 2011: Building Cool Applications with WSO2 StratosLive - Selvaratnam Uthaiyashankar

Archived Content
This article is provided for historical perspective only, and may not reflect current conditions. Please refer to relevant product page for more up-to-date product information and resources.
  • By WSO2Con 2011
  • 15 Dec, 2011

Building a Web Application

One of the advantages of a PaaS, such as WSO2 StratosLive, is how quickly developers can get up and running, Shankar noted: "You have a full set of SOA products at your disposal. You can go and start developing within seconds. You can just go there, register a tenant for yourself, and then produce very complex, very cool applications."

The WSO2 Application Server corresponds with the WSO2 Identity Server to verify all of the authorization detail needed, Shankar, noted. "The Application Server will send a request to the Identity Server, and the Identity Server, since I have already provided my credentials, will not ask for my credentials again, it will just validate and send back the two tokens back to the Application Server."

Once this has gone into effect, the tenant is ready for loading. "We load the tenant based on the request," Shankar continued. The tenant is only active and loading when it needs to be, saving time and energy.

In order to create a dynamic Web application, users simply open an empty Web application under the WSO2 Carbon Studio and start building, Shankar explained; “So when you bundle it together, this Web application will actually be part of the Carbon application project.”

When the Web application is finished, it just needs to be hosted in the WSO2 Application Server by making a connection to the Web applications running on StratosLive. Once specific credentials are approved, users can successfully deploy applications.

"It's pretty simple to create a Web application and just upload it directly from the Carbon Studio to the application server,” Shankar remarked.

Securing the Web application

In order to secure Web applications, Shankar noted that users need to implement some security constraints for the particular parts that will be accessed by different people. An application must go through HTTPs to guarantee confidential transport of information, he noted. Shankar then connected the Web application to the User Store and User Manager functions provided by WSO2 StratosLIve to use it as secure, basic code.

"You have just put some simple entries into your Web XML, and the application is now secured and fully protected,” Shankar explained. “The URL has been changed to HTTPs, and you have been asked for the username and password. So it's pretty simple.”

Exposing Applications as SaaS

Although many developers prefer to maintain access to an application within a tenant, there are also cases where developers want to expose their applications to users from other tenants by delivering them as software-as-a-service (SaaS) solutions, Shankar said.

The process is fairly simple, Shankar noted. It just requires a few minor adjustments in the application code and then redeploying it again to convert an application into a fully multi-tenant software-as-a-service. However, once the new version of an application has been deployed as a SaaS solution, users must provide new credentials and activate it.

Developers should create a database to store and access application information, Shankar recommended; "You have to create databases within a single database instance, so basically we distinguish them by appending some information to the database user.” From there, developers can create a user group and select which privileges to allow.

Such application and database delivery is possible because WSO2 doesn’t simply focus on Web applications. Instead, Shankar explained, “StratosLive provides a whole SOA platform. It provides a lot of functionality, allowing users to perform functions from data to screen.”

To learn more about how to use WSO2 StratosLive for delivering cloud applications, and view examples of Web applications that work with Facebook and, view Shankar’s full presentation here.

About Author

  • WSO2Con 2011
  • Sri Lanka