This project is read-only.
The code for this demo is no longer hosted on CodePlex as the entire NMF Framework has been migrated to GitHub. There are now two demos available under https://github.com/NMFCode/ConnectivityBenchmark and https://github.com/NMFCode/QueryBenchmark while the code for NMF Expressions is available at https://github.com/NMFCode/NMF.

The purpose of this project is to demonstrate the NMF Expressions project for an example query and compare the project with the traditional polling mechanism, i.e. the execution of a traditional LINQ query.

var employeesList = new List<Employee>();
var employeesCollection = new ObservableCollection<Employee>();

var pollQuery = from employee in employeesList
      group employee by employee.Team into team
      let teamAvg = team.Average(member => member.WorkItems)
      from collegue in team
      where 2 * collegue.WorkItems < teamAvg
      select collegue;

var incQuery = from employee in employeesCollection.WithUpdates()
      group employee by employee.Team into team
      let teamAvg = team.Average(member => member.WorkItems)
      from collegue in team
      where 2 * collegue.WorkItems < teamAvg
      select collegue;

The scenario is as follows: Employees have a name, a team and a couple of work items assigned to them. The task is to fetch the employees who have less than half work items assigned to them than the average of their team.

The above code listing shows how this task is solved both for a traditional polling query using LINQ and for an incremental query using NMF Expressions. The purpose of this project is to compare both solutions and measure them in regard to correctness, runtime and memory consumption.

Last edited Oct 16, 2015 at 4:00 PM by georghinkel, version 5