multi-tenant

Multiple applications using a single code base in ruby

喜欢而已 提交于 2019-11-28 06:07:27
问题 I'm trying to get a reasonable understanding of how one can build an app on top of ruby/rack (or even more ideally, an existing framework) that manages something equivalent to WordPress. Specifically, with the ability to serve multiple sites from the same code base, each with its own features and configuration. Suppose, for instance: example.com using auth, pages, blog modules forum.example.com -> auth, forum modules api.example.com -> auth, api modules This test case seems to work, including

dynamically set database based on request in django

☆樱花仙子☆ 提交于 2019-11-28 05:09:10
I am writing a multi-tenant application with python-django. I want to set database connection based on each request.I thought i could write a middleware where we set the database to be used for that particular database. import re from django.db import connections class SetTenantDatabase(object): def process_request(self, request): pattern = re.compile("\\b(http://|https://|www.|.com|8000|:|//)\\W\\d+", re.I) words = request.get_host() db_name = [pattern.sub("", words)][0].split('.')[0] connections.databases['new-alias'] = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME

Pass tenant id via sql server connection

会有一股神秘感。 提交于 2019-11-28 02:02:17
问题 I'm building multi tenant application with shared table structure using Microsoft SQL Server. I wonder if it possible to pass tenantID parameter via sql server connection. I don't want to create separate user account for each tenant. Currently I see two ways: via ApplicationName or WorkstationID Best regards, Alexey Zakharov 回答1: I would use the Application Name of the connect string, which is then easy to get at in TSQL with APP_NAME (Transact-SQL). However, you could also consider using

Azure Service Fabric Multi-Tenancy

依然范特西╮ 提交于 2019-11-27 22:31:16
I'm trying to get a little follow up to this question that's already been answered... Service Fabric multi-tenant If I were to setup my tenants as Azure Service Fabric Stateless Services (they'll get their state out-of-band), how can I put more than one tenant on each node in the cluster? In testing, it seems that Service Fabric gags if you try and make your instance count greater than the node count. These tenants are very lightweight, so I should be able to run dozens of them on each node (we will have hundreds overall), and I don't want to have to do a node for each one. Specifically, the

MultiTenant Application Prevent Tenant Access Data from Other Tenant in Shared Database

一世执手 提交于 2019-11-27 18:59:24
问题 I’m working on a tenant application and i was wondering how i can block tenant access other tenant data. First, let me expose some facts: The app is not free, 100% for sure the malicious user is a client. All the primary keys/identity are integers (Guid solve this problem but we can't change right now). The app use shared database and shared schema. All the tenants are business group wich own several shops. I'm use Forgery... I have some remote data chosen by dropdown and its easy change the

Setting up a MultiTenantConnectionProvider using Hibernate 4.2 and Spring 3.1.1

让人想犯罪 __ 提交于 2019-11-27 17:54:07
I am currently trying to set up Hibernate for multi tenancy using the seperate Schema aproach. After working on it for about 2 days now and browsing nearly every source I could find via Google I am starting to get quite frustrated. Basicaly I am trying to follow the guide provided in the Hibernate devguide http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html_single/#d5e4691 But unfortunately I am not able to find the ConnectionProviderUtils to build the ConnectionProvider. Currently I am trying to figure out 2 Points: Why the configure(Properties props) method of my

Manage Connection Pooling in multi-tenant web app with Spring, Hibernate and C3P0

女生的网名这么多〃 提交于 2019-11-27 17:07:02
I'm trying to setup a multi-tenant web application, with (ideally) possibility for both Database-separated and Schema-separated approach at the same time. Although I'm going to start with Schema separation. We're currently using: Spring 4.0.0 Hibernate 4.2.8 Hibernate-c3p0 4.2.8 (which uses c3p0-0.9.2.1) and PostgreSQL 9.3 (which I doubt it really matters for the overall architecture) Mostly I followed this thread (because of the solution for @Transactional ). But I'm kinda lost in implementing MultiTenantContextConnectionProvider . There is also this similar question asked here on SO, but

Multi-tenant in Laravel4

岁酱吖の 提交于 2019-11-27 14:15:00
问题 I'm building a multi-tenant app, using the subdomain to separate the users. e.g. .myapp.com I want to give each tenant their own database too. How can I detect the subdomain and set the database dynamically? Also, the code below is from the official documentation and shows us how we can get the subdomain when setting up a route. But how do we pass the subdomain value to a controller function? Route::group(array('domain' => '{account}.myapp.com'), function() { Route::get('user/{id}', function(

Entity Framework for Multi-tenant architecture - filterings single table by tenant ID

孤人 提交于 2019-11-27 12:33:57
问题 We are looking for a way of automatically filtering all CRUD operations by a tenant ID in Entity Framework. The ideas we thought of were: Using table valued user defined functions Using stored procedures (but we don't really want to, as we're using an ORM to avoid doing so) Some how modifying the templates used to generate the SQL to add a where clause on each statement. Some how modifying the templates used to generate the LINQ in the controllers (we may use MVC). Any tips? -thanks Alex. 回答1

How to implement Multi-tenant User Login using ASP.NET Identity

天涯浪子 提交于 2019-11-27 11:35:33
I'm developing a Multi-tenant solution and I want to use the latest ASP.NET Identity framework specifically the Entity Framework implementation. Basically I need to allow two users to have the same username, though it must be unique within a tenant, I'd also like to make use of external sign-ins such as Twitter, Microsoft, Facebook and Google. From what I can tell, the framework was not designed with multi-tenancy in mind, though it does seem to allow extensibility. I'd prefer to make use of as much existing components as possible, though at the moment I think I'm going to have to abandon the