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

bbs bump ordered index

Name: Anonymous 2014-04-27 10:21

I'm making a BBS thing without using sql and I'm wondering what's the best way to save the bump order
I'm thinking of having a array-like index that each line has the thread-id but if someone bumps the last thread it has to move everything one line down and insert the last line into the first line
do you have any other way to save the index? how does shiichan/tablecat/non-sql forums/4chan do it?

Name: Anonymous 2014-04-28 11:23

operations to support

* Go to any thread by key
* get a chunk of threads in order by last bump time
* order of last bump time is maintained unless a thread is bumped, in which case it is moved to the front of the list

so is there a data structure that provides:
* random access
* moving an element to the front

very quickly?

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