1
1
Fork 0
lemon_board/arch

29 lines
1.9 KiB
Plaintext

This file includes a high-level description of the program's structure:
Frontend and backened are to be separated, this should allow for multiple front-end implementations such as generating output in:
text/html, text/gemini, application/xhtml+xml, text/xml, gopher and even text/plain.
Backend gets post data from a database, and formulates it into a "thread":
A thread consists of an Original Post by an Oririnal Poster (OP).
With subsequent replies sequentially following the OP.
Each post has a unique (monotonically strictly increasing) ID.
And ID numbers are determined per-board.
Thus, IDs can be used to cross-reference posts.
Each board consists of a number of OPs.
With the order being of how "fresh" the replies are:
The thread with the latest reply is the top thread and the order goes in a decreasing manner according to the thread's latest reply time.
For lack of confusion, seconds from the Unix Epoch shall be used to track time.
Front-ends shall query the backend for the relevant board and thread structs and then synthesize their output.
Front-ends that support posting shall also pass the data along to the back-end:
If there is a new thread, then a thread struct gets passed.
If there is a new post in a thread, then a post struct gets passed.
Front-ends shall be implemented as the implementers see fit, but the official implementations will use the following scheme:
Each front-end shall have a top-level directory thereof where all the generated output is contained (configurable in main daemon config file).
Each such top-level directory shall have board directories contained within (with names corresponding to the boards).
Each such board directory shall have active thread files, each of which is named after the OP ID.
Each such thread file will be made up of several lines, where each line is a post, in sequential order.
Note that file generation thresholds (interval/number of posts) will be configurable through the main daemon config file.