L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 11:57:34 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Support for older versions > BeBot 0.2 support > Topic: 2 bots, 1 db
Pages: [1]   Go Down
« previous next »
Print
Author Topic: 2 bots, 1 db  (Read 412 times)
0 Members and 1 Guest are viewing this topic.
Agustino
Freshman
*
Offline Offline

Posts: 2


2 bots, 1 db
« on: March 15, 2007, 08:02:28 AM »

Hi.

I was woundring if it i possible to run 2 raid bots off the same database?

How much does the bot cache while running a raid (if it does at all)?

I guess I'm asking if anyone can see anythink that might corrupt the database while running 2 raid simultaneously?

\\ Agustino
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: 2 bots, 1 db
« Reply #1 on: March 15, 2007, 08:19:52 AM »

With 0.3 you can share the same DB over several bots, using prefixes for tablenames.
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: 2 bots, 1 db
« Reply #2 on: March 15, 2007, 06:27:13 PM »

To elaborate on that.

In 0.3.svn you can specify a prefix for each bot. This prefix is used to all bot-spesific settings however the whois cache is shared by the two bots as is the color table (not the schema).

On 0.2 you need to create another database (if your hosts allow it) The alternative is to go trough all $this -> bot -> db ->* statements and change them to use different tables (NOT RECOMENDED)

If you attempt to run two 0.2 bots in the same database any members added to one bot will be added to the other bot aswell as it does not have a method of destinguishing which bot a member belongs to. Thus anything that's put into the db by one bot would be seen by the other bot as something it has put in there like raid points, alts and so on (if such applies to raid bots).

Hope that helps.
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Agustino
Freshman
*
Offline Offline

Posts: 2


Re: 2 bots, 1 db
« Reply #3 on: March 19, 2007, 04:52:18 AM »

What i relay want is to run raidbots with the extact same roster...

The idea is to have a backup bot on the same external database. So, 2 servers running one bot each, and an database running on a database server from, for example, a webhosting company that are reliable enough to be up 99.9% of the time.. That way you can have an up to date backup bot, and more importantly, raids run on the backup does not have to be manually entered in to the main bots database.

But my question is, how much is cached in memory on the server running the bot during a raid? and if one were to run raids on both bots at the same time could that corrupt the database?
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: 2 bots, 1 db
« Reply #4 on: March 19, 2007, 07:24:00 AM »

Note: The following has not been tested but is what I have found by looking (briefly) at the code for 0.2 raid system.

In general very little is held in memory.

Raid points for time attended is allocated during the raid and written to the database every minute or so. MySQL has got inherent locks that prevents two bots to mix eachothers data up by opening the same table at the same time.

However the way the raid module works prohibits running two raids on different bots on the same database at once because:
A) The assumption has been made in code that only one raidbot is using the database
B) A participant in one raid while two raids are open in separate bots would recieve a double amount of raid points because of the way raidtime works.
C) When one of the two bots closes the raid all participants in the other raid will stop recieving points over time and may even be kicked from the other raid.

To allow two bots to run separate raids on the same database would require very much work. Especially for the 0.2 branch. The bot-prefixing of 0.3.svn would make this much easier because the attendant of each raid would be separate but the number of raidpoints could be held in a common table.

Note that I say _could_ because I don't see it as likely that this will be implemented in the nearest future.

I hope that helps.
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Support for older versions > BeBot 0.2 support > Topic: 2 bots, 1 db
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Elesar1
[Today at 04:41:09 PM]

Shared DB online list
by Temar
[Today at 01:55:47 AM]

relay colors
by Temar
[Today at 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11144
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 14
Total: 16
Temar
Elesar1

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.577 seconds with 29 queries. (Pretty URLs adds 0.025s, 4q)
Loading...