Sean,
Great lead. Looks very exiting.
Sean Chittenden wrote:
So I'm working on the ACL code, looking to reduce the number of queries
that are currently made. At the moment, every call to acl_has_right in
imapcommands.c results in a query. Ideally, we would only query the the
dbmail_acls table once, get all of the columns in one shot, and remember
that.
Right now, a change of permissions in the dbmail_acls table will take
nearly immediate effect because the next time imapcommands.c calls
acl_has_right, the new rights are retrieved.
Question is, do we care? Would it be alright to only pull in new ACLs
once
at the beginning of each IMAP session?
Doesn't that sound a little too much like Microsoft and their solution
to nearly anything? "Oh, just restart your email client and you'll be
good to go." Or, "You now have access to folder ___folder___, but you
have to restart your email client or disconnect/reconnect to get
access." If database load is an issue, ship dbmail with memcached
support and query memcached via libmemcache(3). If the database is
PostgreSQL, use pgmemcache to invalidate the cache instantaneously.
http://www.danga.com/memcached/
http://people.FreeBSD.org/~seanc/libmemcache/
http://people.FreeBSD.org/~seanc/pgmemcache/
This is how I'd solve this problem as the problem you're describing is
over reliance on an RDBMS. Caching the data is absolutely a-okay... but
if reliance on memcached isn't an option, a better solution/suggestion
would be to have the imap daemon cache the data for a period of time,
such as 30 seconds or 300 seconds.
-sc
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl