Slide 1

Slide 1 text

MongoDB for Analytics Tips and Tricks

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

1.Captura de eventos básica

Slide 7

Slide 7 text

2.Write concern

Slide 8

Slide 8 text

2.Write concern ?

Slide 9

Slide 9 text

3.Time bucketing

Slide 10

Slide 10 text

4.Aggregate and store (histograms)

Slide 11

Slide 11 text

4.Aggregate and store (histograms)

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

5.Pré-aggregation (histograms)

Slide 14

Slide 14 text

5.Pré-aggregation (histograms)

Slide 15

Slide 15 text

6.TTL ou Capped collection

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

6. Scaling

Slide 19

Slide 19 text

7. Scaling more

Slide 20

Slide 20 text

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