[Dbbalancer-users] Re: Request for comments
Status: Alpha
Brought to you by:
xperience
From: Andrew M. <an...@ca...> - 2001-11-06 00:03:11
|
On Tue, 2001-11-06 at 09:40, Daniel Varela Santoalla wrote: > On Sun 04 Nov 2001 00:13, you wrote: > > > The idea I have so far is: > > > > 1) Have a directory of configuration scripts for the various databases > > to be 'balanced'. I would make this directory in /etc/dbbalancer/conf.d > > which would conform to the way Debian does these sorts of things. > > > > 2) My init script would then go through each configuration file in the > > directory, starting a DBBalancer daemon for each one. > > I see a problem with this one. The "reader" or "writer" operation is not > thought to be extracted from the configuration file, as this file should be > shared between a reader and a writer. The difference was in the "-r" or "-w" > parameter. Maybe it could be better to use different config files for the > reader and the writer, but they share almost all parameters (except for the > port)... We have to find the best solution for this... Good point. Would it be possible to add a parameter into the configuration file which overrode the default, but was in turn overridden by the command line? Alternatively, I could have my script use something of the configuration file name, so that files xxxxx.conf were readers and xxxxx-w.conf were writes. Crude, but workable. One gotcha I found writing my script is that DBBalancer checks that it's configuration file ends in ".conf" - I don't think that this check is really necessary. > > 3) The process ID for each process would be written in > > /var/run/dbbalancer/<confname> > > I'll have to make this path configurable, just like the UNIX socket path has > to be. I have the above scheme working under Debian by specifying the pidfile name as a parameter to the start-stop-daemon command. It works now, but there would be differences if the Daemon was writing it's own pidfile. > Well. I fully agree with the last three. The others are also good, but maybe > I have to change the way "readers" and "writers" are differentiated. Not a > big problem, anyway. I can't wait :-) Thanks, Andrew. -- -------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 |