Over a million developers have joined DZone.

Mongoid Collection Snapshot - Great for MapReduce

· Database Zone

To stay on top of the changing nature of the data connectivity world and to help enterprises navigate these changes, download this whitepaper from Progress Data Direct that explores the results of the 2016 Data Connectivity Outlook survey.

Another fine open-source contribution from @aaw, mongoid_collection_snapshot: easy maintenance of collections of processed data in MongoDB with the Mongoid ODM.

 

https://github.com/aaw/mongoid_collection_snapshot


This turned out to be extremely useful in many map-reduce scenarios where we do lengthy computations that output data that is used as a complete and consistent set. For example, calculating average prices across ranges of items (the example in the documentation). Another good use can be for tags stored as arrays of strings – you want to know how many items are tagged with a given entry. We can now take my incremental tag count map-reduce and replace it with a much more trivial implementation that uses this gem.

Turn Data Into a Powerful Asset, Not an Obstacle with Democratize Your Data, a Progress Data Direct whitepaper that explains how to provide data access for your users anywhere, anytime and from any source.

Topics:

Published at DZone with permission of Daniel Doubrovkine. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}