PDA

View Full Version : MySQL database support for server list?


xOR
11-09-2008, 22:14
please vote whether you would want to see MySQL support for the server list. this would mean the server data is in database tables that are read for all of your servers, so you only need to change the list once and all servers use that automatically.
of course if your servers are on different machines it might become complicated.

i leave this thread open so you can explain your position in detail.

chris
11-09-2008, 22:52
Yes

bmann_420
11-10-2008, 00:13
For sure :D

Leaving a cvar open per sever which may not want to use the mysql, as it may be qualified to be on different servers.

Mordekay
11-10-2008, 01:06
I for myself wouldn't need it. But it might be interesting for very large communities that have often changes on their servers/configs.
Also it could be interesting for those who run different types of game on one server, this way they could easily change the name of the server in the config to fit the current name.

AntiBots
11-10-2008, 11:25
Yes, please add this feature, I would immediately use it :D

Guenhwyvar
11-10-2008, 15:31
I don't know why to reply because of the vote functionality above, but yes: I D-O want that feature :).

davidonpda
11-14-2008, 14:19
It would be used immediately on slackerzz servers :-)

xOR
11-15-2008, 12:24
actually i am quite surprised about the result. maybe the vote is not all that representative because people who don't care about MySQL just don't click this thread?
the target audience for the feature should be pretty small. for me with my 4 servers i make changes to the server list like once in a year? if it was not for the testing i will need to do when implementing the feature (and currently it looks like i will do) i would not bother the hassle with the database setup just to save 3 copy commands to the other 3 servers.

well, if you rent a new server every week and drop another one for it or change your IPs or ports very often it might be useful, but i can't imagine this should be the normal case.
of course there is a an exponential rise of server list changes when the number of servers grows. one more server = again modifiy all server lists + modify one more (this time and any time in the future). so for people with 10 servers it's absolutely understandable they would want to manage the servers in a database.
for all others: what is advantage of it?

bmann_420
11-15-2008, 20:02
I can help test. I run the ooorgle servers (14) and my servers (11)

With new servers almost every day, it would very nice to have 1 file to control them all, well 2, but 1 section at a time.

So many IP's it does get bothersome. =)

