Live data from Hacker News

Ask HN: Is it possible to have forum type community running without a database?

news.ycombinator.com

61–66 of 66 posts

Re: Ask HN: Is it possible to have forum type community running without a database?

#61
post #60
post #58

Once upon a time, when I was playing around with Perl on Tripod, I wrote a very very basic forum with a flat-file "database". Essentially each "post" was a single delimiter-separated line (yes - posts were oneliners because everything was done through GET queries and I didn't know any better) in a text file holding an id, parent id and the post content. As an actual implementation, of course, it was horrifying and te…

You are correct about the Matt's Script Archive forum. I ran a few 10,000+ message forums back in the late 90's that were based off it. They ran mostly without any issues and only occasionally you would find a parent node's tree was not saved correctly and truncated. In most cases this could be manually repaired. The biggest issue was archiving as the main file would need to be manually edited to remove older threads…

Oh wow... and I even found a few of those Matt's Script Archive forums still running, too. So much nostalgia..

Re: Ask HN: Is it possible to have forum type community running without a database?

#63

Several people have made use of a lightweight webserver like Lighttpd in combination with PHP/SQLite in order to set up boards or wordpress installations on Raspberry Pis. Would that be something for you?

Another lightweight stack would be Openresty. Scripting nginx with lua. Both blazing fast. Lapis might be an appropriate web framework to start developing with.

Re: Ask HN: Is it possible to have forum type community running without a database?

#64
post #61
post #60

Earlier quoted context omitted.

You are correct about the Matt's Script Archive forum. I ran a few 10,000+ message forums back in the late 90's that were based off it. They ran mostly without any issues and only occasionally you would find a parent node's tree was not saved correctly and truncated. In most cases this could be manually repaired. The biggest issue was archiving as the main file would need to be manually edited to remove older threads…

Oh wow... and I even found a few of those Matt's Script Archive forums still running, too. So much nostalgia..

The Golden Age of Webmasters!

Re: Ask HN: Is it possible to have forum type community running without a database?

#66
post #53

So I wondered if it is possible to run a forum type community - something along the lines of [elgg][1] or [Friendica][2] - but without the MySQL or other type of database backend? You're attempting to optimize the wrong part of the architecture, I think. A simple read-only query to SQLite or a NoSQL database is fast - generally just a few milliseconds and often less than one millisecond. The odds of you doing it much…

I think this is the best answer right now. Just build your forum the way you would do it normally and aggressively cache. One addition I would make. Don't cache HTML, cache JSON responses, and build your forum as a one page app. This will allow you to have every response cached while still having customized pages per user (i.e. you could have a user profile on the page that shows a thread).

Good idea. Caching JSON responses as opposed to rendered HTML makes a lot of sense when the server has little RAM.
Post reply on HN