• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Multi-Tenant Data Architecture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-Tenant Data Architecture


  • Subject: Re: Multi-Tenant Data Architecture
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 21 Sep 2009 12:38:07 -0700

Hi Henrique,

On Sep 19, 2009, at 8:09 AM, Henrique Prange wrote:

Hi all,

Is there a way to configure EOF to access separate databases for each tenant in *one* application?

I'm working in an application that has a strong non-functional requirement on multi-tenant architecture with isolated database access.

I've seen some discussion related with this subject, but it was not clear to me how could I implement this kind of stuff.

Any directions are really appreciated.


The easiest, and perhaps best, way to do this is to have different instances for each tenant. The configuration (in JavaMonitor or elsewhere) can then specify the database.

Pros:
- easy
- problems / load on one tenant do not impact others
- guaranteed that one tenant will not accidently see information from another



Cons: - more instances to administer - 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.


The only way that I can think of to accomplish what you want is to create an EOModelGroup for each tenant. A separate copy of each model will need to be loaded into each group and the database connection information set for that tenant. Each EOModelGroup will serve as the basis for a new EOF stack (rooted at EOObjectStoreCoordinator). When a session is created, you will need to ensure that all editing contexts created for that session use the correct EOObjectStoreCoordinator. You will also want to ensure that you don't use default<Anything> in your code (defaultEditingContext(), defaultModelGroup() etc.) as these are unlikey to return objects from the correct EOF stack. Caveat: this is theoretical, I don't have any experience doing this. I don't think that many people have done this, so you run the risk of finding bugs in seldom executed EOF code.


Chuck


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








_______________________________________________
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


  • Follow-Ups:
    • Re: Multi-Tenant Data Architecture
      • From: Henrique Prange <email@hidden>
References: 
 >Multi-Tenant Data Architecture (From: Henrique Prange <email@hidden>)

  • Prev by Date: Default form value encoding was changed after parsing multi-part form. Form values will be lost.
  • Next by Date: Re: Default form value encoding was changed after parsing multi-part form. Form values will be lost.
  • Previous by thread: Multi-Tenant Data Architecture
  • Next by thread: Re: Multi-Tenant Data Architecture
  • Index(es):
    • Date
    • Thread