Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MongoDB for Analytics

Zizaco
August 31, 2016

MongoDB for Analytics

MongoDB for Analytics
Tips and Tricks

Vídeo da Apresentação no 7masters (2016/08/31): http://setemasters.imasters.com.br/conversas/mongodb-for-analytics-por-zizaco/

Luiz Fernando / Zizaco

- Software Developer

- Product Owner

- Leroy Merlin (Laravel)

- Keep learning

http://zizaco.net

Devo usar NoSQL e/ou MongoDB?

Quais os pontos que podem levar a decisão de utilizar uma tecnologia NoSQL em uma aplicação para web?

http://tech.leroymerlin.com.br/devemos-usar-nosql-e-mongodb

Analytics is the discovery, interpretation, and communication of meaningful patterns in data. Especially valuable in areas rich with recorded information, analytics relies on the simultaneous application of statistics, computer programming and operations research to quantify performance. Analytics often favors data visualization to communicate insight.
- Wikipedia

MongoDB for Analytics

- Issues with common bad practices.
-

Outstanding performance from good practices

1.Captura de eventos básica

2.Write concern

3.Time bucketing

4.Aggregate and store (histograms)

4.Aggregate and store (contexts)

5.Pré-aggregation (histograms)

6.TTL ou Capped collection

7. Scaling

Fontes:

MongoDB For Analytics (at Github) - John Nunemaker
https://www.mongodb.com/presentations/mongosv-2012/mongodb-analytics-github

First Steps of an Analytics Platform With MongoDB - Chris Winslett
https://www.compose.com/articles/first-steps-of-an-analytics-platform-with-mongodb/

How Buffer Uses MongoDB to Power Our Growth Platform - Sunil Sadasivan

https://overflow.buffer.com/2014/07/09/how-buffer-uses-mongodb-to-power-its-growth-platform/

Pre-Aggregated Reports - docs.mongodb.com
https://docs.mongodb.com/ecosystem/use-cases/pre-aggregated-reports/

TTL Indexes - docs.mongodb.com
https://docs.mongodb.com/manual/core/index-ttl/

MongoDB Real-time Data Collection and Stats Generation - Damon Cortesi

http://www.slideshare.net/dacort/mongodb-realtime-data-collection-and-stats-generation

Zizaco

August 31, 2016
Tweet

More Decks by Zizaco

Other Decks in Technology

Transcript

  1. MongoDB for Analytics
    Tips and Tricks

    View Slide

  2. Who am I?
    ● Software Developer
    ● Product Owner
    ● Leroy Merlin (Laravel)
    ● Keep learning
    http://zizaco.net
    Luiz Fernando / Zizaco

    View Slide

  3. Devo usar NoSQL e/ou MongoDB?
    Quais os pontos que podem levar a decisão de
    utilizar uma tecnologia NoSQL em uma
    aplicação para web?
    tech.leroymerlin.com.br/devemos-usar-nosql-e-mongodb

    View Slide

  4. Analytics
    Analytics is the discovery, interpretation, and
    communication of meaningful patterns in data.
    Especially valuable in areas rich with recorded
    information, analytics relies on the simultaneous
    application of statistics, computer programming and
    operations research to quantify performance. Analytics
    often favors data visualization to communicate
    insight.
    - Wikipedia

    View Slide

  5. MongoDB for Analytics
    Issues with common bad practices.
    Outstanding performance from good
    practices

    View Slide

  6. 1.Captura de eventos básica

    View Slide

  7. 2.Write concern

    View Slide

  8. 2.Write concern
    ?

    View Slide

  9. 3.Time bucketing

    View Slide

  10. 4.Aggregate and store
    (histograms)

    View Slide

  11. 4.Aggregate and store
    (histograms)

    View Slide

  12. 4.Aggregate and store
    (contexts)
    db.events.aggregate(...)
    db.users.update(...)
    db.eventsHistogram.insert(...)
    db.fooBar.insert(...)

    View Slide

  13. 5.Pré-aggregation (histograms)

    View Slide

  14. 5.Pré-aggregation (histograms)

    View Slide

  15. 6.TTL ou Capped collection

    View Slide

  16. View Slide

  17. View Slide

  18. 6. Scaling

    View Slide

  19. 7. Scaling more

    View Slide

  20. Fontes
    MongoDB For Analytics (at Github) - John Nunemaker
    https://www.mongodb.com/presentations/mongosv-2012/mongodb-analytics-github
    First Steps of an Analytics Platform With MongoDB - Chris Winslett
    https://www.compose.com/articles/first-steps-of-an-analytics-platform-with-mongodb/
    How Buffer Uses MongoDB to Power Our Growth Platform - Sunil Sadasivan
    https://overflow.buffer.com/2014/07/09/how-buffer-uses-mongodb-to-power-its-growth-platform/
    Pre-Aggregated Reports - docs.mongodb.com
    https://docs.mongodb.com/ecosystem/use-cases/pre-aggregated-reports/
    TTL Indexes - docs.mongodb.com
    https://docs.mongodb.com/manual/core/index-ttl/
    MongoDB Real-time Data Collection and Stats Generation - Damon Cortesi
    http://www.slideshare.net/dacort/mongodb-realtime-data-collection-and-stats-generation

    View Slide