< Previous
Next >

: I don't really want to go to sleep, so I'll explain the beautiful caching a little bit. Helm has an access control list which grabs a bunch of information from the database when you log in. Whenever you do something that requires a permission check, your ACL runs a little algorithm to see if any of your roles give you the required permission. Displaying your start page, for instance, requires over a hundred permission checks, so this piece of code gets run a lot.

What the beautiful caching does is it stores the results of previous permission checks so that the next time that same permission is checked, it doesn't have to run the algorithm again. The cost of running the algorithm has been reduced to the cost of a hash table lookup. Anything that invalidates the beautiful cache also invalidates your ACL, so you don't need to worry about invalidation. It is, in a word, beautiful.

Permission checking used to cause over half of the user-visible delay on Tigris sites, just because it was such a common action. The beautiful caching (in association with other types of caching) basically reduces this to zero; as Jody said, "At last, free checking." Unfortunately, I neglected to backport beautiful caching to the 1.0 branch, so JXTA doesn't have it right now. But it probably will soon.

Next time: Clustering, RMI, and You


[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.