FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » another proposal: use DB to store post messages
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
another proposal: use DB to store post messages [message #8241] Sat, 18 January 2003 17:34 Go to previous message
laser is currently offline  laser   China
Messages: 9
Registered: January 2003
Karma:
Junior Member
After tracking the code for a few hours, I finally find out that the forum's messages all store in a file in forum/messages/ dir,
I think it would be some benefits to store these messages, and even those attachements, into DB:

1, it would be very easy to back, upgrade and move those data form one site to another: we just dump the data from DB, and then reload it into new DB using DB's tools would be enough.

2, it would be more easy to cope different encoding.

3, we coulde use more generalized full index engine from DB to do search for us, (like Openfts in sourceforge.net), thus avoid
our hard work.

4, the code would be more clear.

5, we won't worry about the file size again, no metter on what OS/file system, the file size are maintained by DB, not ourself.

and maybe some more.

The draw back:

may be the speed would slow down a bit.

I've make some changes to my test forum, now it could use DB to store messages well. It seems the changes are minors: I add a msg_body column to {prefix}msg table, type "text" (PostgreSQL's CLOB type), then make some revise in php code to use it. It's a ugly hack (comment out some write_body() call and some read_msg_body() call, replaced with the value from query result), just to see if it works, maybe need to rethought about the DB schema and the code arrange, but if necessary, I could post those files here.

any comment are appreciated.

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How do I get error messages?
Next Topic: A question about FUD API
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Oct 31 20:16:25 GMT 2024

Total time taken to generate the page: 0.03962 seconds