egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL instead of Eggdrops userfile?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
kmail
Voice


Joined: 04 May 2006
Posts: 8

PostPosted: Wed Nov 08, 2006 3:23 pm    Post subject: MySQL instead of Eggdrops userfile? Reply with quote

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 Smile
Back to top
View user's profile Send private message
kmail
Voice


Joined: 04 May 2006
Posts: 8

PostPosted: Thu Nov 09, 2006 11:48 am    Post subject: Reply with quote

Cmon, I cannot believe that anyone has never thought about it Shocked
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Thu Nov 09, 2006 2:51 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu Nov 09, 2006 3:16 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message MSN Messenger
kmail
Voice


Joined: 04 May 2006
Posts: 8

PostPosted: Thu Nov 09, 2006 4:13 pm    Post subject: Reply with quote

Okay, thanks for the information, I'll just try to find some other way instead of using mySQL Smile
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Nov 09, 2006 7:29 pm    Post subject: Reply with quote

What's so bad about using the existing method (textfile format)?
Back to top
View user's profile Send private message
kmail
Voice


Joined: 04 May 2006
Posts: 8

PostPosted: Fri Nov 10, 2006 11:03 am    Post subject: Reply with quote

IMHO mysql is universal, easy access for every other program too besides eggdrop + everything is organized in tables.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Nov 10, 2006 1:11 pm    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
ZEXEL
Halfop


Joined: 27 Jun 2006
Posts: 45

PostPosted: Fri Nov 10, 2006 2:24 pm    Post subject: I think... Reply with quote

I think textfile is better and simple more than SQL database coz it's have minimum risky! Wink
_________________
.:[ Knowledge Is The Power ]:.
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Nov 10, 2006 6:38 pm    Post subject: Reply with quote

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 ;/ )
Back to top
View user's profile Send private message
SkIRmiS
Voice


Joined: 28 Oct 2005
Posts: 3

PostPosted: Sun Nov 12, 2006 9:14 am    Post subject: Re: MySQL instead of Eggdrops userfile? Reply with quote

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 Smile


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
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Nov 12, 2006 1:07 pm    Post subject: Reply with quote

Skirmis: Did you release this modification for the public, is it available?
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Nov 12, 2006 8:54 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
innu
Voice


Joined: 20 Aug 2006
Posts: 10

PostPosted: Wed Dec 13, 2006 6:14 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Dec 14, 2006 12:53 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber