123ArticleOnline Logo
Welcome to 123ArticleOnline.com!

ALL >> Computer-Programming >> View Article

How We Retrieve Tenant Data In A Multi-tenant App With Detectify

By Author: Sviatoslav Andrushko
Total Articles: 10

We often build multi-tenant applications for Software as a Service (SaaS) providers. As we know, support for multi-tenancy is imperative for a SaaS application because a single instance of the app must manage data for multiple clients. The difference between a multi-tenant and a single-tenant app chiefly concerns the database tier, or layer. Multi-tenant and single-tenant refers to how client data is stored and accessed in a database.
But this article won’t talk about how to segregate client data in a database schema (or schemas) with Ruby gems, such as Apartment and Multitenancy. Instead, we’ll explain how to work around a different challenge – retrieving specific data depending on the tenant’s domain or subdomain name. We’ll present our own solution for this task, which you can use to build your own multi-tenant SaaS application.
Identifying the Tenant in a Multi-Tenant App
We often see URLs similar to these: tenant-one.webapp.com and tenant-two.webapp.com. For example, Slack allocates the rubygarage.slack.com subdomain for our RubyGarage team, and we must enter our subdomain – rubygarage – to sign in. This approach to building a multi-tenant web application can be called partial white-labeling (i.e. we don’t get our own full domain for Slack).


We commonly retrieve a tenant’s data (an entity) from Active Record using a subdomain name in our SaaS projects.
For example, we’re working on a project called Shopperations, a SaaS application designed for shopper marketers. Shopperations allows multiple tenants (companies) to separately work on their respective marketing projects. When a Shopperations user (a company representative) wants to sign in to the Shopperations application, they have to enter their subdomain.

Total Views: 52Word Count: 4842See All articles From Author

Computer Programming Articles

1. What Makes Php Advancement The Most Favored Web Innovation?
Author: Infocampus logics pvt ltd

2. Snmp Simulator Can Simulate Numerous Agents To Enhance The Productivity
Author: jamesjadams

3. Usage Of Selenium For Webapp Acceptance Test
Author: Siyaram Ray

4. Why You Should Pick Php Programming Dialect For Creating Site
Author: Infocampus logics pvt ltd

5. What Is Blockchain?
Author: anagha sathyapal

6. Beyond Gui Browsers - Selenium Testing
Author: Siyaram Ray

7. Microsoft Access Database 2016 Ebook
Author: Ben Beitler

8. How To Reset Forgotten Apple Id Password?
Author: Yamini Gyip

9. Java Programming And Software Fundamentals
Author: infocampus

10. Using Selenium To Test Web Application
Author: Siyaram Ray

11. 10 Things Every Java Programmer Should Know About String
Author: siyaram ray

12. Kunsh Technologies Introduces Offshore Laravel Web Development Services
Author: Darshan Shah

13. Is Selenium Is Future Of Software Testing
Author: Siyaram Ray

14. Learn Java Programming- Firstenquiry
Author: infocampus

15. Selenium Automation Testing Guide For Beginners
Author: infocampus

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: