The Web Graph Database

wiki:Docs/StoreBackedMaps

Store-backed Maps

One of the core coding concepts for persistence in InfoGrid is the notion of a Store-backed map.

A Store-backed map exposes Java's java.util.Map interface to map keys to values. Internally, however, the Store-backed map typically does not store either keys or values, but delegates them to a Store. When a lookup needs to be performed, for example, the Store-backed map will consult with the Store, and if a data element is found, it will be automatically deserialized and re-instantiated before returning to the caller.

Store-backed maps are particularly efficient in combination with an in-memory cache.

This abstraction makes it simple to add persistence to many kinds of objects: simply maintain data as a map, and when persistence is required, use a Store-backed map instead of a standard Java in-memory-only map.

Last modified 5 years ago Last modified on 01/19/10 06:30:59