Raised This Month: $ Target: $400
 0% 

HUGE arrays


Post New Thread Reply   
 
Thread Tools Display Modes
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-25-2015 , 18:26   Re: HUGE arrays
Reply With Quote #21

Quote:
Originally Posted by LambdaLambda View Post
Let's say there are 10 servers using the same database. 40 players max on each, which means 400. Around 1/4 of them would finish the stage during the same minute - database goes crazy.
Add to that queries on cmd usage (rank etc), web interface ranking queries.

It won't lag the server, but it will lag the database, which basically comes to the same output.

Last edited by LambdaLambda; 01-25-2015 at 18:28.
LambdaLambda is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 01-25-2015 , 19:06   Re: HUGE arrays
Reply With Quote #22

Quote:
Originally Posted by LambdaLambda View Post
Add to that queries on cmd usage (rank etc), web interface ranking queries.

It won't lag the server, but it will lag the database, which basically comes to the same output.
Yeah but a lag on the database just means that it will take longer for the callback to be called, that doesn't affect the server itself.
ClassicGuzzi is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-26-2015 , 02:45   Re: HUGE arrays
Reply With Quote #23

And eventually lost some queries + lost DB connection. Which will affect the server, obviously.
LambdaLambda is offline
m_bNightstalker
Senior Member
Join Date: Jan 2015
Location: JWD
Old 01-26-2015 , 13:19   Re: HUGE arrays
Reply With Quote #24

Quote:
Originally Posted by LambdaLambda View Post
And eventually lost some queries + lost DB connection. Which will affect the server, obviously.
Okey and what about stoing the stuff in a sqlite db?
m_bNightstalker is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 01-26-2015 , 14:41   Re: HUGE arrays
Reply With Quote #25

You are making no sense, you just reject everything offered to you out of lazyness, why even ask for help if you going to reject everything until someone hold your hand and does it for you. You have threaded sql, adt array and other type of dynamic memory menagement offer by sourcemod, beyond that your asking for something that is not in there. Even got examples on the wiki or hundreds of them on the forum.

Wrong section, you should ask in the Plugin/Gameplay Ideas and Requests section.

Sound rude? I just got tired of your excuses.

Last edited by Mathias.; 01-26-2015 at 14:43.
Mathias. is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 01-26-2015 , 14:45   Re: HUGE arrays
Reply With Quote #26

Quote:
Originally Posted by LambdaLambda View Post
And eventually lost some queries + lost DB connection. Which will affect the server, obviously.
You would have to have an extremely shitty database and or internet connection for that to happen. And "lost queries"? Wat.

Use a local database (sqlite) if that's a problem.
Potato Uno is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-26-2015 , 15:07   Re: HUGE arrays
Reply With Quote #27

Quote:
Originally Posted by m_bNightstalker View Post
Okey and what about stoing the stuff in a sqlite db?
Thank you for that idea, however it is not way out for me, as this would be accesable only for one SRCDS. Alternatively I could make another script that would update sql database with data taken from mysql server, and update mysql on map change. That would be an idea! Howerver I will wait, maybe someone will show me another way for that.

What the fuck you mean "excuses"? Im asking about method of storing data without declaring variable's size, and I'd get an example that also requires it! Point me that lazyness, or get out.

It does make NONE sense of using threaded queries methods to retrieve details, since you can do this locally. Especially so I want to use one database shared for different locations, including US and EU, delays are obvious, transfer also cost money. Calculating rank over and over again by queries is pointless and harmful for databse performace. I see you got no idea what you're talking about, so stop being asshole, cos you ain't smartass as you're trying to show you are.

It's just exactly dumb idea to base plugin dedicated for over 400 players at once on constant database queries, as holding css or html code on your mysql server - it costs database performance, in case when you can make it without it.

Last edited by LambdaLambda; 01-26-2015 at 15:10.
LambdaLambda is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 01-26-2015 , 15:14   Re: HUGE arrays
Reply With Quote #28

at this point you make a web API or you manage your queries to be sent at certain event or time. You just get when connect and cache that info, I don't know why you try to cache the entire database on the srcds. Even if you did cache the whole database you would have merges issues when updating it.

Last edited by Mathias.; 01-26-2015 at 15:46.
Mathias. is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-26-2015 , 16:40   Re: HUGE arrays
Reply With Quote #29

I see I did not specify my idea enough clear. So here it is:

I'm running servers that are really popular (I don't wanna to share community name), currently after two months from last rank clearing, we had 140k of players, 120k of them are active players, they constantly beat their times and so and so.


I don't wanna to store all the players at once, but only records of specific map. So these are always next to, when there's such need. I also don't wanna to call insert/update queries at the map end, these will be called constantly. I don't wanna to spam with select queries, that's the reason of storing all the records for current map in variables.

I want to limit no. of queries to minimum. Our database already get ass kicked strongly. We got forum, sb, other mods and that huge database on singe DB server, which makes it really slow. Also, do have online web-interface for ranking. So to get rid of callback delays problem, I've designed my plug to keep data that are going to be in constant need, in place.

And reason of my thread is not to ask you guys for you opinion - I really know what I'm doing and I'm sure some of you would make it better. I showed you my problem, and been in curious if you someone would show me up another method of storing these.
LambdaLambda is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 01-26-2015 , 16:47   Re: HUGE arrays
Reply With Quote #30

but what exacly do y ou want to store? can you give an example? if it is database structures you should know the structures size and recreate it on server side to be able to work with ADT arrays. You are curious about how to show up another method to store data but we still have no ideas of what it is. Is it multiple structures? What are they? Do you have a need to sort?

Last edited by Mathias.; 01-26-2015 at 16:48.
Mathias. 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 14:39.


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