Cache Architecture
Architecture and Design
Release Notes
XML Application Server
NetKernel Essentials
Concise Guide
NetKernel Module Overview
Process Scheduling
Netkernel Architecture Overview
Cache Architecture
Virtual FileSystem Guide
License
Change History
NetKernel History
Acknowledgements

Cache Architecture

Discussion on how caches work and conventions on usage in the Salisbury distribution

Choice of Cachelet

Each module can specify a cachelet implementation in its module.xml. See Module Development Guide. If no cachlet is specified the system default defined in system.xml is used. If no cache is defined here then no cache is used. (see the tuning guide.)

What is Cached?

The NetKernel scheduler will attempt to cache the results of all source and transrepresent requests. Requests to delete and sink invalidate any cached result.

Resources are cached under their mapped URI not the requested URI. This means that multiple clients that might reference the same underlying resource in differing ways are both assured of using the same cached value.

Resource Metadata

Resources are not cached and not returned from caches if their metadata indicates they have expired.

IURRepresentations which are marked as intermediate in their metadata are never cached.

Resources have a cost of creation value in their metadata. This indicates to caches the relative cost of recreating a resource if it is not cached.

Dependency Meta

It is a convention in 1060 Research supplied modules in the distribution that that accessors and transreptors accumulate creation costs and build dependency based expiry model for all representations. This convention creates metadata for representations that enables extremely efficient caching to be achieved. (See the next section.)

This convention is achieved by all accessors and transreptors that create results that are based on other resources to use org.ten60.netkernel.layer1.meta.DependencyMeta as the implementation of their metadata. Dependent resources are then added to this and their costs and dependencies are accumulated.

DependencyCostCache Implementation

The NetKernel Salisbury distribution ships with the Standard Cache urn:org:ten60:netkernel:cache:standard module. It contains two cache implementations org.ten60.netkernel.cache.DependencyCostCache which implements the best general purpose caching policy. A second cache org.ten60.netkernel.cache.AccessorCache provides just caching for accessors but all resources are uncached. This can is useful when developing and debugging.

For configuration of the cache see the tuning guide.

In Action

You can see the contents of the cache at anytime using the Cache Introspection View, see the live version for your system here.


1060® NetKernelTM Documentation
(C) 2003-2004 1060 Research Limited

Send Feedback

© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited