Arc Forumnew | comments | leaders | submitlogin
3 points by krapp 51 days ago | link | parent

Nested comment systems tend to use one of two patterns - both of which assume you're using a relational database. Arc forums doesn't, which IMO greatly reduces flexibility in exchange for Lisp purity.

The most common pattern is the "adjacency list" model[0]. Every entry has an ID and parent ID, at least. You can also include an "origin" ID for the root of the tree. For this, you need to build an entire thread with recursive queries (for each ID, get children of ID, etc.) HN and other Arc based forum use this.

Slightly more involved is the "nested set" model[1] which actually maintains a balanced tree. It's easier to query an entire tree than with the adjacency list, but insertions and deletions are more costly.