A Multi-tenant Architecture for Business Process Executions


Published on

Cloud computing, as a concept, promises cost savings to end-users by letting them outsource their non-critical business functions to a third party in pay-as-you-go style. However, to enable economic pay-as-you-go services, we need Cloud middleware that maximizes sharing and support near zero costs for unused applications. Multi-tenancy, which let multiple tenants (user) to share a single application instance securely, is a key enabler for building such a middleware. On the other hand, Business processes capture Business logic of organizations in an abstract and reusable manner, and hence play a key role in most organizations. This paper presents the design and architecture of a Multi-tenant Workflow engine while discussing in detail potential use cases of such architecture. Primary contributions of this paper are motivating workflow multi-tenancy, and the design and implementation of multi-tenant workflow engine that enables multiple tenants to run their workflows securely within the same workflow engine instance without modifications to the workflows.

Published in: Technology, Business
1 Comment
  • One of the main advantages of an ideal multi tenant application is the operational benefit. Because all application code is in one place, it is much easier to maintain, update and backup the application and its data. Check out Wolf Frameworks for an ideal multitenant platform @ http://www.wolfframeworks.com
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

A Multi-tenant Architecture for Business Process Executions

  1. 1. A Multi-tenant Architecture for Business Process Executions<br />MilindaPathirage, Srinath Perera, Indika Kumara, SanjivaWeerawarana<br />WSO2 Inc. <br />
  2. 2. Cloud Computing<br /><ul><li>Ability to buy computations power, storage, or execution services as an Utility, on demand.
  3. 3. For more details read “A View of Cloud Computing, Communications of the ACM, 2010”</li></li></ul><li>Cloud Computing (contd.)<br />Best way to explain it is by comparing it to Electricity <br />Idea is we run data centers or shared servers instead of running individual servers, and share the resources. <br />Optimize large scale operations and archive economics of scale.<br />Since the pool is big, one can ask for resources when needed and release when not needed. <br />No need for capacity planning, start small and grow as needed. <br />Outsource running machines and maintenance enabling specialization. <br />photo by LoopZilla on Flickr, http://www.flickr.com/photos/loopzilla/2328231843/sizes/m/in/photostream/, Licensed under CC<br />
  4. 4. Cloud Offerings<br />
  5. 5. Why PaaS?<br />IaaS only provides limited saving to someone who needs to outsource their IT functions<br />SaaS is great when they can be used <br />They are usually very specific (e.g. email, CRM ..)<br />If they match, then great, but if they are not, not much choice for the user. <br />PaaS stays in the middle ground <br />Framework to host your apps<br />Hopefully you can move your apps as it is (well not the case with Azure or App Engine, but it is possible). <br />
  6. 6. Supporting SOA in PaaS<br />SOA is a primary technology in the Enterprise<br />Many users already have SOA artifacts <br />Moving them to the Cloud without need for changing will be a great advantage <br />We want to see Cloud as yet another deployment model<br />Write and test applications locally<br />Even deploy it locally if needed<br />When you need it, you can deploy the same artifacts in the cloud.<br />Multi-tenancy plays a major role. Which brings us to our Topic.<br />photo by MikkoTarvainenon Flickr, http://www.flickr.com/photos/mtarvainen/5131983246/, Licensed under CC<br />
  7. 7. What is Multi-tenancy ?<br /><ul><li>Many Parties share the same set of resources, while giving each an his own space</li></li></ul><li>Why Multi-tenancy? <br />Increased sharing<br />Cloud shares resources across a large pool of users. <br />Now sharing happens in the application level as oppose to sharing at OS level for multiple processes and sharing at HW level with VMs. <br />Provide pay for what you use <br />Often there will be many accounts in a PaaS or a SaaS, but only a fraction of them will be in use. <br />We cannot allocate runtime resource per account (disk may be ok, as it is cheap). For example, we cannot run a VM per account. <br />By sharing the same server with many users, Multi-tenancy provides much reduced runtime cost per server. <br />photo by Ben Gray on Flickr, http://www.flickr.com/photos/ben_grey/4582294721/, Licensed under CC<br />
  8. 8. Multi-tenancy vs. Virtual Machines<br />Multi-tenancy provides much fine grained sharing by many applications sharing the same server. <br />Say there are 100k accounts, but 10k active users at a time. VM based model needs 100k VMs, which means there is a cost incurred per account. <br />With Multi-tenancy one server can handle many accounts, and by mixing and matching heavy and light users, Multi-tenancy can operate with much less number of servers. <br />photo by hans s on Flickr, http://www.flickr.com/photos/archeon/2359334908/<br />
  9. 9. Our Earlier Works on Multi-tenancy <br />We provide a SOA PaaS offering called Stratos. Some of the features<br />Web Service Hosting as a Service <br />Web Application Hosting as a Service<br />Message Mediation Execution as a Service (ESB)<br />Governance as a Service <br />Earlier publications on the topic <br />A. Azeez and S. Perera et al., WSO2 Stratos: An Industrial Stack to Support Cloud Computing, IT: Methods and Applications of Informatics and Information Technology Journal, the special Issue on Cloud Computing, 2011.<br />AfkhamAzeez, Srinath Perera, DimuthuGamage, Ruwan Linton, PrabathSiriwardana, DimuthuLeelaratne, SanjivaWeerawarana, Paul Fremantle, "Multi-Tenant SOA Middleware for Cloud Computing" 3rd International Conference on Cloud Computing, Florida, 2010<br />
  10. 10. Today’s Topic: Workflow Hosting as a Service<br />Key part of the SOA puzzle <br />Workflows provide interoperable means of composing services together. <br />Still workflow technology is mostly limited to large scale organizations<br />Goals<br />Enable users to deploy the same workflows that they run on local machines in the Cloud without any changes and supporting the monitoring and other features in the same way. <br />Supporting Multi-tenancy <br />Scalability <br />photo by Michael Coté on Flickr, http://www.flickr.com/photos/cote/460253143/, Licensed under CC<br />
  11. 11. Motivating Usecases<br />
  12. 12. E-Science Gateways<br />Scientific workflows has been identified as enabling technology for E-Science. <br />Idea is to let scientists visually compose workflows and run them. <br />There are many gateways that do this. <br />However, the cost of running gateways for different domains has been high. Workflow hosting service together with Service and Web application hosting service will enable multiple science gateways to share the same infrastructure thus reducing the maintenance cost and resource sharing . <br />photo by Image Editor on Flickr, http://www.flickr.com/photos/11304375@N07/2769519295/, Licensed under CC<br />
  13. 13. SMBs (Small and Medium size Business) <br />Most SMBs can not afforded to run their own workflow technologies. <br />This stops them from goes to the next level. <br />Workflow, Service and Web hosting services can enable multiple SMBs to share the same infrastructure. <br />This will lower the bar of workflow use, and enable SMBs to move to the next level. <br />photo by Olaf on Flickr http://www.flickr.com/photos/okreitz/3073783437/, Licensed under CC<br />
  14. 14. Goals of Multi-tenancy <br />Sharing – maximize the resource sharing across multiple tenants. <br />Isolation – hide the fact other other are also in the same server. <br />Execution – enforce security. Make sure one tenant can’t call other tenants executable logic. <br />Data – make sure one tenant can’t see other data <br />Performance - make sure performance is not affected by existence of other tenants. <br />Scale<br />Server is distributed and it can handle larger load by adding more nodes. <br />photo by John TrainoronFlickr http://www.flickr.com/photos/trainor/2902023575/, Licensed under CC<br />
  15. 15. Related works <br />Mitezner [5] and Shi et al.[6] introduced application templates where the system lets users customize a template workflow.<br />Mitezneret al. introduced a tenant context to hold execution data and isolate executions. We also use a similar concept. <br />Cai, Wang, and Zhou [8] have used tenant context to support multi-tenancy in Web Applications. <br />Anstett et al. [9] discuss challenges of bring BPEL processes to cloud. <br />Need changes to BPEL engine<br />Configuration data isolation<br />Avoid giving access to DBs<br />Securing the Data in the communication <br />
  16. 16. BPS Multi-tenancy Architecture <br />
  17. 17. Achieving Service Execution Isolation<br /><ul><li>All executions are based on Axis2 (ODE also runs on Axis2)
  18. 18. Axis2 have stateless executions and keep all state in a Context.
  19. 19. So if we create different context for each tenant, they are isolated.
  20. 20. See Azeez et al. “Multi-Tenant SOA Middleware for Cloud Computing” for details </li></li></ul><li>BPS Multi-tenancy Architecture <br />
  21. 21. BPS Multi-tenancy Architecture (Contd.)<br />Extends Apache ODE<br />Has a single tenant Apache ODE Engine as the core and added Multi-tenancy by adding a Multi-tenant process store and adding isolation at the message reception. <br />Parts of the architecture <br />A Process store per tenant, which only allows calls from that tenant<br />Parent process store that provides a single process store view across all tenant stores (to Apache ODE). <br />
  22. 22. BPS Multi-tenancy Architecture (Contd.)<br />When a workflow is deployed by T1, it is stored in T1’s process store. Also, a service is created for the workflow and deployed within T1’s space. <br />When a workflow received a message, the service that receives the message perform access control and then injects it to ODE with tenant ID as a correlation property. <br />A implicit correlation rule together with other correlation rules routes the messages to a workflow instance. <br />When workflow instance access the process store, it is routed to the T1’s tenant process store. <br />
  23. 23. Isolation<br />Data isolation is provided by the process store per tenant, which stores data in the multi-tenant registry. <br />Execution isolation is provided by Service isolation which enforces security on any external calls before a message is injected in to the workflow engine. After entry, isolation is provided by data isolation and workflow engine. <br />Workflow engine creates a new version when a process is redeployed, and each version is isolated. So multiple users can have workflows with the same name in the workflow engine. <br />photo Kevin Rushton by on Flickr, http://www.geograph.org.uk/photo/643153<br />
  24. 24. Isolation (Contd.)<br /> Performance isolation is a challenging issue. <br />We currently relay on monitoring and auditing where we can kill CPU hogging processes<br />We are exploring the possibility of changing the priority of CPU hogging processes in the work queue. <br />photo Fortes by on Flickr, http://www.fotopedia.com/items/flickr-3193056200<br />
  25. 25. Scaling <br />Run multiple BPS nodes in a cluster<br />Tenants are partitioned across BPS nodes<br />Fronted by a load-balancer which is aware of tenants and processes<br />
  26. 26. Performance <br />Setup Multi-tenant and non-multi-tenant versions <br />Run 200 workflows from each client<br />Overhead is minimal<br />MT supports only add few additional lookups and checks<br />Java Security does not come in to play as we do not run user provided code. <br />
  27. 27. How does it make a difference?<br />Supporting Workflow Hosting as a Service<br />Bringing down the cost of using workflows<br />Increasing the sharing in the cloud <br />Multi-tenant BPS in private Cloud to support multiple departments for improve resource sharing. <br />As a test environment and an education medium <br />Super tenant workflows <br />Workflow store model (like App Store) to sell workflows. <br />Photo by Madhan on Flickr, http://www.flickr.com/photos/flickcoolpix/3566848458/<br />
  28. 28. Conclusion<br />We proposed an architecture for supporting Multi-tenant Business Process Engine <br />We layered this on top of our earlier works on Service Multi-tenancy and Data Multi-tenancy. <br />We discussed data and execution isolation. <br />We have realized the architecture on top of WSO2 BPS, which is an extension of Apache ODE<br />Multi-tenant business process engine enables end-users to deploy their current BPEL workflows running on their machine without any changes. <br />It only introduced a minimal overhead <br />It is currently available for free from cloud.wso2.com <br />
  29. 29. Questions?<br />