Database
BDB problems:
A transaction per database and NO caching are lame.
Refactoring:
Currently, each plugin has its own database so that it can store its "settings". This is kinda overkill, since it would create a resident BDB engine for every plugin.
Why not just have one database the settings of all programs (the "registry"), and then let each plugin ask for its own database if it needs it?
For example, the markov plugin of the future could look like this:
class Markov < Plugin data_store :markovchain, :cache=>"1mb", :type=>:hash ... end
This would create a new BDB database, and assign it to an instance variable called @markovchain (or just make an accessor function called markovchain), with whatever extra performance options are required.
IRC Core
Should use EventMachine
- events usurp all other activity
- all events are wrapped and into a queue so that other threads can consume them
- Connect to multiple servers
Resources:
Roll your own IRC bot in Haskell (good IRC protocol reference)
Plugin Architecture
It's pretty good the way it is, but the fact that each plugin is its own thread could be problematic. I've seen some race conditions and fighting between plugins. This bears looking into.
Overall Performance
I think there are some bitchin' leaks in RBot. A memory profiler would be a good idea.
Ruby Memory Validator (Windows only)
