[geeklog-devel] Draft of schema for GL2

Tony Bibbs tony at tonybibbs.com
Thu Dec 16 15:26:51 EST 2004


Gotcha.  Ok, so I'll yank the parent_id out altogether.

This is sweet.  Yeah, drawing a picture would probably help.

--Tony

Vincent Furia wrote:

>Whatever names you think best.  I just have a continuing giant brain
>fart whenever I try to think of new names for those...
>
>For a new comment, the value of leftIndex is the parent comments
>rightIndex.  The value of rightIndex is the parent comments rightIndex
>+ 1.  All Indexes (left and right) for all comments that have a value
>greater than the new comments leftIndex are increased by two.  I guess
>I need to explain that better in my article.
>
>You might want to draw some pictures.  I had to do that a lot to prove
>to myself that inserts and deletes would always work.
>
>Also if you use this algorithm you technically don't need the pid
>column (the parent id can be found easily given the left and right
>indexes of a child comment).  I left the pid column in 1.3.x so I
>wouldn't need to rewrite even more comment code.
>
>-Vinny
>
>
>On Thu, 16 Dec 2004 13:52:27 -0600, Tony Bibbs <tony at tonybibbs.com> wrote:
>  
>
>>In the table on this page:
>>
>>http://vinny.furiafamily.com/article.php?story=20041129154258296
>>
>>How does a new comment get it's rht, lft values?  I'm fuzzy on that.
>>Anyway, it looks good to me.  For column names in GL2 how about
>>leftIndex and rightIndex?
>>
>>--Tony
>>
>>How do you know what the rht
>>Vincent Furia wrote:
>>
>>    
>>
>>>I didn't look at slashcode.  But most other CMSs I looked at just grab
>>>all the comments from the DB and use a recursive php algorithm.  I
>>>didn't see any that had an efficient (or smart) way of grabbing
>>>comments.
>>>
>>>The implementation is original, the algorithm was spelled out in a
>>>couple different places with slight variations in the details.
>>>
>>>-Vinny
>>>
>>>
>>>On Thu, 16 Dec 2004 13:35:07 -0600, Tony Bibbs <tony at tonybibbs.com> wrote:
>>>
>>>
>>>      
>>>
>>>>Vincent Furia wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Yes.  If you look in the geeklog code for calls to SEC_inGroup() it is
>>>>>really only used for the  Root group.  Most of the other instance
>>>>>where it is used it is used against a group id variable.  The
>>>>>remainder I would argue are redundant if we better respected
>>>>>privileges in 1.3.x.  I'd recommend a "isRoot" function, but I think
>>>>>"inGroup" is really not needed except when actually administering
>>>>>group membership.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>Ok, I say we yank it...adding that column in if deemed appropriate isn't
>>>>too hard.
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Better names for those columns wouldn't hurt, I just couldn't come up
>>>>>with anything better when I was implementing it in 1.3.x.  I looked
>>>>>around at other algorithms when I was first looking into improving the
>>>>>performance of comments and didn't find anything better.  If you do
>>>>>find something let me know.  This was, by far, the best I found.  The
>>>>>biggest downside is that I had to lock the table during inserts, but
>>>>>that is really OBE since we can use transactions.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>Was this an original implementation or was it one you borrowed from
>>>>someplace?  WTF does slashcode use...you'd think they'd have to have
>>>>this issue nailed down by now.
>>>>
>>>>--Tony
>>>>_______________________________________________
>>>>geeklog-devel mailing list
>>>>geeklog-devel at lists.geeklog.net
>>>>http://lists.geeklog.net/listinfo/geeklog-devel
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>_______________________________________________
>>>geeklog-devel mailing list
>>>geeklog-devel at lists.geeklog.net
>>>http://lists.geeklog.net/listinfo/geeklog-devel
>>>
>>>
>>>      
>>>
>>_______________________________________________
>>geeklog-devel mailing list
>>geeklog-devel at lists.geeklog.net
>>http://lists.geeklog.net/listinfo/geeklog-devel
>>
>>    
>>
>_______________________________________________
>geeklog-devel mailing list
>geeklog-devel at lists.geeklog.net
>http://lists.geeklog.net/listinfo/geeklog-devel
>  
>




More information about the geeklog-devel mailing list