SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 09/04/2013, 10:17 PM   #11
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 523
Reputation: 122
Default Re: MySQL Plugin v0.1 BETA

Quote:
Originally Posted by Kar View Post
so why should anyone use this over BlueG's MySQL plugin?
For now, it only has a few features over BlueG's plugin (most important: multiple return sets, supporting both threaded and non-threaded queries), but I'll keep updating it. BlueG's code became too ugly for my taste.
Dan.. is offline   Reply With Quote
Old 09/04/2013, 10:27 PM   #12
RealCop228
Godfather
 
Join Date: Feb 2010
Location: Springboro, OH
Posts: 8,143
Reputation: 685
Default Re: MySQL Plugin v0.1 BETA

Quote:
Originally Posted by Dan.. View Post
For now, it only has a few features over BlueG's plugin (most important: multiple return sets, supporting both threaded and non-threaded queries), but I'll keep updating it. BlueG's code became too ugly for my taste.
Actually, BlueG's plugin does support both threaded and non-threaded queries. However, once you use R7 or above, you lose the ability to use non-threaded queries. He probably did this to increase performance of non-threaded queries. Quite frankly, people not using threaded queries should re-consider.
RealCop228 is offline   Reply With Quote
Old 09/04/2013, 10:30 PM   #13
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 523
Reputation: 122
Default Re: MySQL Plugin v0.1 BETA

Quote:
Originally Posted by RealCop228 View Post
Actually, BlueG's plugin does support both threaded and non-threaded queries. However, once you use R7 or above, you lose the ability to use non-threaded queries. He probably did this to increase performance of non-threaded queries. Quite frankly, people not using threaded queries should re-consider.
I found very useful non-threaded queries too. Retrieving small amount of information is faster using those queries.
Dan.. is offline   Reply With Quote
Old 09/04/2013, 10:37 PM   #14
RedCrossER
Huge Clucker
 
Join Date: Nov 2012
Posts: 277
Reputation: 8
Default Re: MySQL Plugin v0.1 BETA

However good job mateĦĦĦ
RedCrossER is offline   Reply With Quote
Old 09/04/2013, 11:03 PM   #15
BlueG
Beta Tester
 
BlueG's Avatar
 
Join Date: Sep 2007
Location: Los Angeles, CA
Posts: 232
Reputation: 294
Default Re: MySQL Plugin v0.1 BETA

Ok, seems like I have to tell you that this is somehow pissing me off. I have nothing against any plugin release, even if it is MySQL, but the way you have been handling this situation is quite annoying.

In January I decided to stop working on my plugin and you did ask me to continue it at some point. After some small fixes, additions and some code design changes ("java style", as you told me), you seemed to have lost interest. Now out of sudden you release your own plugin without any notice to me, which is the reason why I'm angry.

Quote:
I hope this plugin will be faster and more stable than any other MySQL plugin released
Quote:
BlueG's code became too ugly for my taste.
This seems to be some kind of joke to me, because you are still using snippets of my plugin. The only difference (in the way how the plugin handles the MySQL stuff) I can see so far is, that you decided to use std::maps<> instead of vectors/queues, but I don't want to get into a further investigation.

All I can say is, fuck off Dan. (I don't care whenever you use parts of my plugin btw.)

BlueG
BlueG is offline   Reply With Quote
Old 10/04/2013, 12:18 AM   #16
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,516
Reputation: 2927
Default Re: MySQL Plugin v0.1 BETA

Quote:
Originally Posted by Dan.. View Post
For now, it only has a few features over BlueG's plugin (most important: multiple return sets, supporting both threaded and non-threaded queries), but I'll keep updating it. BlueG's code became too ugly for my taste.
1) This has nearly half the number of functions of BlueG's - how are there more features?

2) You say you intend for this to be faster - have you got ANY plans on how to do this? Don't forget that the vast majority of the (lack of) speed in any MySQL plugin comes from MySQL itself. Even if your section of the code is 10x faster than BlueG's - if 99% of the code is internal MySQL stuff common to both then you have only improved the total execution time by 0.9%

3) If you thought the existing code was ugly, why not just clean it up a bit? That's got to be faster than developing (and testing) a whole new one, then getting people to convert.

4) There isn't really such a thing as a "quick" query - even just a "SELECT * WHERE" still has to compile the query and search the entire database. There was a reason non-threaded queries were removed, do you have any numbers, of ways of assessing what is "quick" and not "server hanging".

5) In what world is "mysql_connect" similar to "db_open"? Or the other functions - renaming everything is not my definition of an easy conversion!

6) You also mentioned improved stability - how are you going to assess and prove that too?
Y_Less is offline   Reply With Quote
Old 10/04/2013, 01:06 AM   #17
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,131
Reputation: 450
Default Re: MySQL Plugin v0.1 BETA