--And im not sure if you remember my request so long ago. Being able to add sections. Whatever type of section you want, like Paintball - WC3 - Zombie and all. Kinda like
-And after hitting the 1, 2, or 3 (however many mods you have or main menu's you have) will bring you to the sub menu, with the servers. And the cvar per server if you want to display them, or if you want to display the amount of servers you have instead, or both. Amount, and any particular serevrs you want people to see, and try and get them to join em.


[Paint Ball MOD]

[oooRGLE PaintBall DM]
address=74.86.147.66
port=27015
cmdbackup=2
noauto=0
nomanual=0
nodisplay=0
adminslots=1

[SuperCentral [oooRGLE] Paintball DM]
address=74.86.147.67
port=27016
cmdbackup=2
noauto=0
nomanual=0
nodisplay=0
adminslots=1

[Zombie MODS]

[SuperCentral Zombie Plague DM]
address=206.212.250.218
port=1337
cmdbackup=2
noauto=0
nomanual=0
nodisplay=1
adminslots=1

[SuperCentral Zombie Infection DM]
address=67.214.164.20
port=27015
cmdbackup=2
noauto=0
nomanual=0
nodisplay=1
adminslots=1

[oooRGLE Zombie Plague DM]
address=74.86.147.67
port=27015
cmdbackup=2
noauto=0
nomanual=0
nodisplay=0
adminslots=1

[DeathRun Servers]

ect..

[WC3 Servers]

ect..

[Regular gameplay]

ect..

[Misc Fun Servers]

ect..

[CSDM]

ect..

Something to set it however you like, more organized

xOR
11-15-2008, 20:28
hehe i think i can imagine that you would want that feature. and you're probably a good test candidate, so yes, i would be happy if you could help with testing.
i still don't want to close the vote but i guess it's obvious where this will lead to so maybe i should start creating the database layout.

i don't like the way how you handled the sections in the file though, if i decide to write this feature i will think of some different format. it would rather look something like this:

[sections]
1=Paint Ball MOD
2=DeathRun Servers
3=WC3 Servers
4=Regular gameplay
5=Misc Fun Servers
6=CSDM


[oooRGLE PaintBall DM]
address=74.86.147.66
port=27015
cmdbackup=2
noauto=0
nomanual=0
nodisplay=0
adminslots=1
section=1

[SuperCentral [oooRGLE] Paintball DM]
address=74.86.147.67
port=27016
cmdbackup=2
noauto=0
nomanual=0
nodisplay=0
adminslots=1
section=1

[The cool DeathRun server]
address=123.123.123.123
port=27017
cmdbackup=2
noauto=0
nomanual=0
nodisplay=0
adminslots=1
section=2


the advantage of this is that the logic behind it can be the same for the MySQL list. so you got sections in an extra table, each section has an id column (as always :P) and each server entry in the servers table has a section column that is points to this id.

bmann_420
11-15-2008, 20:55
Even better :D

I think that option would be very beneficial.

Mordekay
11-17-2008, 02:38
To continue to spin this thread this could help building really large comunities/servernetworks of servers who doesn't know about themselfe at all....
Think about this: one database on a website that has a form to register/remove his own servers. Putting them into the section he wants, of couse, the section must be extended to the region of the server. Updating the server-list once or twice a day. This way you could find easily a server for any mod you want without leaving the server you are connected to and without looking onto any website.

xOR
12-01-2008, 20:34
In fact, I would like to see others voice approval and support that this would be a utilized function. If I am the only one that is going to use it, I should do it myself.

the vote result is pretty clear, so the decision is made that xREDIRECT will get this feature.
like bmann suggested it will be controlled by a CVAR (or even more). i think additionally there will be a define option in the source code to turn it on or off, so the SQL code is not compiled into all the binaries of people who don't plan to ever use SQL.

bug tracker entry for this is here (http://www.bugs.boxxor.net/view.php?id=446).

davidonpda
12-01-2008, 22:20
Let me know the format that it will be stored in the database, and I will begin working on a PHP front end for a webserver.

Styles
12-02-2008, 12:48
No, this is a very good idea to add. What you should do is on plugin start, parse the mysql db for data and just hold it, don't keep trying to access it.

Then compare ip with net_address (cvar) to blank it out.

But your smart xOR..you should know

xOR
12-02-2008, 13:23
the feature of a centralized server list in a database is meant to save admins from having to touch every single server for a list change. this means i need some interval where i refresh the data from the sql tables, otherwise the admin would have to restart every single server and then we're back at touching every server.

for servers that load a new map every 20 minutes it probably doesn't matter but there are servers with longer games (in NS a single game can easily take an hour or longer and the server is designed not to interrupt ongoing games with a map change), longer time limits or even 24/7 servers which need an automatic refresh. so, as i wrote in the bug entry, there will be this refresh but of course i won't constantly reload the list from the database every round or even read the data directly from there, in case you thought that. but well, that would be very far away from how the plugin currently works anyway, why should i do this :P

bmann_420
12-02-2008, 18:13
A simple command fromin game or hlsw for a map change, is much easier than overwriting files for every server. :D

jsterling
12-03-2008, 18:05
You could connect to the database on server start and map change and have it write to the serverlist.ini and as bmann said also add a cvar to grab and write.

xOR
12-03-2008, 20:50
i already said something about refreshing on start and map change - what do you do on 24/7 servers that maybe restart once a day? and on NS servers that might have a game running for 2 hours?

and it's not a CVAR but a command and xREDIRECT already has it: redirect_reload. of course this command will work for SQL server lists. i think bmann was rather talking about the "restart" command or "map"/"changelevel" anyway but i am sure redirect_reload is the better solution, it does not need any kind of restart to work (and it already works today).

why are you trying to convince me of not implementing an automatic refresh in a specific interval anyway? it would be like every 20 minutes. a selection every 20 minutes...for a mysql database...i really don't see where the problem is. the interval will be configurable or maybe even have the option to be completely deactivated.
of course i will run tests with it and should i notice the refresh causes a small lag everytime the plugin does it i might turn it off by default.

is that a solution everyone could live with?

danielkza
12-03-2008, 22:17
of course i will run tests with it and should i notice the refresh causes a small lag everytime the plugin does it i might turn it off by default.

is that a solution everyone could live with?
I don't think it would be a problem if using threaded queries. Since the data set won't be anything too large, the processing would be fast enough so lag won't be noticed. I agree with your point, it's a great addition to the plugin, but you can configure it for whatever delay you want, or even disable it.

xOR
01-29-2011, 13:22
for those who are subscribed here and didn't notice it yet: xREDIRECT v2.0 RC1 with SQL functionality has been released