| View previous topic :: View next topic |
| Author |
Message |
kmail Voice
Joined: 04 May 2006 Posts: 8
|
Posted: Wed Nov 08, 2006 3:23 pm Post subject: MySQL instead of Eggdrops userfile? |
|
|
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  |
|
| Back to top |
|
 |
kmail Voice
Joined: 04 May 2006 Posts: 8
|
Posted: Thu Nov 09, 2006 11:48 am Post subject: |
|
|
Cmon, I cannot believe that anyone has never thought about it  |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Thu Nov 09, 2006 2:51 pm Post subject: |
|
|
| 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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu Nov 09, 2006 3:16 pm Post subject: |
|
|
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 |
|
 |
kmail Voice
Joined: 04 May 2006 Posts: 8
|
Posted: Thu Nov 09, 2006 4:13 pm Post subject: |
|
|
Okay, thanks for the information, I'll just try to find some other way instead of using mySQL  |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Thu Nov 09, 2006 7:29 pm Post subject: |
|
|
| What's so bad about using the existing method (textfile format)? |
|
| Back to top |
|
 |
kmail Voice
Joined: 04 May 2006 Posts: 8
|
Posted: Fri Nov 10, 2006 11:03 am Post subject: |
|
|
| IMHO mysql is universal, easy access for every other program too besides eggdrop + everything is organized in tables. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Nov 10, 2006 1:11 pm Post subject: |
|
|
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 |
|
 |
ZEXEL Halfop

Joined: 27 Jun 2006 Posts: 45
|
Posted: Fri Nov 10, 2006 2:24 pm Post subject: I think... |
|
|
I think textfile is better and simple more than SQL database coz it's have minimum risky!  _________________ .:[ Knowledge Is The Power ]:. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Nov 10, 2006 6:38 pm Post subject: |
|
|
| 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 |
|
 |
SkIRmiS Voice
Joined: 28 Oct 2005 Posts: 3
|
Posted: Sun Nov 12, 2006 9:14 am Post subject: Re: MySQL instead of Eggdrops userfile? |
|
|
| 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 |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sun Nov 12, 2006 1:07 pm Post subject: |
|
|
| Skirmis: Did you release this modification for the public, is it available? |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Nov 12, 2006 8:54 pm Post subject: |
|
|
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 |
|
 |
innu Voice
Joined: 20 Aug 2006 Posts: 10
|
Posted: Wed Dec 13, 2006 6:14 pm Post subject: |
|
|
| 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 |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Dec 14, 2006 12:53 am Post subject: |
|
|
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 |
|
 |
|