Forum Moderators: coopster
I am 50% through of coding a new BBS using PHP.
I started the script with flat-file system since I believe it would offer better opportunity for people to host their BBS on server without having to pay extra for database backend.
I have heard a lot of comments about using a database instead.
I believe that:
Databases were designed primarily for applications that use a great number of 'small' but 'relational' data cells.
Many parts of a BBS would fall within that category but posts themselves do not.
Database on the other hand has it own limitations.
To start with, it is another application that is running on the system which will share memory and resources. It has limits on the number of connections. Many users have already come across that when trying to connect to busy databases.
I have seen the 'rush' to shove everything into a database. I have seen fairly static websites stored on databases. It would be a lot faster and more efficient to output an 'txt' or 'html' doc via simple 'include()' rather than getting the same chunk of data from a database. The larger the chunk of data gets, the less useful a database may prove to be.
I trust [and it has to be proven later] that a well designed script could accomplish what is required without the extra overheads.
It would also be advantageous for the users as the number of free or cheap hosts with PHP and database are very limited.
BTW, some servers prefer the use of DB since besides charging extra for it, they can limit the connections and thus bandwidth.
Another handicap with databases is the backing up the board. I am designing the board so that it could be updated or backed up via ftp. Backing up from database would have limitations set by the server, php.ini and database. You will find many administrators have reservation as they can not back up databases of more that 2 MB. While that would be huge database if the data stored on individual cells were small, in case of BBS; that does not amount to anything.
I have read the comments by Brett_Tabke [Administrator] at:
[webmasterworld.com...]
Also:
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[lists.evolt.org...]
I am not 100% sure now. I look forward to further debate of pros and cons of using Database for BBS application only.
Many thanks
G.
:)
[edited by: jatar_k at 12:07 am (utc) on Jan. 15, 2004]
[edit reason] no personal urls thanks [/edit]
I can open a flat file DB in a plain text editor, do a global find and replace, and check the results, without having to operate through a "database program" front end. I can actually open up a plain text document, and see my data sitting there, unadorned with fancy user interface wingdings. It's not pretty, but it's there.I like being able to see the code for my web pages and my cgi scripts, and I like being able to see the data in my database, without having to go through a specialized program to touch it.
I couldn't put this better. These are the exact reasons I am using flatfiles to control about 20 sites I do right now, many of which share some data.
You can add to that reasons like if you leave the site and someone else takes it over the skill level required is a bit lower, and all the data is right there for them to look at.
When I switched these sites over last month to more or less fully programmed, I thought about using databases but just couldn't see a way to really justify that, except where a control panel type feature might be required.
I use arrays in flatfiles, some heredoc type stuff, some include addresses, everything loads only once per page, is stuck into static variables that are passed along to the various page control functions, so nothing is requested more than one time.
I tested these pages on Opera 5, which has basically zero processing time to generate the page, and I could see no lag whatsoever.
You mean those threads and this board aren't debate enough already? You seem to have done your homework and have a good idea of structure and purpose as well as target (audience). Have you also considered growth?
This debate can and will be ongoing for quite some time. There are good arguments for both as you have no doubt encountered as you have asked for specifics especially when it comes to BBS. WebmasterWorld is one of the faster, better performing BBS systems available. And there is a reason Brett Tabke chose his route and that was based on, among other things, trial and error. When growth and performance and data access didn't meet his level of standards, he went back and reworked his software. It's not an easy undertaking, by any means and I'm sure if you asked him he would willingly agree. Who knows, as databases, operating systems and technology in general advance, the tide may turn, even for the solution we are using here today and he may end up pushing the flat files into a DBMS! Sooner or later we all have to get off the fence and commit.
Well, enough rambling. Bottom line is going to come down to your (and your audience's) expectation of the software. Is it meeting the needs in a timely, efficient manner?
I have found more debate on the subject:
[forums.devshed.com ]
[discuss.fogcreek.com ]
[phpbuilder.com ]
G Groups [groups.google.com]
This is my responce to the same post in another forums:
-----------------------------------
Having looked at the comments by Brett_Tabke Administrator of Webmasterwolrd, it makes me wonder.
They have passed 1,000,000 posts mark back in Dec 2003. They do seem to be very busy and as per the first link in my original post, they use flat-file system for their forum.
Their forum seems to be very fast and efficient and frankly, I was impressed.
I can not say how many users they have or how many are on line but the speed with which they served pages is as good as any database driven BBS that I have seen.
I must admit that in one specific area, DB has advantage over flat-file and that is 'search'.
I am basing my approach on the fact that there are more page-views than 'searches' so gaining efficacy in page-view [refer to same post as mentioned] at the expense of slow/resource-hungry searches maybe a worthwhile trade, considering everything.
Having said that, Webmasterwolrd's search seems to be fast enough with 1,000,000 posts to search. I don't know what they are using though.
I look forward to further comments.
:)
-----------------------------------
PS. jatar_k: Sorry. I was not aware of the rule. I included the url merely for information.
:)
[edited by: jatar_k at 4:52 pm (utc) on Jan. 16, 2004]
[edit reason] fixed sidescroll [/edit]
Having said that, Webmasterworld's search seems to be fast enough with 1,000,000 posts to search.
I think most would agree (including Brett) that the site search often leaves something to be desired.
One consolation is that the site is so well indexed that Google/AllTheWeb etc work great. This thread [webmasterworld.com] has some search tips and tricks.