Quantcast
Channel: Comments on: Using the MongoDB Aggregation Framework in Grails
Viewing all articles
Browse latest Browse all 5

By: Marc Esher

$
0
0

Ray, I think the answer to your question is actually database-agnostic. Replace the above with a relational database and you have the same questions: How frequently does the data change? What is the cost of this query? Can I run it on a schedule and cache the results? Do I need real-time data? If I need real-time data should I consider a materialized view?

In this example, where the data are quite static, then yeah, absolutely it’s cache-worthy. However, if I’m storing real-time traffic or shopping cart patterns or performance logs, then probably I want it real time. However, in that case, you would probably look into just fetching the latest data and aggregating it, keeping track of where you left off (which is common practice).


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images