Raised This Month: $ Target: $400
 0% 

Do Non-Threaded and Threaded crash?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Predailien12
Senior Member
Join Date: Feb 2010
Location: Your as* hol*
Old 08-20-2011 , 12:17   Do Non-Threaded and Threaded crash?
Reply With Quote #1

I made a plugin that many servers use same database.

so I had to use SQL_ConnectCustom which is Non-Threaded.
and for the good and not lagging query, I used SQL_TQuery which is Threaded.
but I don't know whether they crash if in different server.
I mean, I wonder SQL_ConnectCustom from A server can crash with SQL_TQuery from B server.

do they crash if in different server??
Predailien12 is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 08-20-2011 , 12:26   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #2

There is no distinguishing between threaded and non-threaded on a database connection. (So both types of queries can happen on one connection, if locked properly)
Only mixing threaded and non-threaded queries unproperly is bad.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.

Last edited by Monkeys; 08-20-2011 at 12:29.
Monkeys is offline
Predailien12
Senior Member
Join Date: Feb 2010
Location: Your as* hol*
Old 08-20-2011 , 12:39   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #3

Quote:
Originally Posted by Monkeys View Post
There is no distinguishing between threaded and non-threaded on a database connection. (So both types of queries can happen on one connection, if locked properly)
Only mixing threaded and non-threaded queries unproperly is bad.
then what should I do?

I have to hide mysql password and so on.
But the only SQL_ConnectCustom help me hide it.
And SQL_Query occurs Lags.

what should I do?
Predailien12 is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 08-20-2011 , 12:45   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #4

SQL_ConnectCustom can't hide mysql password, nothing can.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Predailien12
Senior Member
Join Date: Feb 2010
Location: Your as* hol*
Old 08-20-2011 , 12:50   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #5

Quote:
Originally Posted by berni View Post
SQL_ConnectCustom can't hide mysql password, nothing can.
but I heard that I can hide it if I distribute the only SMX file
and general people can't find it.

Last edited by Predailien12; 08-20-2011 at 12:55.
Predailien12 is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 08-20-2011 , 14:37   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #6

Then you shouldn't listen to them.
You can get serious problems with the law when you don't give the soure code to people when you give them the compiled plugin. Sourcemod's GPL license says you to.

And they can just open your plugin with a hex editor and get your mysql password, that's why this is a bad idea. It breaks the configurability and it makes no sense anyway.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Predailien12
Senior Member
Join Date: Feb 2010
Location: Your as* hol*
Old 08-20-2011 , 14:51   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #7

Quote:
Originally Posted by berni View Post
Then you shouldn't listen to them.
You can get serious problems with the law when you don't give the soure code to people when you give them the compiled plugin. Sourcemod's GPL license says you to.

And they can just open your plugin with a hex editor and get your mysql password, that's why this is a bad idea. It breaks the configurability and it makes no sense anyway.
Um...
I am running a RPG plugin which I made.
What I want to do is to make it public one.
I wanted to make a plugins that everyone can do in every server that uses my plugin so they can play in every server.

but I am afraid of being hacked.
So I want to hide it.

There is another reason, Easy to install it.


And I didn't know that there is a law.

Hmm..

Last edited by Predailien12; 08-20-2011 at 14:54.
Predailien12 is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 08-20-2011 , 14:57   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #8

Quote:
Originally Posted by Predailien12 View Post
Um...
I am running a RPG server which I made.
What I want to do is to make it public one.
I wanted to make a plugins that everyone can do in every server that uses my plugin so they can play in every server.

but I am afraid of being hacked.
So I want to hide it.

Easy to install it.

And I didn't know that there is a law.

Hmm..
That's not gonna work... like I said.
People either use their own MySQL Server or no MySQL at all.

Besides MySQL isn't meant to connect to it across the whole planet.
The idea isn't bad, but you can't do that.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Predailien12
Senior Member
Join Date: Feb 2010
Location: Your as* hol*
Old 08-20-2011 , 15:23   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #9

Quote:
Originally Posted by berni View Post
That's not gonna work... like I said.
People either use their own MySQL Server or no MySQL at all.

Besides MySQL isn't meant to connect to it across the whole planet.
The idea isn't bad, but you can't do that.
you are right.

Maybe I have to abandon this plugin.
Predailien12 is offline
DarkEnergy
SourceMod Donor
Join Date: Apr 2008
Location: Georgia Tech, MSECE
Old 08-21-2011 , 16:38   Re: Do Non-Threaded and Threaded crash?
Reply With Quote #10

i have distributed plugins with hard coded database connections, since then i have switched to sockets + http.

a database connection is the same no matter how you connect it.
threaded queries removes the lag, but does not mean your results return instantly, it just allows the game to continue without mysql blocking it.
MIXING THREADED AND NON THREADED REQUIRES SQL_LOCKDATABASE
like this

THREADED QUERY
LOCK
NON THREADED QUERY
UNLOCK
THREADED QUERY
__________________
War3:Source Developer
"Your CPU is just a bunch of Muxes"
DarkEnergy is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 04:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode