multi-tenant

Rails Basecamp style subdomains best practice

泄露秘密 提交于 2019-12-03 04:38:38
问题 My goal is to have separate user accounts for each subdomain. Under no circumstance do I want cross-pollination between subdomains. I've looked over Robby Russle, and DHH's thoughts (both are pre-Rails3 though). The controller handling is pretty straight forward, my questions is about keeping the model's data separated. What's the best way to keep user1 from seeing user2's data? Some idea's might include: Add a subdomain_id foreign key to every model - Advantage , simple one-to-many

Multi-tenant rails application: what are the pros and cons of different techniques?

旧巷老猫 提交于 2019-12-03 04:33:08
问题 I originally wrote my Ruby on Rails application for one client. Now, I am changing it so that it can be used for different clients. My end-goal is that some user (not me) can click a button and create a new project. Then all the necessary changes (new schema, new tables, handling of code) are generated without anyone needing me to edit a database.yml file or add new schema definitions. I am currently using the SCOPED access. So I have a project model and other associated models have a project

Multi-user Datasources - Spring + Hibernate

人盡茶涼 提交于 2019-12-03 04:25:57
问题 I'm writing a web app that supports multiple users. Each user has their own database - using H2. all database schemas are the same. I wish to use Spring + Hibernate for this application. So I'm stuck at how to associate a user's database with that user - maybe associated it in the HTTPSession, and extend spring's AbstractRoutingDataSource? but wouldn't this effect Hibernate's cache? Another way is to have a SessionFactory with each datasource, even though every datasource's schema is the same

Multi tenancy in Shiro

左心房为你撑大大i 提交于 2019-12-03 03:08:26
We are evaluating Shiro for a custom Saas app that we are building. Seems like a great framework does does 90% of what we want, out of the box. My understanding of Shiro is basic, and here is what I am trying to accomplish. We have multiple clients, each with an identical database All authorization (Roles/Permissions) will be configured by the clients within their own dedicated database Each client will have a unique Virtual host eg. client1.mycompany.com, client2.mycompany.com etc Scenario 1 Authentication done via LDAP (MS Active Directory) Create unique users in LDAP, make app aware of LDAP

Python / Django multi-tenancy solution

回眸只為那壹抹淺笑 提交于 2019-12-03 02:55:24
问题 I could use some help creating a plan of attack for a project I'm working on. Imagine that the site is for a group that oversees regional sales offices, distributed around the world. The purpose of this project is to let superusers spin up a new sub-site specific to each and every office, at a fast pace -- sites are added on a frequent basis. The office sub-sites should be wholly contained with "admin" users specific to that sub-site and should be user-friendly CMS. A superuser should be able

Multi-Tenant Authentication with AWS Cognito

混江龙づ霸主 提交于 2019-12-03 02:08:25
My current project is in AWS, using Cognito and microservices with Lambda. We have designed the microservices using DDD and are in the process of implementing basic functionality. However, there is a business need for users of the API to be able to be categorised into the client company that they work for, and only be able to access data for that client company as well as any role-based authentication we will have. This isn't a full multi-tenant solution as every user will be working with the same website, but their account will have been associated with a particular client. Everything I have

one database per client or all clients in one database. which one should I use for a online application?

戏子无情 提交于 2019-12-03 01:39:01
So I have this application that would have multiple modules, from project management to accounting modules. The question is should I have one database per client (company) or one database that holds everything ? 1) which one would be better performance wise? 2) is is going to be a lot harder to manage multiple databases or is these manageable. 3) We are going to have the same application for all users, meaning that the same schema is going to be used no matter the number of databases. 4) some clients are going to have a lot of that (accountants for example might have up to 2 million row added

Multitenant Architecture in Ruby on Rails [closed]

ⅰ亾dé卋堺 提交于 2019-12-03 01:20:29
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Please let me know the best books available for Implementing Multitenant Architecture in Ruby on Rails. Is there any gem or framework available for same? There are no books just yet, but there's an interesting talk on the subject http://aac2009.confreaks.com/06-feb-2009-14-30-writing-multi-tenant-applications-in-rails-guy-naor.html and there's a gem you can use for it. https://github.com/wireframe/multitenant I will make

Mongoose create connection for multi-tenancy support in node.js

二次信任 提交于 2019-12-03 00:46:10
I'm researching a good way to implement multiple database for multi-tenant support using node.js + mongoose and mongodb. I've found out that mongoose supports a method called createConnection() and I'm wondering the best practice to use that. Actually I am storing all of those connection in an array, separated by tenant. It'd be like: var connections = [ { tenant: 'TenantA', connection: mongoose.createConnection('tenant-a') }, { tenant: 'TenantB', connection: mongoose.createConnection('tenant-b') } ]; Let's say the user send the tenant he will be logged in by request headers, and I get it in a

Solutions for a simple multi tenant web application with entity framework

江枫思渺然 提交于 2019-12-03 00:42:26
I'm developing a multi-tenant web app (stack: MVC 4 + Entity framework 4.3). My requirements are pretty simple: each tenant has the same UI and CodeBase. In my database I have some tables with a TenantId field (and other tables without). I have set up a very simple generic repository: public class GenericRepository<TEntity> where TEntity : class { internal Database.CRMEntities context; internal DbSet<TEntity> dbSet; internal int tenantId; public GenericRepository(Database.CRMEntities context) { this.context = context; this.dbSet = context.Set<TEntity>(); this.tenantId = 1; } I'd like the "get"