Skip navigation
Toggle Sidebar

Project Documentation

Alfa Version

The purpose of this plug-in is to give applications built on GigaSpaces platform more eviction strategies. This can be used in scenarios where you application is looking for granular control over entries that are evicted from the space.

GigaSpaces currently provides eviction functionality that removes entries from the Space when the JVM heap usage exceeds thresholds defined in schema files (aka cache policy LRU). LRU functionality evicts the "oldest" Entries from its memory. "Oldest"
Entries are determined by the time they were written or updated to the Space. This is not ideal in all scenarios. Some application want to leave the entries in the space in spite of not being updated/written to.

Roadmap

Here is the pending list of features I am planning to incorporate into this plug-in (in the order of priority)

  • A PU based implementation will be made available very soon
  • Support key fields of other types (only long data type is supported now)
  • Current version has only one eviction strategy which is to use high memory usage as the trigger and delete the oldest data clean-up algorithm
  • Planning to add more trigger and clean-up algorithm implementations. Here is the tentative list,

Triggers

  • Memory Usage Threshold
  • Command object based trigger - This will be based on a notify registration
  • Scheduler based trigger (most probably Quartz integration)
  • Processing Unit SLA Policy based eviction

Clean-up algorithms

  • Delete oldest/newest based on a key - oldest key values
  • Delete entries based on more than one field specified as a criterion - above is not fool proof. I needsomething that takes a where clause, for example I want to delete all the orders that have been processed (processed flag set to true etc)

Installation Instructions

Download the latest version of plug-in binaries and source code from the Downloads page,

  • Extract and add the CustomEviction.jar to your application classpath
  • Modify the EvictionConfig.properties file with the high and low watermark numbers. If you do not know what works for you use the defaults from the file (Low - 60 and High - 75)
  • Modify the EvictionEntries.properties file to list the Entries eligible for Custom Eviction. Also specify the criterion to be used for eviction (More about how to determine this is in the documentation section)
  • Add the modified versions of these 2 files into your application classpath
  • Custom eviction logic will be triggered based when JVM memory usage exceeds the high watermark threshold

Usage Instructions

Current version of CustomEviction plug-in can be used only with Java 5 and above. Currently only High Memory Usage eviction strategy is available and this relies on setUsageThreshold API part of Java Memory Management package. This package was introduced only with Java 5

Plug-in is tested with 5.2 and 6.0 versions of GigaSpaces. It might work with earlier versions of GigaSpaces as well (not tested)

Plug-in can be run in 2 modes.

  • Embedded logic running as an IWorker
  • Remotely as a standalone process. In this mode there is no memory usage notification. It can be used to clean-up and reduce memory usage of a space/cluster

Examples

Add examples showing how to use your extension.

Screenshots

Attach screenshots to your page using the Attachments link under the page title on the right.

Screenshots
There are no images attached to this page

Adaptavist Theme Builder Powered by Atlassian Confluence