Building a SaaS using WSO2 Stratos

1,177 views

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,177
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Building a SaaS using WSO2 Stratos

  1. 1. Solution Patterns Webinar : Cloud Solution PatternsBuilding a SaaS using WSO2 Stratos© WSO2 2013. Not for redistribution. Commercial in Confidence.Asanka Abeysinghe, VP-Solutions ArchitectureSelvaratnam Uthaiyashankar, Director-Cloud Solutions
  2. 2. What we do:WSO2 can help any business wherever they areand take them where they want to go.Business Business with APIs Connected Business(WSO2 Carbon middleware) (WSO2 API Manager) (WSO2 App Factory)Business = {People, Processes,Data}3rdPartyAppsAPIPaaS forManaged 3rdParty AppsAPIAppAppAppBusiness = {People, Processes, Data}3rd PartyAppsAPIBusiness = {People, Processes, Data}
  3. 3. -  Providing the only complete open source componentized cloud platform-  Dedicated to removing all the stumbling blocks to enterprise agility-  Enabling you to focus on business logic and business value-  Recognized by leading analyst firms as visionaries and leaders-  Gartner cites WSO2 as visionaries in all 3 categories of applicationinfrastructure-  Forrester places WSO2 in top 2 for API Management-  Global corporation with offices in USA, UK & Sri Lanka-  200+ employees and growing-  Business model of selling comprehensive support & maintenance for ourproductsAbout WSO2
  4. 4. Selected Customers
  5. 5. SaaS (Software as a Service)“On-demand software provided by aapplication service provider.”“A software delivery model in which software andassociated data are centrally hosted in the cloud.”- Wikipedia
  6. 6. SaaS (Software as a Service)“Software that is owned, delivered andmanaged remotely by one or more providers. Theprovider delivers software based on one set ofcommon code and data definitions that isconsumed in a one-to-many model by allcontracted customers at anytime on a pay-for-usebasis or as a subscription based on use metrics.”- Gartner
  7. 7. Popular SaaS Applications
  8. 8. History of SaaSPicture Credit : http://www.athenahealth.com/_img/misc/ascent_of_man.jpg
  9. 9. Overriding the SaaS AppsPicture Credit : http://store.nike.com/us/en_us/product/kobe-8-system-id-basketball-shoe
  10. 10. SaaS BenefitsPicture Credit : http://www.aruba-travelguide.com/getting-around/road-map/
  11. 11. SaaS Technical RequirementsElastic (Uses the cloud efficiently)Scales up and down as neededWorks with the underlying IaaSSelf-service (in the hands of users)De-centralized creation and management of tenantsAutomated Governance across tenantsMulti-tenant (Only costs when you use it)Virtual isolated instances with near zero incremental costImplies you have a proper identity modelGranularly Billed and Metered (pay for just what you use)Allocate costs to exactly who uses themDistributed/Dynamically Wired (works properly in the cloud)Supports deploying in a dynamically sized clusterFinds services across applications even when they moveIncrementally Deployed and Tested (seamless live upgrades)Supports continuous update, side-by-side operation, in-place testing and incremental production
  12. 12. Usage of PaaSIaaSPaaSSaaS
  13. 13. Cloud Programing Model-  Tenant Apps-  Super Tenant Apps-  Tenant Aware Super Tenant Apps
  14. 14. Implementation usingPicture Credit : http://michaellorinfriedman.com/wp-content/uploads/2012/02/emr_implementation.jpg
  15. 15. WSO2 Stratos
  16. 16. Stratos ArchitecturejClouds  API  Stratos  PaaS  Founda2on  (Tenancy  model,  Shared  Services,  Security,  Self-­‐Service,  Elas2city)  WSO2  ESB  Server  WSO2  AppServer  Applica2ons  EC2   OpenStack   VMware   Eucalyptus   ……WSO2  ESB  Cartridge  AppServer  Cartridge  PHP  App  PHP  Cartridge  Other  Carbon  Server  Carbon  Cartridge  Other  Servers  Pluggable  Cartridge  IaaSPaaSSaaS
  17. 17. Understanding Cartridges•  A cartridge is a package of code/configuration that plugs into Stratos to offer a new PaaSService•  e.g. Carbon ESB cartridge plugs in to provide a Stratos ESB-as-a-Service•  PHP Cartridge plugs in to provide PHP-as-a-Service•  A cartridge is a runtime that may (or may not) be optimized to use Stratos Core Services•  e.g. Logging, Authn/Authz, Billing and Metering, Registry, Messaging•  Plus a simple script to deploy code or artifacts•  A cartridge is a VM image plus config•  In Stratos 2.0 you need a VM per IaaS•  e.g. need to create both EC2 and VMware image to use on both IaaS•  Stratos takes care of:•  Spawning instances, Managing IPs•  Load-balancing and URL Mapping•  Autoscaling
  18. 18. Stratos PaaS Foundation•  Stratos Controller•  set of components that deploy, scale, monitor, and manage an elastic middlewareCloud•  Stratos Core Services•  provide essential capabilities to Cartridges and applications running in Stratos•  Logging-as-a-Service•  Data-as-a-Service (MySQL and Cassandra)•  Identity-as-a-Service•  Registry/Repository (for metadata and config)•  Billing and Metering
  19. 19. SaaS Reference ArchitectureStratos FoundationServicesMessagingLoggingIdentity & SecurityRegistry ServicesBilling & MeteringTheming &PersonalizationDataStorageRelational Data Column Storage FileStorageApplicationPlatformServicesApplicationServer Data Services EnterpriseService BusBusiness Process Business Rules Mashup ServicesUser Engagement Business ActivityMonitoringComplex EventProcessingSaaSApplication Business LogicPresentation API
  20. 20. Multi-tenancyA cartridge can operate in two modes:•  Single tenant•  Stratos will run and manage a separate instance for each tenant•  The PHP Cartridge runs this way•  Multi-tenant•  Stratos will run multiple instances partitioned so that sets of tenants run on sets ofinstances•  Each instance of a Cartridge may run more than one tenant•  Carbon Cartridges run this way
  21. 21. Carbon Multi-tenancy Architecture
  22. 22. Achieving Tenant Isolation•  Each Tenant is given a Security Domain•  Each domain may have its own User Store and Permissions, thus have aset of users and permissions enabling users to access resources•  Each domain is isolated and do not have access to other domains
  23. 23. Achieving Data Isolation
  24. 24. Polyglot Data Solution
  25. 25. Autoscaling
  26. 26. Tenant Aware Load Balancing
  27. 27. Metering•  Each SaaS Application can collect•  Number of service calls•  bandwidth (upload, download)•  Send above to WSO2 BAM•  WSO2 BAM summarizes periodically•  Summarized data will be accessible by Stratos Manager / SaaSapplications
  28. 28. Metering – Super Tenant View
  29. 29. Metering – Tenant View
  30. 30. Throttling•  Control people to not using more than allowed resources•  Number of users per tenant•  Registry Space•  Batch mode at the moment•  Stratos Manager validates each tenant periodically using metering information•  Evaluation is based on rules configured using Drools•  Update the status of each tenant to registry•  Other services read from registry
  31. 31. Stratos Billing•  Scheduled invoice generation•  Ability to view past invoices and the current(interim) invoice•  Securely pay the invoice via Paypal•  Notifies the customer via email on received payments•  Notifies the super-admin on customers exceeding the credit limit•  Presents a summary view to the super-admin
  32. 32. Stratos Billing
  33. 33. Logging
  34. 34. Log Viewer – Super Tenant View
  35. 35. Log Viewer – Tenant View
  36. 36. Super Tenant SaaS Applications Vs Tenant SaaS Applications•  Tenant SaaS applications•  do not have certain permissions•  E.g: Write/Read from local file system, Open a socket and listen•  Will not be able to access or modify other tenant’s data•  Super tenant applications have full control and permissions
  37. 37. Tenant SaaS Web Applications•  Configure security in web.xml<security-constraint><display-name>Example Security Constraint</display-name><web-resource-collection><web-resource-name>Protected Area</web-resource-name><!-- Define the context-relative URL(s) to be protected --><url-pattern>/jsp/security/protected/*</url-pattern><!-- If you list http methods, only those methods are protected --><http-method>DELETE</http-method><http-method>GET</http-method><http-method>POST</http-method><http-method>PUT</http-method></web-resource-collection><auth-constraint><!-- Anyone with one of the listed roles may access this area --><role-name>*</role-name></auth-constraint></security-constraint>
  38. 38. Tenant SaaS Web Applications•  Enable SaaS for the webapp•  VALUE can be•  Empty – all tenants are allowed to access the webapp•  Allowing some tenants•  Restricting some tenants•  Allowing only some users of a tenant•  Restricting some users of a tenant•  Allow/Restrict only some roles of a tenant•  Can combine multiple scenarios<context-param><param-name>carbon.saas.tenants</param-name><param-value>[VALUE]</param-value></context-param><param-value></param-value><param-value>foo.com;bar.com</param-value><param-value>!foo.com;!bar.com</param-value><param-value>foo.com:users=test,admin;bar.com</param-value><param-value>foo.com:users=!test1,admin;bar.com:users=,!bob</param-value><param-value>foo.com:roles=developers;bar.com:roles=!devops</param-value><param-value>foo.com:roles=devops:users=user1,user2;bar.com:roles=!devops</param-value>
  39. 39. Super Tenant SaaS Application•  Can access tenant’s user level information•  Use org.wso2.carbon.context.PrivilegedCarbonContext to accesstenant’s information•  Registry•  Cache•  Tenant Manager•  Queue
  40. 40. Workshops•  http://wso2.com/events/workshops/2013-june-detroit-enterprise-cloud-and-devops-accelerate-app-delivery-a-best-practice-workshop/•  http://wso2.com/events/workshops/2013-june-chicago-wso2-integration-platform-discovery-workshop/
  41. 41. Questions?
  42. 42. More Info§  Corporate website: http://wso2.com§  Solution Architecture Blog: http://wso2.com/blogs/architecture/§  Business development team: bizdev@wso2.com§  Asanka Abeysinghe§  Blog : http://asanka.abeysinghe.org§  Twitter : @asankama§  Selvaratnam Uthaiyashankar§  Blog : http://uthaiyashankar.blogspot.com§  Twitter : @uthaiyashankar
  43. 43. Engage with WSO2-  Helping you get the most out of your deployments-  From project evaluation and inception to development andgoing into production, WSO2 is your partner in ensuring100% project success
  44. 44. 44lean . enterprise . middleware

×