The MySQL Plugin by BlueG only has little issues left. Instead of creating an entirely new plugin to test and blah blah. Create stress on yourself. The plugin issues could've just been fixed, making the plugin closer-to-perfection. I can't say perfection and let it stand on it's own of course. I'm gonna continue to use BlueG's plugin regardless of it's crashes to my server. Don't care. It used to crash my server 5-8+ times per day for months but I still continued to use it and still will up to this day. :P
Kar is offline   Reply With Quote
Old 10/04/2013, 08:52 AM   #18
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 523
Reputation: 122
Default Re: MySQL Plugin v0.1 BETA

Quote:
Originally Posted by BlueG View Post
Ok, seems like I have to tell you that this is somehow pissing me off. I have nothing against any plugin release, even if it is MySQL, but the way you have been handling this situation is quite annoying.

In January I decided to stop working on my plugin and you did ask me to continue it at some point. After some small fixes, additions and some code design changes ("java style", as you told me), you seemed to have lost interest. Now out of sudden you release your own plugin without any notice to me, which is the reason why I'm angry.
I've lost interest because the code was ugly and I felt bad to "correct" your code. I can give you examples of ugly code (it's about 90% of that plugin) if you want.

Quote:
Originally Posted by BlueG View Post
This seems to be some kind of joke to me, because you are still using snippets of my plugin. The only difference (in the way how the plugin handles the MySQL stuff) I can see so far is, that you decided to use std::maps<> instead of vectors/queues, but I don't want to get into a further investigation.
Actual, the only SIMILARITY is the fact that I'm using your Mutex object and threads design. Everything else was written entirely by me (there might be some more similarities as I've seen your code and you inspired me, but I didn't intend to copy). CRY ME A RIVER, KID!

Quote:
Originally Posted by Y_Less View Post
1) This has nearly half the number of functions of BlueG's - how are there more features?

2) You say you intend for this to be faster - have you got ANY plans on how to do this? Don't forget that the vast majority of the (lack of) speed in any MySQL plugin comes from MySQL itself. Even if your section of the code is 10x faster than BlueG's - if 99% of the code is internal MySQL stuff common to both then you have only improved the total execution time by 0.9%

3) If you thought the existing code was ugly, why not just clean it up a bit? That's got to be faster than developing (and testing) a whole new one, then getting people to convert.

4) There isn't really such a thing as a "quick" query - even just a "SELECT * WHERE" still has to compile the query and search the entire database. There was a reason non-threaded queries were removed, do you have any numbers, of ways of assessing what is "quick" and not "server hanging".

5) In what world is "mysql_connect" similar to "db_open"? Or the other functions - renaming everything is not my definition of an easy conversion!

6) You also mentioned improved stability - how are you going to assess and prove that too?
1. mysql_get_charset, mysql_set_charset, mysql_reconnect, mysql_reload, mysql_retrieve_row, mysql_stat - these are all the functions this plugin doesn't have. I've never used half of them so they weren't a priority for me. (Firstly, I wrote this plugin for MY server, before started working at BlueG's plugin)
However, my plugin still has multiple result sets and non-threaded queries (even if you don't like them, I find them useful).

2. It's clear that I can't optimize MySQL's api, but I'll try to optimise my code as much as possible. The difference would be narrow, but it would still be there.

3. I felt bad editing his code. I thought it was disrespectful of me.

4. It's quick because it doesn't have to be passed to another thread, execute it and call the callback. It's again, a narrow difference, but it does exists. I'm using non-threaded queries in OnGameModeInit and OnGameModeExit to load and save everything. They look better and I don't care if the server hangs as long as my data is loaded. I had a lazy MySQL server which loaded data from the server AFTER players connected.

5. Not all of them are alike, but most of them: db_close, db_free_result, db_num_rows, db_num_fields, db_field_name, db_query, ~db_get_field (has one extra parameter, `row`), ~db_get_field_assoc (same with `db_get_field`)

6. I'll run some 'hardcore' tests? I've succeeded in crashing BlueG's plugin sending a huge amount of data. I'll try the same with my plugin.

Quote:
Originally Posted by Kar View Post
It used to crash my server 5-8+ times per day for months but I still continued to use it and still will up to this day. :P
That's what made me write another plugin.

--

You guys feed with hate. That's what I was afraid when I released this plugin.

Last edited by Dan..; 06/05/2013 at 07:55 PM.
Dan.. is offline   Reply With Quote
Old 10/04/2013, 09:54 AM   #19
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,516
Reputation: 2927
Default Re: MySQL Plugin v0.1 BETA

Quote:
Originally Posted by Dan.. View Post
I've lost interest because the code was ugly and I felt bad to "correct" your code. I can give you examples of ugly code if you want.
I hope you aren't referring to the non "java style" code (since this isn't Java)!

