[djabberd] kane, r795: r6532@coke: josboum | 2008-08-05 16:30...
brad at danga.com
Wed Aug 6 18:54:35 UTC 2008
On Wed, Aug 6, 2008 at 11:02 AM, Martin Atkins <mart at degeneration.co.uk>wrote:
> Brad Fitzpatrick wrote:
>> Yeah, that works, or some general accessor on vhost.
>> Perhaps during configuration parsing, we keep a map from classname to
>> instantiated object, and then clients can say
>> $vhost->by_class("DJabberd::RosterStorage") and then the vhost iterates over
>> all its instantiated objects looking for something that
>> UNIVERSAL::isa("DJabberd::RosterStorage"), finding first, say,
>> "DJabberd::RosterStorage::SQLite" and caching that in some vhost member
>> hashref to make lookup faster later.
> Did you mean this to be specifically for RosterStorage?
> I ask because for other types it's not uncommon for the same class to be
> instantiated several times in the same VHost. Consider
> DJabberd::Component::External, for example.
> Since the roster-related hooks have a decline method on $cb I assume that
> it's intended to be possible for there to be several RosterStorage plugins
> loaded simultaneously too. I guess you could imagine overlaying a writable
> sqlite rosterstorage with a read-only LDAP one that declines all writes to
> allow them to pass through.
I haven't thought about it much. I just don't want globals.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Djabberd