{'fraction_non_alphanumeric': 0.020964360587002098, 'fraction_numerical': 0.0, 'mean_word_length': 5.452702702702703, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A nonintrusive approach for implementing single database, multitenant services from web applications

In the Software as a Service (SaaS) distribution model, the software belongs to the service provider and clients act as tenants who pay to use the software. However, sparse documentation and problem-specific solutions imply that building a scalable, secure and configurable Software as a Service is not an easy task. This paper describes a reusable approach for implementing Single Database, Multitenant Software as a Service from existing Web Applications by adding multitenancy as an aspect of the Software. The approach uses architectural components, design patterns and current main-stream programming language functionality without requiring extensive changes to the original Web application. We used our approach to develop both a real-world use case, built in Ruby on Rails, and a reference application, built in Java, which is freely available.