Re: [web2py] Re: multi tenant

2016-01-18 Thread Fabiano Almeida
Great Massimo! Thanks a lot! Fabiano. 2016-01-17 23:00 GMT-02:00 Massimo Di Pierro : > That URL structure assumes you have a single app running at the domain. So > I am going to assume that is the case. > > first of all you have to map the tenant name ($domain) into > request.args(0) using rout

[web2py] Re: multi tenant

2016-01-17 Thread Massimo Di Pierro
That URL structure assumes you have a single app running at the domain. So I am going to assume that is the case. first of all you have to map the tenant name ($domain) into request.args(0) using routes.py routes_in = [['/$domain','/yourapp/default/index/$domain'], ['/$doma

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Alec Taylor
Thanks, On that note, I really should link up my 'group_of_events' table with web2py's build-in RBAC On Wed, Jul 25, 2012 at 1:11 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This is the right way to think about it. :-) > > > On Tuesday, 24 July 2012 21:56:18 UTC-5, Cliff Kachins

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Massimo Di Pierro
This is the right way to think about it. :-) On Tuesday, 24 July 2012 21:56:18 UTC-5, Cliff Kachinske wrote: > > For production use Postgres (first choice) or MySQL. Do your homework on > indexing and other optimization tricks. > > If your site gets big enough to have performance problems becaus

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Massimo Di Pierro
Mind that for each user you have auth.user_groups = { group_id: group_obj, ... } this allows you to efficiently do: if group_in in auth.user_groups and it can also be used a map to convert the group_id to the group_obj.role and vice versa. the dict is automatically updated when the user does a

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Cliff Kachinske
For production use Postgres (first choice) or MySQL. Do your homework on indexing and other optimization tricks. If your site gets big enough to have performance problems because there are too many rows in a table, you will also have enough income to hire a really good dba :). On Tuesday, Jul

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Alec Taylor
I was also worried that running queries such as "is user in this group?", "how many events does this group have?" would be much less efficient with everyones data in one place. But it's probably just a perception thing, as you say, and it sounds like the drawbacks outweigh the benefits... :\ S

Re: [web2py] Re: Multi-tenant social-network?

2012-07-23 Thread pbreit
On Monday, July 23, 2012 3:01:40 PM UTC-7, Cliff Kachinske wrote: > > > Separate DBs sounds messy. > > Some elaboration on that point. > Everything that is simple to do on one DB becomes complicated to do on multiple DBs. For example, I run a multi-tenant site that I constantly run queries again

Re: [web2py] Re: Multi-tenant social-network?

2012-07-23 Thread Cliff Kachinske
> Separate DBs sounds messy. Some elaboration on that point. Methinks you will lose the advantage of connection pooling. Every request will need its own connection, and performance will suffer. How will you avoid duplicate db names? You will need a central repository, which probably should b

Re: [web2py] Re: Multi-tenant social-network?

2012-07-19 Thread Alec Taylor
On Fri, Jul 20, 2012 at 4:12 AM, Andrew wrote: > If users can create groups, will you want to create a database on the fly? > Yes. In the same way that in Massimo talk from a few months ago he talked about using the multi-tenant feature in an e-commerce setup, presumable where individuals would c

[web2py] Re: Multi-tenant social-network?

2012-07-19 Thread pbreit
Separate DBs sounds messy. You could either use Web2py's multi-tenant functionality and/or auth_group. Or just code it. --

[web2py] Re: multi-tenant app tables

2011-11-28 Thread GoldenTiger
Are you talking about domains on a remote server? On 28 nov, 12:39, Nik Go wrote: > I've already set the request_tenant field and each domain can only see the > data they create. > > However, from the localhost, I can only see auth_user data, and data > created from localhost. How do I allow acce

[web2py] Re: multi-tenant app tables

2011-11-28 Thread Massimo Di Pierro
if condition: db._request_tenant = 'ignore_tenant' On Nov 28, 5:39 am, Nik Go wrote: > I've already set the request_tenant field and each domain can only see the > data they create. > > However, from the localhost, I can only see auth_user data, and data > created from localhost. How do I all

[web2py] Re: Multi-Tenant Web2py

2011-04-11 Thread Jay
SAP the world's biggest ERP program uses the option #3 above. They can host many companies in one system (a system has only one database). Each company has a client number (3 digits). The login screen has four fields. 1. userid, 2. password 3. client# and 4. Language. In the data dictionary - that

[web2py] Re: Multi-Tenant Web2py

2011-04-11 Thread pbreit
I'm not sure there are (m)any silver bullets. The three basic approaches are 1) separate DBs, 2) separate tables and 3) shared db/tables: http://msdn.microsoft.com/en-us/library/aa479086.aspx I don't know if there are an "silver bullets" for this so you might just have to brute-force code it. I