[rt-devel] Users::WhoHaveRight and Sybase and Sudden MySQL slowness

Aidan Mountford Aidan at oz.to
Fri Jun 27 04:06:19 EDT 2003


<...  Lots Deleted ...>

> How can you tell when another process changes the ACLs. Instead, we
> expire the cache after a timeout or when any internal change happens to
> the ACLs.

Several options - Either a local semaphore or a file (Could even be
/tmp/LastACLChange :)

Or a field in the DB that can be queried once per page display ...  One
fast query being better than 10 slow ones :)

The first issue obviously does not work too well if you have a clustered
environment unless the /tmp/ is on a shared mountpoint.

If you were in more of a butchers mood, this file could be generated by a
"background" process and simply read by processes that require it (ie when a
session starts - or the file's timestamp changes) - thereby reducing the
load
on the DB and keeping the whole cache local to the webserver.

> > The query itself could be a simple "Select * where user = X order by
Queue"
> > results
> > converted from this "flat" format to a heirarchial hash structure for
ease
> > of
> > implementation.

> That's very difficult when you've got roles to worry about.

Yes and no.  At any given time - a single user has only 1 effective access
list
to a nominated object.  This "effective" list is a function of your business
rules, the ACL's specified against the object for this user, and the roles
that is being played by that user.

Even a cache that say had roles as well we could go "Aidan at oz.to" as "Owner"
has
the right to "go to the pub and drink" :)

That would still present a "static" list that would not change ticket to
ticket.

The down side - is that as the number of users grows - you need 5 rows per
user..

But then again - ram is cheap :)  (oh no - slap me - i just did a
Microsoft.)

A




More information about the Rt-devel mailing list