An Approach to Add Multi-Tenancy to Existing Applications

An Approach to Add Multi-Tenancy to Existing Applications

An Approach to Add Multi-tenancy to Existing Applications Uwe Hohenstein and Preeti Koka Siemens AG, Corporate Technology, Otto-Hahn-Ring 6, D-81730 Muenchen, Germany Keywords: Multi-tenancy, Cloud Migration, Aspect-Orientation, AspectJ, Industrial Application, Case Study. Abstract: Multi-tenancy, i.e., sharing resources amongst several tenants, is a key element to make SaaS profitable by saving resources and operational costs. This paper considers multi-tenancy in the context of Cloud migra- tion and presents an approach to let existing applications become multi-tenant. The novelty of this approach is that no reengineering and modification of the application’s source code is required. Adding some new components is sufficient to achieve tenant management, authentication, tenant isolation, and also customiza- tion. Using a case study, the paper demonstrates in detail how to benefit from aspect-orientation, particular- ly the AspectJ language, in this respect and concludes with experiences. 1 INTRODUCTION while entering SaaS business. This paper takes a practical view on Cloud mi- According to (Mell and Grance, 2011), Cloud com- gration and presents a low-effort approach for offer- puting is a model for enabling convenient, on- ing legacy applications as multi-tenant SaaS in a demand network access to a shared pool of configu- Cloud – without refactoring the source code. To rable computing resources that can rapidly be deliv- explore our idea, we use an existing industrial appli- ered with a minimal management effort or service cation that was originally not developed for a multi- provider interaction. tenant environment and serves users of exactly one Particularly, software is more and more becom- tenant. Currently, each tenant has an application ing an on-demand service drawn from the Cloud. deployed on a Tomcat server and an Oracle database The so-called Software-as-a-Service (SaaS) is a on premise. delivery model that enables customers, the so-called Several authors such as (Walraven et al., 2011) tenants, to lease services without a local installation or (Guo et al., 2007) discuss multi-tenant architec- (Lee and Choi, 2012). Tenants pay for what they use tures with pros and cons according to what is shared to what extent without buying software licenses. by the tenants: the topmost web frontend, middle tier While a traditional application service provider application servers, the underlying database. Others, typically manages one dedicated application instance e.g., (Andrikopoulos et al., 2013) define further per tenant, SaaS providers usually adopt a multi- degrees of sharing and categorize other migration tenant architecture (Chong and Carraro, 2006). Mul- types to cloud-enable applications. Striving for mul- ti-tenancy is a software architecture principle that ti-tenancy, the SaaS provider has to balance between lets several tenants share a common infrastructure. easy implementation and saving operational costs by This saves operational cost due to an efficient utili- efficient resource utilization. zation of hardware and software resources and im- The simplest approach to make our application proved ease of maintenance (Bezemer and Zaidman, multi-tenant with lowest development effort is cer- 2010). A well-economical SaaS application has to tainly to let each tenant obtain a VM with Tomcat, pursue a multi-tenant architecture. the application, and Oracle. (Krebs et al., 2012) call In order to benefit from features such as elastici- this a virtualization approach. The ease of this ap- ty and pay-as-you-go, businesses want to move proach is paid by well-known disadvantages such as applications into the cloud. One challenge for indus- high consumption of resources and high costs espe- try is to convert legacy applications into multi-tenant cially in public clouds. Moreover, each tenant re- SaaS without major code changes and high effort quires an Oracle license or additional costs for using (Binz et al., 2011), thus preserving investments Oracle as a Cloud service. 39 Hohenstein, U. and Koka, P. An Approach to Add Multi-tenancy to Existing Applications. DOI: 10.5220/0005973800390049 In Proceedings of the 11th International Joint Conference on Software Technologies (ICSOFT 2016) - Volume 2: ICSOFT-PT, pages 39-49 ISBN: 978-989-758-194-6 Copyright c 2016 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved ICSOFT-PT 2016 - 11th International Conference on Software Paradigm Trends Fully efficient multi-tenancy (Chong and Carra- lows. Section 2 presents related research and deduc- ro, 2006), at the other edge of the scale, allows for es the necessity for this work. sharing all resources, one Tomcat, one application, Before discussing the migration approach, we and one Oracle server among all tenants. Setting up give in Section 3 a short introduction into the aspect- a fully multi-tenant application requires a significant oriented AspectJ language, as far as it is necessary to re-engineering of applications, and thus causes high understand how we applied AspectJ. development costs (Momm and Krebs, 2011). We used a concrete industrial project to prove ef- While serving several tenants by sharing one in- fectiveness. Section 4 introduces the application in stance, SaaS applications have to be customizable or its original single-tenant form and presents our ap- configurable to fulfill the varying functional re- proach to migrate to a multi-tenant Cloud applica- quirements of individual tenants (Krebs et al., 2012). tion with low programming effort in detail. We dis- Tenant customization is recognized as one important cuss the components that implement important fac- requirement and challenge by (Guo et al., 2007), ets of multi-tenancy such as tenant isolation and (Bezemer et al., 2010), and others. (Lee and Choi, customization. 2012) state that it is not trivial to adapt the business In Section 5, we evaluate the AspectJ approach logic and data to the requirements of the different and discuss the lessons learned. Finally, the conclu- tenants. Most work on customization focuses on sions summarize the discussion and presents future product-line approaches (Pohl et al., 2005) to offer ideas. variability. Using aspect-oriented programming (AOP) is sometimes proposed to achieve configura- bility, e.g., by (Shahin et al., 2013) and (Wang and 2 RELATED WORK Zheng, 2010). In this paper, we also apply AOP, more precisely Several papers are related to our work in two sepa- the AspectJ language (Laddad, 2009), to migrate rate directions: Multi-tenancy and cloud migration. existing applications into fully multi-tenant SaaS The possible variants of multi-tenancy are de- applications. We elaborate upon how to benefit from scribed, among others, by (Chong et al., 2006) and AspectJ in this context and show that it is possible to (Kwok et al., 2008). (Momm and Krebs, 2011) con- have a simple and cheap mechanism by only adding sider approaches to reduce resource consumption components to existing applications – without any and discuss some cost aspects of sharing. Based on further reengineering. Using a real existing industrial the number of tenants, the number of users per ten- application, we demonstrate the major advantages of ant, and the amount of data per tenant, (Wang et al., our migration approach. In a nutshell, it is possible 2008) make recommendations on the best multi- to achieve tenant isolation, to modify existing be- tenant variant to use. havior in a tenant-specific manner, to introduce new (Guo et al., 2007) discuss implementation princi- services for specific tenants, and to monitor requests ples for application-level multi-tenancy, exploring per tenant for billing purposes. different approaches to improve isolation of security, Enabling such multi-tenancy facets is achieved performance, availability, and administration. without explicitly touching source code or building a (Fehling et al., 2010) come up with prospects for new application; only a restart of Tomcat is required the optimization of multi-tenancy by distributing the after having deployed some additional components. tenants with respect to Quality of Service. The motivation for our work is manifold. The An architectural approach for reengineering appli- approach is a first step to let existing applications cations to enable multi-tenancy in software services is become Cloud ready and to enable entering SaaS defined by (Bezemer et al., 2010). Their multi- business fast and easily. Such a first trial can explore tenancy reengineering pattern requires a multi-tenant SaaS business opportunities and to expand business database, tenant-specific authentication, and configu- to a larger customer base with low expenses. Being ration. The discussion takes into multi-tenancy reen- easily applicable to other applications, our solution gineering account workflow and UI configuration. reduces time-to-market and saves development ef- The reengineering pattern is applied to an existing fort. And finally, free demo versions of existing single-tenant application. Because of a well-designed applications can be made publicly available in a and layered architecture, the effort was relatively Cloud as a teaser, maybe with reduced functionality. little. Furthermore, (Bezemer and Zaidman, 2010) Since no profit can be directly made in that case, we manually transform the ScrewTurn wiki case to a benefit from small investments in development. multi-tenant application and encounter performance The remainder of this paper is structured as fol- isolation of tenants,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us