collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Whois cache and out-of-bot managing of members lists  (Read 5958 times)

0 Members and 1 Guest are viewing this topic.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Whois cache and out-of-bot managing of members lists
« on: December 01, 2005, 02:42:08 pm »
Coming back to our discussion in the bebot 0.3.0 thread :)

Quote from: "Khalem"
Just making a "mirror" of all the data isnt much good, youd use more resources than you save. It only makes sense if your making a character database like Auno.org, but not otherwise.

I went ahead and implemented my whois-cache. Here what I did and my current experiences with it.

I added a new module handling all whois queries, and modified all other modules doing get_site queries for character information to use the whois module. Then I added a script outside of the bots as cron job, updating the whois-cache once each day. First getting the org roster for all orgs in the cache, then getting the current information for all not yet updated characters. With now 25k entries the update took 9mins.
For the org member lists I did something similar - I moved the update of the rosters in a bot doing nothing but handling the members lists (updating them twice a day like now), and notifying the org bots I host if an update happened, so they can update their buddy list. Can't use a script here, as the members table needs the user ids, which are only available in-game.

Those two things together work extremely well, reducing any latency I had due to whois queries to almost zero (if you are in the cache once, you stay in it forever, so there is only once any lag for an http query per character). And it reduces the time the org bots lag due to the roster updates too.

I know that I'm not running any usual configuration, hosting 4 org bots and 3 raidbots, with at least one more raidbot to follow. And I'm running them all on an almost dedicated server (it's my file server too, but that load is quite low). But I have to say for me the work it took to implement this and the additional ressources needed (the bot handling the roster updates, and the cron job for the cache) are worth the won speed.

Offline Akarah

  • Contributor
  • *******
  • Posts: 72
  • Karma: +0/-0
    • http://synergyfactor.net/
Whois cache and out-of-bot managing of members lists
« Reply #1 on: December 01, 2005, 03:32:40 pm »
i've updated the towerattack module again (for my own purposes mostly, just to change the way it displays a bit.. colorizing the attacker/defender names by side, instead of saying what the side is -- blue=omni,orange=clan,white=neutral ;) ), just haven't submitted my changes.. i'll try to merge my changes into yours if you plan to share the code  -- i'd definitely use this.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Whois cache and out-of-bot managing of members lists
« Reply #2 on: December 01, 2005, 03:47:45 pm »
Sure, I'll try to go around and post the relevant files later today.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 436
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal