The new operators will allow developers to sort and aggregate queried data into different groups and run operations against this data. A new set of mathematical expressions can add, subtract, multiply and perform other simple calculations. A set of logical operators can create user-defined computed fields. Other expressions can work on strings and date and time data. The framework provides a Unix-like pipes capability, which developers and administrators can use to build a chains of commands to filter and sort data results.
To build a query, "the client constructs a JSON document that represents a pipeline that can be sent to the database," Rosoff said.
Beyond the aggregation framework, MongoDB comes with a number of other significant new features. One is tag-aware sharding, which will allow organizations to distinguish different groups of nodes, such as all the nodes that run in one data center, or all the nodes that are saving replicas. A new locking mechanism could help performance, given that entire data store is now not locked for each single read or write operation.
One organization looking forward to the new release is Badgeville, which uses the data store for the online awards service it runs for its customers. Badgeville Chief Technology Officer Wedge Martin anticipates using the aggregation framework. "It is a nicely written framework to pull out data and do aggregation instead of running MapReduce jobs," Martin said.
The tagging feature may also prove useful to the Badgeville. For instance, replica nodes can be identified so that computationally intensive analytic queries can run only against these nodes, eliminating the load such jobs would put on the first line production nodes. "You never impact production performance," Martin said. Geographically based load balancing can also be done using a set of tags as well.
"We've been very happy with MongoDB," Martin said.