• 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: Per Session model connection and EOCooperatingObjectStore
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Per Session model connection and EOCooperatingObjectStore


  • Subject: Re: Per Session model connection and EOCooperatingObjectStore
  • From: Susanne Schneider <email@hidden>
  • Date: Wed, 04 Mar 2009 11:24:35 +0100

Hi Larry,

how many different users do you have in mind? We have a similar approach with different schemes (rather than complete database) per "customer" (as we call them). The number of our customers is normally far less than 100.
Instead of connecting them on a session base we build up an eomodel for each customer during application startup and connects them to the appropriate database schemes. So they are all in the same eomodel group and share the same eof stack. In that case we "only" have to deal with nameing conventions to distinguish between the models and entities for the enterprise objects.


The disadvantage of our approach is a relative great overhead of eomodels and entities hold in memory. And even the connections to the database could exceed the standard settings of the (in our case Oracle) database. The advantage is that they share the same eof stack.

In your approach there would be a separate eof stack for the modelgroups of each user with a current session. I would suppose that if many users are logged in simultanously this could become very memory consuming. And maybe you could get problems with data getting out of synch between the different eof stacks.

Regards,
Susanne


On Mar 3, 2009, at 10:46 AM, Larry Mills-Gahl wrote:

On Mar 3, 2009, at  11:24 AM, Chuck Hill wrote:

On Mar 3, 2009, at 8:02 AM, Laurence Mills-Gahl wrote:

I am going around in circles with a per-session eomodel connection and I am looking for advice.

I have two models. One with data common to all application sessions and one with data that should be used for connecting to a database determined by data in the common model. This is the same as the setup in EOEditingContext docs "Getting Data from Multiple Sources". The difference is that one of the models is a per- session connection model
That is a very, very large difference.


and the other is (or at least can be) consistently connected to a single database.
That is not how EOF works.

Forgive me for misspeaking. What I should have said to be more clear is that the common model does not need to have it's connection dictionary changed at runtime (based on some action of the user in a session). That is what I meant by saying it can be consistently connected to a single database.

I was thinking more that regardless of which database it is connected to, it needs to be in each model group if there are relationships between it and the dynamically connected models.



The problem that I am running into is in changing the connection of the session specific model and running into adaptorChannel problems. I feel like I'm facing the wrong direction in looking for an answer because the usual answer to my questions about webobjects is that someone has figured this out before and it is much more straight forward than I can see at the moment.

Should I be looking to remove the EOCooperatingObjectStore related to the dynamic model, create a new one, add it to the EOObjectStoreCoordinator for the session editing context? Does anybody have any advice or examples or docs that might help with this?
You will need to create a new EOModelGroup, load the dynamic model into it, modify the dynamic model, and create a new EOF stack using the model group for each session. If you are doing this, the EOF default*() methods are to be avoided. I'd really try and find another way to do this.


Thank you for the comments. I am looking for another way to do this and have not thought of a way other than to either flatten everybody into one database (which is not a good idea for this app) or duplicate all of the common data in every database (which is possible, but inefficient and adds another management task to keep the common data in sync)


Does avoiding the default* methods include avoiding the Sessions defaultEditingContext() if I setup the defaultEditingContext like:

EOObjectStoreCoordinator osc = new EOObjectStoreCoordinator();
this.setDefaultEditingContext(new EOEditingContext(osc));

If you change it like that, it is not longer the default. :-) So yes, that will work.



Chuck



--
Susanne Schneider
Coordinator secuTrial Development

iAS interActive Systems GmbH
Dieffenbachstraße 33 c, D-10967 Berlin

fon    +49(0)30 22 50 50 - 498
fax    +49(0)30 22 50 50 - 451
mail   email@hidden
web    http://www.interActive-Systems.de

----------------------------------------------------
Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche
Sitz der Gesellschaft: Berlin
Amtsgericht Berlin Charlottenburg, HRB 106103B
----------------------------------------------------
_______________________________________________
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


  • Prev by Date: Re: Per Session model connection and EOCooperatingObjectStore
  • Next by Date: Re: oops, EditingContext disposed?
  • Previous by thread: Re: Per Session model connection and EOCooperatingObjectStore
  • Next by thread: NSData Character Stream
  • Index(es):
    • Date
    • Thread