The Aggregator has been built upon the MapReduce framework and processes distributed data records to return compiled and statistical results. As the name indicates, the Aggregator is used to perform an operation over a range of values to produce a small number of results for analytical purposes. In other words, NCache’s built-in Aggregator is essentially a MapReduce Task, but with a broader set of Aggregation operations. Note that the users can also implement their own Aggregator if required.
The Aggregator basically converts the input data from multiple sources into meaningful key-value pairs and can perform a variety of mathematical operations like summing up values, calculating averages, finding minimum/maximum values etc. to return a single result.
In order to implement Aggregator follow these steps.
The name of the cache used in this example is demoClusteredCache. Update the cache name according to your own cache.
In case you want to update any cache settings please refer to the Update Cache Config section to follow the set of steps.
Make sure Aggregator has been implemented as described in the Aggregator section. This assembly will then be deployed using following steps.
Create a new directory named 'deploy' in %NCHOME%.
Create a new directory in %NCHOME%/deploy and name it with the cache name where you want your assemblies to be deployed, for example demoClusteredCache.
Place the assembly Aggregator.dll (created before step 2) for the implementation of Aggregator in this folder.
The assembly will be placed at "C:\Program Files\NCache\deploy\demoClusteredCache".