Re: Multi-Tenant Data Architecture
Re: Multi-Tenant Data Architecture
- Subject: Re: Multi-Tenant Data Architecture
- From: Guido Neitzer <email@hidden>
- Date: Tue, 22 Sep 2009 18:24:02 -0700
On Sep 22, 2009, at 4:34 PM, Chuck Hill wrote:
- some increase in RAM usage due to duplicated loading of code and
JVM
If you don't want to do that and are committed to doing this in
one instance, the next best way is to tag the root object with the
tenant. But you said "separate databases", so that is ruled out.
You mean data categorized by tenant?
Yes.
I did something like this a while ago and it was actually pretty
simple to come up with a model that worked for the situation we had:
- all (!) entities have a client (tenant?) relationship
- this is set along with audit information in awakeFromInsertion
(init) automatically as every user belongs to a client
- the app automatically limits fetches with restricting qualifiers
(D2W app)
- if an object gets fetched and it's awakeFromFetch is called and the
client of this object and the client of the current user don't match,
it throws a fatal exception, the users session is logged (every single
action), the stack trace is logged, and the session terminated
- I don't use any raw row fetching at all
This worked quite well, the app didn't have many clients but I never
had any complaints about data being shown that shouldn't have been
shown. If you are really determined you could make sure on a per call
basis, that no data is accessed from a different client.
Guido
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden