Messages in a file - why? [message #7162] |
Sat, 09 November 2002 00:59 |
KVentz
Messages: 65 Registered: November 2002 Location: Moscow, Russia
Karma: 0
|
Member |
|
|
I have found that FUD forum stores messages bodies separately from headers in a single text file and forum searches message by (start char, length) coordinates.
Why not to store messages bodies with headers in MySQL table? Was it made for productivity or something?
|
|
|
|
Re: Messages in a file - why? [message #7181 is a reply to message #7162] |
Sat, 09 November 2002 20:21 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
KVentz schrieb am Sam, 09 November 2002 01:59 | I have found that FUD forum stores messages bodies separately from headers in a single text file and forum searches message by (start char, length) coordinates.
Why not to store messages bodies with headers in MySQL table? Was it made for productivity or something?
|
phpBB stores messages the way u described. The result is, that on high load the forum will become awfully slow, even if it would run with UNIX sockets. Saving messages into a file bypasses this restriction in favour of speed.
bye
Olliver
|
|
|
|
Re: Messages in a file - why? [message #10769 is a reply to message #10768] |
Mon, 09 June 2003 20:59 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Here you are wrong, MySQL in a default setup is fast because it does not sync data to disk right away and rather stores it in memory. A sudden system failure will result in a data loss.
The entire file is unlikely to be corrupted unless you start manually tinkering with it, at worse you could risk loosing a single message.
The data to proves it comes from numerous benchmarks conducted at the time of implementation of this solution. As far as conversion, I fail to see how this would cause any difficulties. As long as you use the fud_msg_edit->add() or fud_msg_edit->add_reply() methods the actual message creation & writing of the body will be handled by the forum internally.
FUDforum Core Developer
|
|
|