Notifications

Windows Server AppFabric Caching
WSAF Caching can be configured to provide asynchronous notifications to cache clients when changes occur at the cache, region, or individual item level. Internally, cache hosts maintain notification queues, and WSAF client libraries periodically poll the hosts (every 300 seconds, by default) to learn about changes that need to be raised as notifications in your application code.
ScaleOut StateServer

Events in ScaleOut StateServer differ significantly from WSAF Caching. ScaleOut StateServer’s event feature can notify your application whenever an object is being automatically removed by the service. Events are raised under the following circumstances:

  • An object is about to expire due to a timeout.
  • An object is about to be evicted due to a lack of available memory.
  • An object is about to be removed because it is dependent on another object, and that parent object is being removed/updated.

A common use case for expiration events is to use them to save an expiring object to a more persistent storage medium, such as a database. Event handlers are also given the opportunity to cancel the removal so that the object will remain in the data grid.

Another significant difference is that event delivery is load balanced among instances of your client application. ScaleOut hosts push events to clients rather than requiring clients to poll for them, and the service will retry delivery if a client application is temporarily unavailable. This results in a stronger guarantee of event delivery and a more scalable event distribution model.

ScaleOut StateServer does not directly support delivering events to all clients for all Add/Replace/Remove events. (A primary use case for these notifications in WSAF Caching was to keep AppFabic’s local caches loosely synchronized with the authoritative service—ScaleOut’s fully synchronized client cache doesn’t require this type of infrastructure.) ScaleOut’s backing store integration can be used for asynchronous notification of Add/Replace/Remove activity; please contact ScaleOut’s support team if you would like to discuss your requirement in more detail.

[Tip] Tip

ScaleOut’s event feature can raise your ASP.NET application’s Session_End event if you use ScaleOut’s ASP.NET session state provider.