You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Dan Haywood <da...@haywood-associates.co.uk> on 2016/06/01 08:21:40 UTC

Re: Mult-Tenancy

Just to come back on this... the way in which Isis picks up its metadata is
pluggable (the FacetFactory internal API).

Most of the metadata comes from the domain objects themselves, of course,
with those domain objects providing the implementation of state management,
at least.  But we also bring in metadata from contributed actions/mixins,
and the .layout.xml files.

All that said, we are quite tightly coupled to the ORM (DataNucleus).  So
support for multi-tenancy is to a large extent governed by what it
supports; and I don't think this is likely to change soon.

Thx
Dan


On 23 May 2016 at 05:40, sunand p <su...@gmail.com> wrote:

> Thank you for your response, there are 2 problems which comes to my mind
> when I think of Apache Isis as a platform. This question may not be
> applicable to this group as such still for people interested can have a
> look,
>
> 1) How do I manage schema per tenant using DDD? Since the metadata is
> derived from Domain Objects?
> 2) As you pointed out hosting multiple webapps using docker will be the way
> to go but surely an hybrid approach is required lets say shared instance
> for Sandbox environment and dedicated instance for Production environment.
>
> When I see a platform like Salesforce (if you not have heard about it
> please look here *http://www.salesforce.com/in/what-is-salesforce/
> <http://www.salesforce.com/in/what-is-salesforce/> *and here*
> https://en.wikipedia.org/wiki/Salesforce.com#Force.com
> <https://en.wikipedia.org/wiki/Salesforce.com#Force.com>*) Ideally what
> they do is allow developers to create a dev account and they are
> provisioned with an instance which gives abilities to create tables, fields
> and write a program solving certain business problem.The objects by default
> will have an UI which will list the objects and allow CRUD on the same and
> much more.
>
> (Not an apple to apple comparison) In comparison what Apache ISIS provides
> is domain objects using which we draw the UI and allow CRUD on top of it.
> Now the way Salesforce manage metadata is completely different than how
> this tool does and they have solved the problem mentioned above. Just
> trying to brainstorm.
>
> Cheers!
> Sunand
>
>
>
> On Fri, May 20, 2016 at 6:04 PM, Jeroen van der Wal <je...@stromboli.it>
> wrote:
>
> > If a customer wants to have it's data in a separate db I would always
> > deploy a dedicated webapp instance alongside. It's going to be a messy
> > architecture if multiple instances of the same webapp (I reckon you are
> > aiming for scalability too) must access multiple databases or database
> > instances.
> >
> > Docker would be the way to go.
> >
> > On 19 May 2016 at 06:19, sunand p <su...@gmail.com> wrote:
> >
> > > Use Case:
> > >
> > > Consider I am creating a platform where Multiple Organization with
> Users
> > > belong to each organization should not see each other's data.
> > > For example, Customer1 having 10 Users and Customer2 having 2 user sign
> > in
> > > to our Apache Isis generated app, now customer1 prefers to isolate the
> > data
> > > by keeping it in a separate Database since he doesn't want to host
> their
> > > data on a shared DB (Option 3).
> > >
> > > Do we have a notion of Users belonging to an Organization in our Apache
> > > Isis Security module? Ideally multi-tenancy should allow me to create a
> > > tenant first and then its users with special configuration like
> separate
> > > DB, roles, permissions etc.
> > >
> > > In the end, I want to support a multi-tenant environment where I should
> > be
> > > able to isolate my tenant's data in a separate DB altogether.
> > >
> > > Does this make sense?
> > >
> > >
> > > On Thu, May 19, 2016 at 2:20 AM, Jeroen van der Wal <
> jeroen@stromboli.it
> > >
> > > wrote:
> > >
> > > > Hi Sunand,
> > > >
> > > > Because we needed more sophistication we've gone for option 3 and not
> > > > implemented 1 and 2 but Datanucleus should be able to support those
> > > > scenarios  [1]. What use case are your trying to solve?
> > > >
> > > > Cheers,
> > > >
> > > > Jeroen
> > > >
> > > > [1]
> > > >
> > > >
> > >
> >
> http://www.datanucleus.org/products/accessplatform_3_1/rdbms/multitenancy.html
> > > >
> > > >
> > > >
> > > > On 18 May 2016 at 19:08, sunand p <su...@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > We have Isis-Security module as an addon which provides
> multi-tenancy
> > > > > feature. Presently multi-tenancy as I understand is with respect to
> > > > > associating an user to a tenant and assigning roles and
> permissions.
> > > > "*Each
> > > > > user can be associated with a particular tenancy, and Isis can then
> > be
> > > > > configured such that they cannot access data in other tenancies*"
> > > > >
> > > > > As for data, multi-tenancy is achieved via following ways,
> > > > >
> > > > > 1) Have a separate schema per tenant and have the tables created
> > within
> > > > the
> > > > > schema and refer to it as (for example) *tenant1_schema.table1*
> > > > >
> > > > > 2) Have a separate database assigned to a tenant and keep all the
> > data
> > > in
> > > > > that DB.
> > > > >
> > > > > 3) Store all data in one table and have a tenant id discriminator.
> > > > Include
> > > > > the discriminator in the query framework after resolving a tenant
> add
> > > the
> > > > > where clause to each query (For example) Select * from Table1 where
> > > > > tenantId = 'tenant1'
> > > > >
> > > > > As for Apache Isis how can I support Option 1 and Option 2 in the
> > > current
> > > > > framework?
> > > > >
> > > >
> > >
> >
>