Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How to write imageboard

Name: Anonymous 2010-08-28 20:32

Hello,
I found out that kusaba x is pretty old shit. What's this whole think about generating html files? Can't it be done simply by sql queries every time and do it with some ajax? How would you write it?

Name: Anonymous 2010-08-31 20:13

>>31
When generating the index pages, you practically have to fetch every post in order to sort and maintain thread order, count omitted files and so on. You might as well rape the DB once per post instead of continually whenever a 404 occurs.

Also, if you do it strictly the way you described, it's quite easy to do something subtly wrong, such that you end up with lingering thread pages for old threads that were rolled off the board.

On top of that, if you use a strict queue, you're presumably not generating the pages right as posts are made, so there's a possibility that someone will post a new thread and then find it 404'd, unless I've misunderstood your description. If you're doing this on demand, you'd be better off writing to an html file and then using a sendfile()-like method directly afterward to send it to the client. A work queue is not the right way to go about this.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List