FlexHub Forum

MySQL Database Functionality

MySQL Database Functionality
« on: September 30, 2009, 00:59:38 »
It would be nice if FlexHub had the capability to use a MySQL database to store it's information as opposed to just a flat-file.
This should help improve the speeds of certain operations, and from my limited knowledge not take too much extra work.
Would this be possible to implement?

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Re: MySQL Database Functionality
« Reply #1 on: September 30, 2009, 07:42:05 »
Hi Wolfbane, welcome to the forum!

It is certainly possible, and it has it's benefits, but I don't think that speed will be improved.
I've done some tests some time ago (might not be the current version) with LuaSQL and it looked rather slow to me compared to writing to a file.
I'll have a test again soon to see if that's still the case, if it's fast enough an option could be added to store stuff in MySQL instead of files.

I want to keep the option to store stuff in flat files, because most Windows hubowners don't have a MySQL-database running. And since ease of use is a key issue for the development of Flexhub, I don't want to force owners to install MySQL to be able to run Flexhub.
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Re: MySQL Database Functionality
« Reply #2 on: September 30, 2009, 16:42:14 »
I thought it would be useful for people with forums or other web software that use MySQL to store user credentials already, so they wouldn't have to re-reg on the Hub.  That is a good point about Windows though, I hadn't thought of that.  Especially if the speed increase is not beneficial then you're right to stick with flat-files!

Thanks for the quick reply & Welcome :-)

Re: MySQL Database Functionality
« Reply #3 on: November 20, 2009, 11:33:04 »
Historically a flat file is faster for small 'databases'. SQL [of whatever flavor] is faster on exceedingly large databases.

Re: MySQL Database Functionality
« Reply #4 on: November 26, 2009, 19:26:18 »
the format of the hubregs file is quite simple, so if anyone wanted to write a php script to access the information from a forum running on the same server that would hardly pose a huge problem. Making them actually communicate with eachother would be an interesting task though :)

Now that is an idea for an upcoming hub bot project maybe ;)