From: Anders Bengtsson Date: 2003-05-31T17:59:17+09:00 Subject: Re: Object Prevaylence vs. OODBMS or Madeleine vs. DyBase Brian Candler wrote: > > Maybe I should add a way to access Madeleine's big write lock from the > > outside, if anyone wants to solve things the "global mutex" way. > > Sure. Perhaps you could add a wrapper for the traditional model of a shared > read lock, and an exclusive write lock. (I'm not quite sure how to implement > this; I guess the read lock manager would have to grab the write lock > whenever 1 or more people asked for a read lock, and return it when this > number went to 0, but you want a way to prevent starvation when someone is > waiting for a write lock, e.g. no new readers are allowed until the write > has had a chance) There's a little-known implementation of shared locks in the Ruby distribution called sync.rb, which we've already used for some experiments with Madeleine. It has slightly worse performance than Mutex, but enables some interesting performance optimizations. /Anders -- A n d e r s B e n g t s s o n | ndrsbngtssn@yahoo.se Stockholm, Sweden |