Raised This Month: $51 Target: $400
 12% 

a little help with daemon


Post New Thread Reply   
 
Thread Tools Display Modes
anticheats
Member
Join Date: Mar 2012
Old 03-30-2014 , 15:29   Re: a little help with daemon
Reply With Quote #11

Rytis, just help me find a way to make daemon log the stats into two databases and I'll reveal the logic to you later
anticheats is offline
Rytis
Veteran Member
Join Date: Feb 2012
Location: Germany
Old 03-30-2014 , 15:43   Re: a little help with daemon
Reply With Quote #12

You could start two daemons and add one server to them two^^
Do you want to gain performance? Like a failback server?

Last edited by Rytis; 03-30-2014 at 15:43.
Rytis is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Location: 127.0.0.1@root
Old 04-04-2014 , 00:50   Re: a little help with daemon
Reply With Quote #13

Quote:
Originally Posted by anticheats View Post
Rytis, just help me find a way to make daemon log the stats into two databases and I'll reveal the logic to you later
How about you say why you are trying to do something that has no reasoning behind it.

It will not help preformance
It will not help backup
It will not work as a fall over

so...why.....

If you want back up // warm back up or even performance then set up MySQL in a cluster... The way the daemon is written at this time you will not be able to write to 2 DB's you could copy and paste some code to getto rig it but there is no logic behind doing that there for not even worth the time to find the files to edit.
__________________
Mavrick4283 is offline
anticheats
Member
Join Date: Mar 2012
Old 04-04-2014 , 10:22   Re: a little help with daemon
Reply With Quote #14

Well, what I had in mind was to make every daemon log into a 'master' database along with the 'default' database configured in hlstats.conf so that 'global rankings' can be determined from the master database and sever-specific rankings from the default. Is that a very bad idea?
anticheats is offline
Rytis
Veteran Member
Join Date: Feb 2012
Location: Germany
Old 04-04-2014 , 10:45   Re: a little help with daemon
Reply With Quote #15

No, it's not, but it's kinde useless (for me atleast)

As I said: You could start two daemons and add the logaddress_add command twice.
Rytis is offline
anticheats
Member
Join Date: Mar 2012
Old 04-04-2014 , 10:57   Re: a little help with daemon
Reply With Quote #16

It might be useful to me because I plan of offering the stats to other gaming communities as well. I guess the global rankings (determined from the master database) for all the participating servers will be interesting.

Rytis, I don't think starting two daemons is a good idea because that will not only drain the resources of both the web sever and game server but also delay the response time.

Last edited by anticheats; 04-04-2014 at 11:03.
anticheats is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Location: 127.0.0.1@root
Old 04-04-2014 , 12:20   Re: a little help with daemon
Reply With Quote #17

Quote:
Originally Posted by anticheats View Post
Well, what I had in mind was to make every daemon log into a 'master' database along with the 'default' database configured in hlstats.conf so that 'global rankings' can be determined from the master database and sever-specific rankings from the default. Is that a very bad idea?
Yes, if you do it that way then each server decides how many points each action is worth so for example if server 1 killing some one is worth 2 points but server 3 killing some one is worth 10 points then players from server 3 will be higher ranked.

+ it is a waste of resources for the daemon to dup the data like that, MySQL has backup tools for running "warm" and "hot" backups just use those as they will work on the DBA level and have less over head.
__________________
Mavrick4283 is offline
anticheats
Member
Join Date: Mar 2012
Old 04-05-2014 , 04:36   Re: a little help with daemon
Reply With Quote #18

Yea you're right, servers could manipulate with their skill points and therefore it's a bad idea.

One last question, I've noticed that the file 'HLstats_EventHandlers.plib' includes the connect announce thing like 'player has connected from United States'. What do I put there (or any other file) to include cities as well. E.g, 'player has connected from San Francisco, United States'?
anticheats is offline
abr
Junior Member
Join Date: Mar 2014
Old 04-07-2014 , 00:01   Re: a little help with daemon
Reply With Quote #19

In table geoLiteCity_Location there is field 'city', so may be you can try to use
$msg = sprintf("Player %s has connected from %s (%s)", $player->{name},$player->{country},$player->{city});
instead of
$msg = sprintf("Player %s has connected from %s", $player->{name},$player->{country});
and in other if..elsif branches
abr 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 02:20.


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