Facepunch / garrysmod-requests

Feature requests for Garry's Mod
85 stars 24 forks source link

Native MySQL Support #37

Closed kklouzal closed 11 years ago

kklouzal commented 11 years ago

We already have a couple modules available for MySQL integration although there are some performance issues with all of them.

As widely used as MySQL is in addons and gamemodes today it would make sense to expand upon SqLite and add in native support for MySQL.

MySQL provides a C++ connector which I have used in the past with success for my own C++ projects located at http://dev.mysql.com/downloads/connector/cpp/ and could easily be exposed to the Lua environment.

Please consider this feature request as I believe it would take Garrys-Mod one step closer to being the best physics sandbox for years to come.

SimonSchick commented 11 years ago

I think garry once commented on this and denied such a request because this is a high const factor.

kklouzal commented 11 years ago

If so, I highly encourage him to reconsider his decision and weigh the pros and cons. Having MySQL properly integrated into the core of GMod would boast high performance gains where modules just cannot achieve. Having used this in the past myself to almost effortlessly integrate MySQL into projects I could not imagine why he could not integrate this in the near future. Bottom line it would improve performance and open doors to new ideas which would be an all around great thing for Garrys-Mod.

garrynewman commented 11 years ago

Yeah I'm not gonna do this. It benefits only server owners - and they can install a binary module for it.

kklouzal commented 11 years ago

On the contrary I have to disagree with you, native MySQL support would benefit everyone immensely. While the most obvious benefits go to server owners, clients benefit as well from increased response times while playing on servers which use a gamemode or addon that utilizes MySQL especially in games with high player counts. It also benefits the scripting community with proper integration into GMod and documentation in the wiki. There are many more reasons as to why I think you should reconsider but it appears that you have already made your decision without carefully weighing the pros and cons.

garrynewman commented 11 years ago

Here's the pros and cons

Pros:

Cons:

Doesn't balance for me

SimonSchick commented 11 years ago

clients benefit as well from increased response times while playing on servers which use a gamemode or addon that utilizes MySQL especially in games with high player counts

This ultimately proves you have no idea what you are talking about.

kklouzal commented 11 years ago

I was referring to how the modules block the main thread during execution of a query and use of a module means one more software layer your working on top of.

I apologize for taking the time to put fourth a well prepared effort to improve something which I have no control over.

garrynewman commented 11 years ago

There's no technical reason why a binary module has to block like that. They can do anything that I can do.

Lexicality commented 11 years ago

I was referring to how the modules block the main thread during execution of a query

None of the GM13 MySQL modules do this.

SimonSchick commented 11 years ago

None of the GM13 MySQL modules do this.

Except you want them to.

Lexicality commented 11 years ago

Except you want them to.

What? I don't see why you would, but MySQLOO has a :wait() function

SimonSchick commented 11 years ago

You can do it if you just want to query some data at the server start for example, where it doesn't matter if the main threads waits for a moment(less than 0.1s usually), also tons of kids who don't know shit about callbacks use it :v