[Dbix-class] Paging all re nested sets

Matt S Trout dbix-class at trout.me.uk
Thu Apr 10 18:41:45 BST 2008


On Mon, Apr 07, 2008 at 04:12:27PM +0200, Sebastian Willert wrote:
> 
> On Sun, 2008-04-06 at 20:41 +0100, Matt S Trout wrote:
> > On Fri, Apr 04, 2008 at 04:56:57PM +0200, Sebastian Willert wrote:
> > > 
> > > On Thu, 2008-03-27 at 21:53 +0000, Matt S Trout wrote: 
> > > > A bunch of you have asked about nested sets, tried to implement them
> > > > yourself, been told about this, started on ::Tree implementations, not
> > > > had time to carry on, got stuck, forgotten, then somebody else has asked.
> > > 
> > > Guilty as charged, your honor. I still have an half-backed
> > > implementation of DBIx::Class::Tree::NestedSet laying around, that I've
> > > almost forgotten about. In my defense, I'd stopped working on it because
> > > I believe we'd need a good RDBMS-independent locking mechanism (and an
> > > live object index for bonus points) for any nested-set implementation to
> > > become production-ready. In difference to adjacency lists, nested sets
> > > tend to die a horrible dead when used without a good locking strategy
> > > (preferably row-based).
> > 
> > And as I said at the time to you, you believe wrong and could we please
> > just have an implementation that mostly works first?
> > 
> > You basically wasted your time disappearing down a rathole that a lot of
> > yours consumers won't need.
> > 
> > Yes, without an LOI you can end up with dirty objects. But you can always
> > end up with dirty objects in DBIC; that's how it works.
> 
> You are building a straw-man here. I blocked on locking support, not on
> LOI. The sane approach here would be to take Moritz suggestion with
> locking-support factored out into RDBMS-specific subclasses (or, even
> better, delegated to them to avoid mocking around with ISA).

Why locking support? SELECT FOR UPDATE should do the trick shouldn't it?

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the DBIx-Class mailing list