We have made multi-tenant modifications to ofbiz to run on a single VM.  We 
have not contributed this back to the community yet, but plan on it.

In our implementation,  each tenant is running the same application suite, and 
they differ only in the database configurations via the entityengine.xml.  
We've essentially, made "templates" for the entity engine entries that allow 
each tenant to have their own delegator.  This means, depending upon how you 
configure the entityengine.xml file, you can have each tenant have a private 
copy of the entire schema, or share components via the use of entity groups.

There are some limitations in our design choices, that were appropriate for our 
use (for now):

1- We provide each tenant with a separate hostname, and then maintain a 
hostname to delegator name mapping in a "main" database instance.  This is the 
deployment meta data.  This is cumbersome and obviously has some extra 
dependancy on proper DNS configuration.  This can be changed to a modified 
"login" page of some sort.
2- Haven't completed the job manager to have a singleton across tenants.  Right 
now, the job manager is instantiated for each delegator, so, if you have 1000 
tenants, you'd have a 1000 threats.. not scalable.  Plan on fixing that.
3- Each tenant must share the same configuration files, means each tenant must 
be running same "application" or solution.
4- Currently each UserLogin entity is a private entity per tenant.  Makes for 
improved isolation, but harder to manage all the login credentials to the 
system.  We have an LDAP infrastructure and have debated using that for 
credential management.

----- Original Message -----
From: "Henning" <[email protected]>
To: [email protected]
Sent: Thursday, July 2, 2009 7:28:21 AM GMT -05:00 US/Canada Eastern
Subject: Using OfBiz modular, partially, and in many instances

Hi Experts,

  I would like to embed OfBiz with a module environment (not OSGi - but
sufficiently similar to think OSGi if that helps) and for multiple
tenants on one VM. The latter is the the stronger requirement for me.
But as far as modularization is concerned, Ofbiz seems to be in good
shape: The individual logical projects (under framework and
applications) that are all packaged up as one Eclipse project can be
broken up into smaller projects that have a beautiful and meaningful
dependency chain and still compile (at least). Executing them is
probably another story.

  Now in terms of multi-tenant usage, I would love to be able to run
different "instances" of OfBiz within the same server. So every tenant
would get its own OfBiz configuration (including its own data source
configuration). OfBiz features would actually be something additional,
integrated with another application and OfBiz would not be the leading
infastructure.

  I remember having seen some similar discussions on the mailing list
some time ago - they all seemed to go nowhere. To me it seems that using
OfBiz as the fundamental functional underpinning and toolbox for
anything eCommerce is a very natural path to follow, but it should not
have unbreakable ties to exactly one underlying infrastructure. I
understand that OfBiz has spent some effort into creating its own module
system (kind of) - that's perfectly fine and seeing OfBiz run
out-of-the-box after 5min. is perfect. However, other places, other
infrastructures. 

  Anyway, if anybody has a pointer to something that is similar to what
I described above or some success story, it would be great, if you could
let me know. Of course, if there is good reasons why this cannot work
w/o touching OfBiz in an unknown but huge number of places that would
also be valuable information.

  If I end up getting it done myself and if there is interest, I will be
happy to share my experience.

Thanks,
  Henning

Reply via email to