I want to make my own textboard in C fastcgi using files instead of a sql database.
Does it sound like a good fast idea?
I just want it to be blazingly fast.
What do you think /prog/?
Name:
Anonymous2007-06-08 11:31 ID:7541SlLQ
Maybe you could keep everything in memory for fast searching, but also save a file for each thread in the board. Then, when one of the threads is changed/added to, write that to a new file, delete the old file, and rename the new file to match the name of the old one. This prevents huge read-write times if you have a lot of threads, and also prevents anything from being lost if the system shuts down unexpectedly in a power outage or something. And of course, I reccomend getting saving your files on a bunch of cheap drives in a RAID 5 array.
Also, for searching, how about using merge sort and binary search?