[Dbix-class] Paging all re nested sets

Matt S Trout dbix-class at trout.me.uk
Sun Apr 6 20:41:19 BST 2008


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: 
> > MojoMojo has a complete nested set implementation in the Page DBIC class.
> > 
> > DBIx::Class::Tree provides a suitable tree API.
> > 
> > There is a nested set branch of DBIx::Class::Tree which I will happily
> > give out commits bits to on request.
> > 
> > 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.

Especially for web applications, dirty objects really don't matter since your
request cycle tends to be "load some data, perform an update, throw the
objects away".

Stop overengineering and put some damn code in the repo :P

-- 
      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