Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
- Subject: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
- From: Kieran Kelleher <email@hidden>
- Date: Thu, 3 Dec 2009 17:32:13 -0500
On Dec 3, 2009, at 4:06 PM, Miguel Arroz wrote:
Hi!
On 2009/12/03, at 20:53, Kieran Kelleher wrote:
1) Yes, there is a ERXJDBCConnectionBroker that does what you say.
I have not used it though.
I must check that.
2) Creating another OSC is not much overhead (IMHO) itself ......
it is all the EO's and snapshots that are the overhead.
I know, but creating a DB connection is, specially under heavy load
(I don't want to create and destroy dozens of connections per
second!). The snapshots would not worry me too much, in a critical
section, you would have only the snapshots you really needed, and
you would dispose the OSC after doing your stuff.
I create new OSCs for most background tasks. The one thing is that
I dispose() on it at the end of the task .... and the dispose() is
only useful if you use ERXJDBCAdaptor is used since the regular WO
5.3 jdbc adaptor opens two connections for every OSC and leaves the
stupid things open forever. ERXJDBCAdaptor only opens one db
connection and releases it when u call dispose() IIRC.
Dude! <http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/
> ;)
Dude! www.mysql.com - innodb (or cluster NDB) .... doesn't "grow and
grow" (and it is not a "toy", no matter what Chuck says ;-) )
3) If you use OSC synchronization (ERXOSCSynchronizer and
ERJGroupsSync) you will still haev the problem of snapshots
changing underneath you if you don't lock the OSC. So IMHO, the
OptimisticLockAction approach works well ..... and if the approach
"ain't broke, why fix it" :-)
I don't use the synchronizer... I think it increases the
concurrency chaos by several orders of magnitude. :) Anyway, those
"critical" OSCs would not synchronize, as that would defeat their
purpose.
I think the change notifications synchronize after you unlock the osc,
but I might be mistaken. Perhaps Mike S might shed light on whether a
locked OSC ignores changes or just gets those notifications when it
gets unlocked. Looking at ERXObjectStoreCoordinatorSynchronizer src
does not enlighten me quickly I'm afraid.
Yours
Miguel Arroz
_______________________________________________
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