saguaroib / saguaro

saguaro imgboard software
14 stars 5 forks source link

[Proposal] Unified post table #187

Closed Apogate closed 8 years ago

Apogate commented 8 years ago

As a concept for discussion, one fuckhuge post table that could store all the posts for multiple boards. By adding a board identifier column (which I believe exists already) and changing the way post numbers are generated, might have potential.

Possible benefits:

Drawbacks:

Might pursue this idea in a planned dependency-laden fork SaguaroPlus.

stackoverflow here i come

repod grant me your wisdom

Apogate commented 8 years ago

Pretty sure I brought this up before in irc, can't remember where though.

RePod commented 8 years ago

I think Yushe also brought this up in some capacity. I don't like the idea.

Individual boards do not need information about each other, they should only focus on their own data.

A more self-aware saguaro

Exactly, something it doesn't need to be. Multi-board installs walk a fine line but even then they're not sharing data just resources (the _core directory) to achieve consistent results.

There's also a potential security risk where manipulating information on one board could impact another. For instance, if they got SQL injection (per their SQL server's permissions) they could drop the whole table (or worse, obviously).

If you must proceed with it do it but don't make it default. Make it opt-in instead of out.

As for potential features, I cannot think of any that would be hard to implement otherwise.

Apogate commented 8 years ago

We'll keep this repo true to its original intentions then. I'm leaning towards adding this in a fork, could also be combined with the new variable-array-config for cases where changing config values on the fly would be useful (user generated boards etc.)

who knows where the future will take saguaro

RePod commented 8 years ago
(SELECT no,board FROM imgboard WHERE resto=0)
UNION
(SELECT no,board FROM imgboard2 WHERE resto=0)
ORDER BY no ASC
no board
1 saguaro
1 saguaro2
2 saguaro
5 saguaro
7 saguaro2
... ...

There are two downsides to UNION at present:


In regards to your pros/cons list, by using UNION respectively:

Pros:

Cons:

Apogate commented 8 years ago

Unions over a fuck ton of tables pose a technical limitation.