This link to the book might help:
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=multi-tenant
-Jim
On Tuesday, October 13, 2015 at 7:03:53 AM UTC-5, Jean-François Milants
wrote:
>
> Hi,
>
> I'm currently building a web-application based on web2py, and I would like
> some insights and advices about its architecture.
> Please, if this forum is not the good place to ask this kind of question,
> just tell me. And if you could point me to some resources/communities that
> could help me, I would be grateful!
>
> Basically, my application will provide services to employees from company.
> Each employees from each company will have an account, and there will be
> different levels of accounts ('simple employee', coordinator,
> administrative staff,...).
> I want the employees to be able to access (read/write according to its
> level account) only to the data of the company he belongs to, not from the
> other. For example, employee 1 from company A cannot see the profile from
> employee 10 from company B.
> There won't be any link between users from different companies.
>
> But now, I'm thinking about the global architecture of the application.
> Here are some ideas:
> * 1 application with 1 DB : the DB contains everything, and the
> application must enforce the isolation of the employees in their own
> company. I think this is possible with Auth, and groups, memberships and
> permissions.
> * 1 application with multiple DB : 1 new DB is created for each company.
> But I don't know if one instance of web2py can handle multiple DB.
> * 1 instance of the application and 1 DB for each company: All the data
> from the companies are isolated from each other by design. This kind of
> architecture seems to perfectly fit Docker : one container per instance of
> the application.
>
> I think that these 3 architectures are possible and all of them have their
> own pros and cons. The first one is the first one I've thought about, it
> seems to be the most instinctive one. The last one is more isolated and
> more scalable, but I'm new to this kind of architecture.
> And you'll certainly think about other possibilities.
> Now, how do I choose the best architecture? Should I target first the
> speed of development of the first version of my application? Or should I
> think about the scalability as soon as possible? Other concerns? Is there
> an architecture that would fit better with web2py than another one?
>
> I don't want you to tell me which on to choose (it'll certainly depend on
> the number of users/companies, the load of the server, the size of the
> data,...) but can you give me some advices, ideas, thoughts based on your
> own experience in web-developpment? Or some link to online resources,
> books,...
>
> Thanks a lot for your help!
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.