clarencen/lshift — Issue #52: Support caching of zoomed data
Author: clarencen
Created: 2011-11-14 22:41:30+00:00
State: open

Zoomed data is currently re-calculated on every request, regardless of the changes that have occurred. This can be very expensive, and isn't easily cached when users can zoom or pan.

The proposed design for resolving this is:

- Consider the heatmap to be made up of a series of tiles;
- When the heatmap is being rendered, generate the zoom response by assembling the visible tiles (where a tile is a cached time slice of aggregates at a given zoom level). Tiles are created on demand, and stored in a LRU cache;
- Zooming currently consists of doubling or halving the current view, allowing for many different zooms. To make the caching work more effectively, these zoom levels should be fixed to a given set of values;
- When slicing a heatmap into tiles, the tiles should be time aligned to ensure that as time passes the tiles don't need to be rebuilt;
- Cached tiles can be purged whenever a write is done against the store;

Follow up tickets:

- #354 for more intelligent zoom requesting