multi-tenant

Rails migrations for postgreSQL schemas

假如想象 提交于 2019-12-02 17:39:21
I'm working on a multi-tenant rails application using PostgreSQL schemas for different clients. Rails migrations don't work with multiple schemas out of the box, so I made the following rake task to migrate all schemas and it seems to work. My question is if others have implemented better and more elegant solutions. I would also be really happy with a good tutorial including rails code examples for PostgreSQL using multiple schemas. So far I have only found a good presentation on the subject http://aac2009.confreaks.com/06-feb-2009-14-30-writing-multi-tenant-applications-in-rails-guy-naor.html

PostgreSQL's schemas for multi-tenant applications

早过忘川 提交于 2019-12-02 16:16:21
I'm learning about multi-tenant applications and how PostgreSQL's schemas can be used for this. Researching the subject, I ended up finding an article in which the author describes a poor experience when using PostgreSQL's schemas in multi-tenant applications. The main problems would be having bad performance for migrations and high usage of database resources. It seems like having only one schema (sharing the tables among the tenants) would lead to better performance than having one separated schema for each tenant. But it feels strange to me. I would think the opposite, since indexes on

Grails: changing dataSource url at runtime to achieve multi tenant database separation

一笑奈何 提交于 2019-12-02 14:48:17
问题 I'm building a multi tenant application with Grails and I want to keep separate databases. I need to change the url dynamically at runtime to point GORM to different database. I have a front-end acting as a balancer distributing requests to a cluster of backend hosts. Each backend host runs a Grails 2.3.5 instance and a mysql-server with several databases (one per tenant). I would like to change dataSource dynamically so that GORM can access domain entities on the right database. Any ideas ?

Setup a route {tenant}/{controller}/{action}/{id} with ASP.NET MVC?

独自空忆成欢 提交于 2019-12-02 14:15:39
I would like to setup a multi-tenant ASP.NET MVC app. Ideally, this app would have a route with {tenant}/{controller}/{action}/{id} , each tenant representing an logical instance of the app (simply independent multi-user accounts) The fine grained details how do that are still quite unclear to me. Any guide available to setup such multi-tenant scheme with ASP.NET MVC? I am currently working on a similar project using ASP.Net MVC, Forms Authentication and the SQL providers for Membership/Roles/Profile. Here is the approach I am taking: Register the default route as `{tenant}/{controller}/

SaaS / Multi-Tenancy approaches for Java-based (GWT, Spring, Hibernate) web applications

拥有回忆 提交于 2019-12-02 14:04:55
I am currently looking into converting a single-tenant Java based web-app that uses Spring, GWT, Hibernate, Jackrabbit, Hibernate Search / Lucene (among others) into a fully fledged SaaS style app. I stumbled across an article that highlights the following 7 "things" as important changes to make to a single tenant app to make it an SaaS app: The application must support multi-tenancy. The application must have some level of self-service sign-up. There must be a subscription/billing mechanism in place. The application must be able to scale efficiently. There must be functions in place to

Creating a multi-tenant application using PostgreSQL's schemas and Rails

ぃ、小莉子 提交于 2019-12-02 13:50:51
Stuff I've already figured out I'm learning how to create a multi-tenant application in Rails that serves data from different schemas based on what domain or subdomain is used to view the application. I already have a few concerns answered: How can you get subdomain-fu to work with domains as well? Here's someone that asked the same question which leads you to this blog . What database, and how will it be structured? Here's an excellent talk by Guy Naor , and good question about PostgreSQL and schemas . I already know my schemas will all have the same structure. They will differ in the data

SaaS- Tenant Specific Lookup Data in Shared Database

烈酒焚心 提交于 2019-12-02 07:50:00
I am developing multitenant SaaS based application and going with Shared Database for storing all the tenant records with help of TenantId column. Now the problem is i have some list of lookup records that needs to be shared for all the tenants. For example list of games. GamesTable Id GameName Also have another table used for storing only tenant specific records TenantGames Id TenantId GameName The basic need is i want to use both table data and get the necessary details (Game_Name) while joining with another transaction table like UserGames. How can i achive this with this design? Here Game

Grails: changing dataSource url at runtime to achieve multi tenant database separation

白昼怎懂夜的黑 提交于 2019-12-02 05:13:43
I'm building a multi tenant application with Grails and I want to keep separate databases. I need to change the url dynamically at runtime to point GORM to different database. I have a front-end acting as a balancer distributing requests to a cluster of backend hosts. Each backend host runs a Grails 2.3.5 instance and a mysql-server with several databases (one per tenant). I would like to change dataSource dynamically so that GORM can access domain entities on the right database. Any ideas ? Thanks You can configure multiple data source in your DataSource.groovy, have a look in the blog . In

Collection based multitenancy with Spring Data MongoDB

强颜欢笑 提交于 2019-12-01 19:38:43
Our Spring Boot 1.3.3 application persists data on MongoDB (2.6 ou 3.2) using Spring Data MongoDB 1.8.4. We need to support multitenancy. We chose to use "collection based" multitenancy, i.e. each tenant has its own set of collection. For example for the Article entity, the collections are "{tenantName}_articles". Oliver Gierke kindly explained an implementation in Making spring-data-mongodb multi-tenant using for example : @Document(collectionName = "#{tenantProvider.getTenantId()}_articles") This is very nice on paper, but does not seem applicable for real life applications as I found two

Collection based multitenancy with Spring Data MongoDB

最后都变了- 提交于 2019-12-01 18:08:44
问题 Our Spring Boot 1.3.3 application persists data on MongoDB (2.6 ou 3.2) using Spring Data MongoDB 1.8.4. We need to support multitenancy. We chose to use "collection based" multitenancy, i.e. each tenant has its own set of collection. For example for the Article entity, the collections are "{tenantName}_articles". Oliver Gierke kindly explained an implementation in Making spring-data-mongodb multi-tenant using for example : @Document(collectionName = "#{tenantProvider.getTenantId()}_articles"