![Refactoring a SaaS Advertising Platform and Migrating It to Multi-Tenant Architecture](/boss/images/b6656d20-af9b-4a27-b5e1-6c593e178684saas-platform-modernization-for-a-pharma-focused-advertiser-large.jpg)
Refactoring a SaaS Advertising Platform and Migrating It to Multi-Tenant Architecture
About Our Client
The Client is a digital marketing and branding agency working specifically in the niche of phytotherapy. They own a SaaS advertising platform designed to assist businesses in navigating a restrictive advertising environment. Through this platform, phytotherapeutic companies can serve media advertisements and connect with their global audience.
Challenge
The Client was planning a significant update of their legacy advertising platform used to automate the management of digital ad campaigns. Mainly, they wanted to handle future growth and evolution effectively. As a high-level business goal, the company wanted to implement multi-tenancy for their customers to share the application resources, yet keep their data isolated and secure. The transition to multi-tenancy required an all-new approach to the platform architecture. At that time, however, updating was stalled as the platform was based on old technologies and poorly architected. Besides, the Client had involved several teams into the initial platform development and, at some point, lost control over the platform’s health.
Solution
Tasked with the overall application modernization, ScienceSoft assumed full ownership of the modernization process providing the Client with all the required technical documentation along the line.
ScienceSoft’s team started with the application audit and produced a detailed report addressing uncovered code quality and architecture issues. From there, fixes were prioritized, and an application modernization roadmap was drawn up.
To clean up code and eliminate the technical debt, ScienceSoft’s team performed refactoring activities. For better locating and fixing code discrepancies, the team split code into smaller testable components to conduct unit testing. Refactoring activities improved code readability and consistency with coding standards, which facilitated future platform growth and evolution and minimized the risk of the related changes causing a knock-on effect on the existing functionality. ScienceSoft’s team used AWS Elastic Beanstalk to deploy code changes. We introduced staging environment to test the code before pushing it live. The achieved code maintainability and extensibility secured cost-effective application evolution in the longer run.
Next, ScienceSoft re-engineered the application into a multi-tenant one. The team applied an architectural approach where computing resources and application code were shared between all the tenants, while each of them was provided with tenant-specific authentication. The isolation of data among tenants was guaranteed.
Results
Our team increased platform marketability by bringing source code in line with single standards and reviving the application with modern coding approaches. Also, we transferred the Client’s advertising platform to a multi-tenant model, which reduced overheads of maintaining the application across multiple deployments and optimized its cost of ownership.
Technologies and Tools
Python 3.6, Flask, React, Redis, PostgreSQL Elasticsearch, AWS Elastic Beanstalk