Re: [NeoStats-Devel] SeenServ
"DeadNotBuried" <dnb-4ct+qsaILySks/lY53/[email protected]>
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Organization | Majestic Liaisons |
| Message-ID | <007b01c52959$37debea0$0100a8c0@dnblaptop> |
Justin Wrote: > Are you keeping the entire SeenServ database in memory? This doesn't sound > like the best way to do it, I would actually write it so each update (eg, > SIGNON, JOIN etc) gets written to database (you might want to write it to > queue up the writes say every 5 minutes) and only read out of the database > when you get a "!seen" request. That way, we don't waste memory holding > hundreds (thousands) of entries that might never get referenced. > > Also, something to consider, one of the largest users (that I know of) of > NeoStats has roughly 7000 users online at any one time. You can imagine how > many connects they get a day... So maybe a record option is good, but also a > time option as M suggest should be considered. it currently does hold the entire db in memory, I had a look through the DBA stuff in the core, but couldn't find anything that could read through in order, or have multiple keys for searching. currently the records are stored with the nick being used as the key. when new events occur. if the nick has an event in the list already, it removes the old event for the nick before appending the new one, thus keeping the list in time order always and not duplicating nicks. so far since I added the saving to the database earlier today, it has seen around 5000 events, but only had 37 entries in it's list due to the same nicks causing the events. adding a timed expiry should be real easy as the times are kept on each record. with an option to use record count or time, or both. having it work completely from a file instead of memory is another story, and will probably need help with that one to have any chance of getting it right with my level of knowledge at the moment :) DNB