background preloader

Twitter

Twitter

Gabriel Sejournant (gab2003) sur Twitter Counting Unique Items with Map-Reduce | The MongoDB Cookbook Credit: Kyle Banker Problem You have a collection that stores pageviews by user, and you want to count the total number of unique user visits per day using map-reduce. Each pageview document looks something like this: The solution requires grouping the pageviews by day and then counting the total number of user visits and along with the number of unique visits for that day. Solution What's tricky about this situation is that it requires a two-pass map-reduce in order to scale well. 1. Map Step The only tricky part about the map function is making sure that we emit on the day. If you want a more efficient date calculation, you can use this: day = (24 * 60 * 60) % this.date; Reduce Step The reduce function is trivial, as it simply performs a count: Run the command We run the mapReduce command, storing the output in the pageview_results collection: 2. Now that we have a prelimiary set of results, we can do a second pass to count unique users by day. Running the command That's all there is to it! 5.

‫أدمين هرّابينو - الفيديو الذي فسخه النهضواين عديد المرات | Facebook‬ scroll wiki and wiki forms Strategies for Reducing Wasted Space in MongoDB ObjectRocket Blog | ObjectRocket Blog - Industrial Strength MongoDB Appboy is the world’s leading marketing automation platform for mobile apps. We collect billions of data points each month by tracking what users are doing in our customers’ mobile apps and allowing them to target users for emails, push notifications and in-app messages based on their behavior or demographics. MongoDB powers most of our database stack, and we host dozens of shards across multiple clusters at ObjectRocket. One common performance optimization strategy with MongoDB is to use short field names in documents. That is, instead of creating a document that looks like this: In addition to collecting event data, Appboy also lets our customers store what we call “custom attributes” on each of their users. To solve this, we tokenize the custom attribute field names using what we call a “name store.” The name store document schema is extremely basic: there is one document for each customer, and each document only has one array field named “list.” Want to learn more?

Après les Etats-Unis et la Suède, l'Italie observe également une pluie d'oiseaux morts L'Italie est, après les États-Unis et la Suède, le troisième pays à observer une pluie d'oiseaux morts. C'est au nord-est du pays, à Faenza, que des tourterelles et des pigeons sont tombés du ciel. Certains y voient la fin du monde, d'autres une étrange coïncidence. Après les Etats-Unis et la Suède, l'Italie est également frappée par une pluie mystérieuse d'oiseaux morts. Le phénomène s'est déroulé à Faenza, au nord-est du pays, avec cette fois-ci des tourterelles et des pigeons. Mais contrairement aux autres chutes d'oiseaux observées depuis quelques jours, la raison serait ici connue. Lire également : - Une pluie d'oiseaux morts s'abat sur une ville de l'Arkansas - La Suède également touchée par une pluie d'oiseaux morts Vous êtes déjà abonné ?

Ideo Technologies (IdeoTech) sur Twitter Chosen as Technology Provider to Deliver Accurate Data from The Weather Channel to Hundreds of Thousands of Subscribers The Weather Channel Now Transitioning All Digital Properties to MongoDB PALO ALTO, Calif., and NEW YORK — October 1, 2014 — MongoDB today announced that weather.com, the online home of The Weather Channel brand, uses MongoDB to serve data for the company’s newest iOS and Android apps. The apps provide trusted, accurate weather data to more than 40 million users, including severe weather alerts to subscribers in affected geographic locations, in real time. The Weather Channel modernized its back-end services on a cloud infrastructure to allow users to personalize their experiences across mobile devices, tablets and the website. “As part of our infrastructure redesign, we needed to ensure that new app development was never waiting on the back-end,” said Luke Kolin, vice president of architecture at The Weather Channel. Every minute, the app handles 2 million requests, and weather data updates from tens of thousands of locations around the globe. About MongoDB Inc.

Related: