Save Ukraine

Classic Forum: CouchDB?

Christian Kruse,

The last few months I thought about giving up the concept of a forum server managing the data and the CGI clients presenting the data to the user. Instead I was thinking about using CouchDB as a database server. When I wrote the Classic Forum there was no such docuent-oriented database. There was Lotus Notes, and one surely doesn't want to use Lotus Notes ;-)

To get to my decision I imported the whole forum archive of SELFHTML, the resulting database file has 3GB. I used this script to import the data. I did several benchmarks and it was very obvious, that the old Classic Forum 3.4 series has a serious locking problem: while the CouchDB answered every request quite reliable the fo_server process simply stopped answering anything. I think there is a dead lock somewhere which I didn't discover yet.

After playing around a little bit with CouchDB I am now convinced: CouchDB is the way to go, for the following reasons:

  • First of all, we no longer need the fo_server process. This removes a lot of complexity from the code.
  • With using CouchDB we buy also scaling. One can simply stick several CouchDB servers together and everything just works.
  • We get a database which is quite fine for forum data (hierarchical data, loose data), so the old reason not to use a database just disappeared
  • We get a lot more reliability: CouchDB guarantees that no data gets lost (well, of course there can be hardware failures)
  • The access method (nearly all access is accessing the document by the key) is very natural and fast for CouchDB

All in all I'm convinced that this is the correct and right decision.