Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Behavior Summary

The Jasig community would like to add "prefetching" capabilities to the News Reader Portlet.  This new feature should allow some sub-set of pre-defined feeds to be regularly pulled and cached on the server so that no individual user should experience a fetching delay while attempting to view that feed.  End users should not be allowed to create prefetched feeds to prevent performance problems from overusage or poorly behaving feeds.  Feeds should only be prefetched when they are eligible for caching between users.  If a feed is unavailable for a period of time, the code should continue to use the latest valid copy.

Proposed Changes

The existing INewsAdapter requires access to the PortletRequest while retrieving news feeds.  A prefetching implementation would need to be able to request feeds without access to a specific PortletRequest object.

AntiSamy Configuration

  1. Set default AntiSamy policy in configuration.properties
  2. Override on a feed-specific basis in an adapter property

New IPrefetchableNewsAdapter API

INewsAdapter

  • getSyndFeed(NewsConfiguration config, PortletRequest request)

IPrefetchableNewsAdapter extends INewsAdapter

  • getSyndFeed(NewsDefinition def)

parameters

  • prefetching enabled/disabled
  • fetch frequency

Caching and Prefetching Implementation

  1. Query database for registered feeds with prefetching enabled
  2. Use Quartz/Spring Timer to regularly fetch feeds.  Upon successful fetch, update cache
  3. Caching via ehcache configured such that feed should only be fetched by timer job.

 

 

  • No labels