This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

MySQL instead of Eggdrops userfile?

General support and discussion of Eggdrop bots.
k
kmail
Voice
Posts: 8
Joined: Thu May 04, 2006 10:42 am

MySQL instead of Eggdrops userfile?

Post by kmail »

Hello,
Could anyone tell me if there are some solutions available what would enable to use mySQL database instead of Eggdrops userfile? I mean that eggdrop gets everything concerding the users from a mySQL database and saves everything there too + the old userfile system would be no longer used.
I would appreciate any information concerning this problem :)
k
kmail
Voice
Posts: 8
Joined: Thu May 04, 2006 10:42 am

Post by kmail »

Cmon, I cannot believe that anyone has never thought about it :shock:
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

People might have, but it'd just be slow. I can assure you that the eggdrop using memory for users is a hell lot faster than querying the mysql server.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I would suggest doing either timed exports to mysql or drop it at all. for updates you can connect to the bot via telnet either as user or as bot, for the later one you could request to download current zipped userfile.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
k
kmail
Voice
Posts: 8
Joined: Thu May 04, 2006 10:42 am

Post by kmail »

Okay, thanks for the information, I'll just try to find some other way instead of using mySQL :)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

What's so bad about using the existing method (textfile format)?
k
kmail
Voice
Posts: 8
Joined: Thu May 04, 2006 10:42 am

Post by kmail »

IMHO mysql is universal, easy access for every other program too besides eggdrop + everything is organized in tables.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

SQL and ODBC might be universal.
Even so, many sql-engines have different features and extensions, not always 100% compatible with eachother. And to be honest, do I really want other programs tampering with my user database? Probably not..

Abit off-topic there I guess, so lets get back on topic:
First of all, I would'nt wanna bug admins to install an sql (mysql or any other) server just in order for me to run an eggie.
Next there's the immense queries you'd risk ending up with on even an average populated channel.. Whenever any user-permissions are checked, you'd be required to send queries (which would include, but not be limited to, any binding supporting flags, etc)

You could always manually dump the userlist data into a sql-database every 5minutes or so I guess, assuming that you do not intend to use sql-queries to alter data. Should'nt be too hard to accomplish with either a commandline client (such as mysqlclient), or some extensions such as libmytcl (or something like that, should be able to find a few threads on compiling such with eggies on the forum)
NML_375
User avatar
ZEXEL
Halfop
Posts: 45
Joined: Tue Jun 27, 2006 10:47 pm
Contact:

I think...

Post by ZEXEL »

I think textfile is better and simple more than SQL database coz it's have minimum risky! :wink:
.:[ Knowledge Is The Power ]:.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

kmail wrote:IMHO mysql is universal, easy access for every other program too besides eggdrop + everything is organized in tables.
Being that the userfile is a text format, it's not that hard to create parsers for it. Personally, I found learning sql *painful* and thankfully I do not remember a single thing about it anymore (it was a job that required me to learn it ;/ )
S
SkIRmiS
Voice
Posts: 3
Joined: Fri Oct 28, 2005 7:58 am

Re: MySQL instead of Eggdrops userfile?

Post by SkIRmiS »

kmail wrote:Hello,
Could anyone tell me if there are some solutions available what would enable to use mySQL database instead of Eggdrops userfile? I mean that eggdrop gets everything concerding the users from a mySQL database and saves everything there too + the old userfile system would be no longer used.
I would appreciate any information concerning this problem :)
Hello, I did that.

Everything is in the Mysql DB:
- Users, passwords, extra info
- Bots CFG files
- Login sessions managment
- Permisions managment ( global and local channel )
- Bans managment
- Various statistics ( chan top10, seen, join/parts etc. )
- Gather managment and statistic
- Channel managment
- New Bot creation and configuration via WEB
- Login via WEB
- Etc.

Mysql does'nt slow down the bot. Now are runing about 45 bots that shares the same Mysql DB and about 1000 registered users. Bots does about 1 milinion queries per day and about 10/s. In future in think to do that some information will be in memory and after a while everything is saved into Mysql DB to save CPU power. Now Server CPU is used at 1-3% ( XP Athlon 1900+ ). Sorry for my bad english language.

SkIRmis
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Skirmis: Did you release this modification for the public, is it available?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Im currently making such a modification at the moment using TCL to overwrite the main proc's and to use a mysql module for the mysql crap. I might make it in C as a proper eggdrop module. I will finish it and release it for testing soon.
r0t3n @ #r0t3n @ Quakenet
i
innu
Voice
Posts: 10
Joined: Sun Aug 20, 2006 4:36 pm

Post by innu »

Tosser^^ wrote:Im currently making such a modification at the moment using TCL to overwrite the main proc's and to use a mysql module for the mysql crap. I might make it in C as a proper eggdrop module. I will finish it and release it for testing soon.
Any new information?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

using SQL is an overkill for the simple task of reading userfile ONCE (on (re)start) and writing it back ONCE an hour

another matter is that the proprietary text format eggdrop uses should be replaced with XML schema, thus allowing for easy userfile manipulation by external tools; but eggdrop is an antiquated piece of software anyway and that won't happen
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
Post Reply