• 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: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Miguel Arroz <email@hidden>
  • Date: Thu, 3 Dec 2009 21:06:53 +0000

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/ > ;)


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.


  Yours

Miguel Arroz

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
      • From: Kieran Kelleher <email@hidden>
References: 
 >Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Kieran Kelleher <email@hidden>)
 >Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Anjo Krank <email@hidden>)
 >Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Miguel Arroz <email@hidden>)
 >Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Anjo Krank <email@hidden>)
 >Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Miguel Arroz <email@hidden>)
 >Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Anjo Krank <email@hidden>)
 >Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Miguel Arroz <email@hidden>)
 >Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?] (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
  • Next by Date: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
  • Previous by thread: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
  • Next by thread: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
  • Index(es):
    • Date
    • Thread