Quote:
Originally Posted by Dan.. View Post
Actual, the only SIMILARITY is the fact that I'm using your Mutex object and threads design. Everything else was written entirely by me (there might be some more similarities as I've seen your code and you inspired me, but I didn't intend to copy).
You might want to check on that - I've found issues with the mutex setup in the past (can't remember what, but it will be in my IRC logs somewhere).

Quote:
Originally Posted by Dan.. View Post
1. mysql_get_charset, mysql_set_charset, mysql_reconnect, mysql_reload, mysql_retrieve_row, mysql_stat - these are all the functions this plugin doesn't have. I've never used half of them so they weren't a priority for me. (Firstly, I wrote this plugin for MY server, before started working at BlueG's plugin)
However, my plugin still has multiple result sets and non-threaded queries (even if you don't like them, I find them useful).
I asked how you claimed to have more features, you just listed all the ones you don't have...

Quote:
Originally Posted by Dan.. View Post
3. I felt bad editing his code. I thought it was disrespectful of me.
From what he said, it seems he knew you were editing the plugin and was OK with that. Plus, although his code doesn't have an explicit license, the virality of the GPL used in the mySQL headers makes it GPL compatible so anyone is free to modify the code as they like.

Quote:
Originally Posted by Dan.. View Post
4. It's quick because it doesn't have to be passed to another thread, execute it and call the callback. It's again, a narrow difference, but it does exists. I'm using non-threaded queries in OnGameModeInit and OnGameModeExit to load and save everything. They look better and I don't care if the server hangs as long as my data is loaded. I had a lazy MySQL server which loaded data from the server AFTER players connected.
That can actually make your server run significantly slower - threads are not inherantly fast OR slow. Someone recently released a threaded command processor which turned out to be slower than a non-threaded version, I believe this would be the opposite.

Quote:
Originally Posted by Dan.. View Post
5. Not all of them are alike, but most of them: db_close, db_free_result, db_num_rows, db_num_fields, db_field_name, db_query, ~db_get_field (has one extra parameter, `row`), ~db_get_field_assoc (same with `db_get_field`)
You don't have db_close!

6. I'll run some 'hardcore' tests? I've succeeded in crashing BlueG's plugin sending a huge amount of data. I'll try the same with my plugin.



That's what made me write another plugin.

--

You guys feed with hate. That's what I was afraid when I released this plugin.[/QUOTE]
Y_Less is offline   Reply With Quote
Old 10/04/2013, 01:34 PM   #20
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 523
Reputation: 122
Default Re: MySQL Plugin v0.1 BETA

Quote:
Originally Posted by Y_Less View Post
I hope you aren't referring to the non "java style" code (since this isn't Java)!
I don't care if this is not Java. I find Java coding convention clear and I got used to them. I use them even if I write code in C, PHP or Pawn (with little personal edits). You might find them interesting: http://www.oracle.com/technetwork/ja...nv-138413.html

Quote:
Originally Posted by Y_Less View Post
You might want to check on that - I've found issues with the mutex setup in the past (can't remember what, but it will be in my IRC logs somewhere).
I'll do some tests.

Quote:
Originally Posted by Y_Less View Post
I asked how you claimed to have more features, you just listed all the ones you don't have...
Quote:
Originally Posted by Dan.. View Post
However, my plugin still has multiple result sets and non-threaded queries (even if you don't like them, I find them useful).
Also, I've listed some (useless imo) features I don't have.

Quote:
Originally Posted by Y_Less View Post
From what he said, it seems he knew you were editing the plugin and was OK with that. Plus, although his code doesn't have an explicit license, the virality of the GPL used in the mySQL headers makes it GPL compatible so anyone is free to modify the code as they like.
I really didn't care about the license, I just felt bad editing his work.

Quote:
Originally Posted by Y_Less View Post
That can actually make your server run significantly slower - threads are not inherantly fast OR slow. Someone recently released a threaded command processor which turned out to be slower than a non-threaded version, I believe this would be the opposite.
I have both threaded and non-threaded queries. They are approached in two different ways and everyone is free to use what they like. In some situations, you'll find non-threaded queries more suitable or vice-versa.

Quote:
Originally Posted by Y_Less View Post
You don't have db_close!
It's mysql_discconect. In the next release I'll make sure every function will have an equivalent to the SQLite natives.
Dan.. is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Someone should make a PostgreSQL plugin Gamer_Z Plugin Development 19 07/02/2013 12:24 AM
PostgreSQL Steve M. Scripting Help 4 10/12/2011 12:36 PM
MySQL Plugin R5 plugin problem dud Scripting Help 12 05/12/2011 07:28 PM
[help][plugin] Can't load mysql plugin mariomako Help Archive 8 16/07/2011 03:37 PM
mysql plugin. loading plugin failed ikkentim Help Archive 2 10/02/2011 03:32 PM


All times are GMT. The time now is 07:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.