building multi-tenant saas applications using wso2 private paas

27
Building Multi-tenant SaaS Apps using WSO2 Private PaaS Sameera Jayasoma Software Architect WSO2

Upload: sameera-jayasoma

Post on 18-Nov-2014

344 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Building Multi-tenant SaaS Apps using WSO2 Private PaaS

Sameera Jayasoma

Software ArchitectWSO2

Page 2: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

SurveyDonkey

> Hello WSO2, We are building a Survey application and looking for a platform to deploy it. Let me give you more details of our Survey application.

Page 3: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Survey Application

• Enables customers design the survey, publish the survey and collect results.

• Upon subscribing, customers will get their own space in the application where they will personalize the look and feel.

• Customers will have different levels of access to the features of this application, depending on the package they select during subscription.

• Administration and configuration task are “self-service” and performed by the customer.

http://msdn.microsoft.com/en-us/library/hh534482.aspx

Page 4: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> We got just the thing you want.

> You are building a multi-tenant SaaS application. We would recommend you to use WSO2 Private PaaS here

> Why do we need a PaaS?

> Why can’t we simply develop this application and deploy in a cluster of Appserver instances in the IaaS layer.

SurveyDonkey

Page 5: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> Look, SaaS application has its own unique goals and requirements.

> They are different from building traditional web applications.

> We can categorize these requirement in the perspective of the SaaS application provider and the SaaS application consumer.

Page 6: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Requirements of a SaaS application

Consumer’s perspective:

• Isolation - Tenants want the application to appear as though they are exclusively using it.

• Availability - Guaranteed SLA. Other tenant activities should not affect the availability

• Scalability - Application should meet a tenant’s demands no matter what level resource optimization is in place

• Personalization - Ability to customize the application in various ways.

• Costs - Cost should be much less than running a dedicated hardware

Page 7: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Requirements of a SaaS application

Provider’s perspective:

• Achieving tenant’s requirements

• Resource Optimization

• Billing and Metering

• Monitoring

• Self-service

• Maintainability

Page 8: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Why you need a PaaS

• PaaS makes it easy to deploy, run and scale applications.

• PaaS gives unlimited language and framework support for application developers.

• PaaS provides core services such as multi-tenancy, logging, repository, identity management, elasticity etc..

• PaaS allows applications to be deployed in variety of IaaS offerings

Page 9: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> You can fulfill most of these requirements if you use WSO2 Private PaaS to develop and deploy your application.

> IaaS alone cannot fulfill all these requirement of a SaaS application.

> Or else you can implement all the features from the scratch. But I don’t think thats your core business.

> You need to build your Survey application as fast as you can and gain a competitive advantage.

Page 10: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> Let me give a brief introduction to WSO2 Private PaaS as well to its architecture. Then I will explain how a SaaS application can leverage capabilities offered by WSO2 Private PaaS.

> Okay. Can you show how WSO2 Private PaaS will helps us achieve all the necessary requirements?

SurveyDonkey

Page 11: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

WSO2 Private PaaS

• Complete, multi-tenant, self-service, metered middleware cloud for enterprise ready projects.

• Provides • application,• data,• integration,• identity,• governance and • analytics

Platform as a Service

• Built on top of Apache Stratos

Page 12: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

WSO2 Private PaaS - Layered Architecture

Page 13: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

SaaS Apps with WSO2 Private PaaS

Application Application Application Application SaaS

PaaS

IaaS

Page 14: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Cartridges

A Package of Code that plugs into WSO2 Private PaaS to offer a new PaaS service.

PHPCartridge

WSO2 ESBCartridge

Single-tenant Cartridge.

Stratos will run and manage a separate instance for each tenant.

Multi-tenant Cartridge.

Stratos will run multiple instances of partitions so that sets of tenants run on sets of instances.

Build to the metal - these servers are written from the scratch to be multi-tenant.

Page 15: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> Multi-tenancy is all about isolation.

> A multi-tenant solution should provide isolation is many aspects. Let me explain.

> Now that you mention multi-tenancy, how can I achieve tenant level isolation when developing applications on top of this WSO2 Private PaaS?

SurveyDonkey

Page 16: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Multi-tenancy is about isolation

• Data

• Configuration information

• Database

• User Interface

• Customizations

• Metadata

• Logs

Page 17: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Carbon Multi-tenant Architecture

Page 18: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

How to Achieve Tenant Isolation

• Each tenant is given a security domain

• Each domain may have its own userstore and permissions.

• Each domain is isolated and do not have access to other domains.

Page 19: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

How to Achieve Data Isolation

Page 20: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> There are a bunch of APIs. Let me briefly explain some useful APIs.

> Okay. If I am building my application on top WSO2 Carbon server Cartridges then what are the available Java APIs?

SurveyDonkey

Page 21: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Carbon APIs

• Identity and Security API - Manage users, roles, permission, authentication and authorization functionalities

• Registry/Repository API - crud api for repository.

• Caching API - Java caching API

Page 22: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Carbon APIs..

• CarbonContext API - CarbonContext is the entity which provides the runtime related contextual information of the current executing thread.

• Any code running in Stratos can retrieve following information from the CarbonContext API.

a. Tenant information who is executing the code.b. Logged in user information, if any.c. Application information, if any.

Page 23: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> If I am using non WSO2 Carbon server cartridges then how can I achieve multi-tenancy.

> How can I use above mentioned APIs?

SurveyDonkey

Page 24: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> If you are planning to use non WSO2 Carbon servers like Tomcat, JBoss, PHP then you will have to maintain an instance of these servers per tenant. e.g. each and every tenant will have a separate PHP instance.

> You will have limited options, if you want to access those APIs that I’ve described in the previous slides.

> But we do have certain exposed REST APIs, let me list them down for you.

> We are in the process improving these APIs.

Page 25: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

APIs available for non Carbon based Apps

• APIs available to communicate with the connected Userstore

• Tenant-mgt REST API to get tenant information. This APIs is available in the Stratos Manager.

• Admin Services in Stratos Manager. These are Carbon level APIs. Can extract necessary information.

Page 26: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

> Use [email protected] for business related matters.

> For technical information you following open lists.

[email protected]@wso2.org

> Thanks WSO2. How can I contact you for more information?

SurveyDonkey

Page 27: Building Multi-tenant SaaS Applications using WSO2 Private PaaS

Thank You