SlideShare une entreprise Scribd logo
1  sur  93
Télécharger pour lire hors ligne
MongoDB et
Elasticsearch,
meilleurs ennemis ?
<Nous />
<Serli />
Petit sondage ...
MongoDB
Elasticsearch
Projets types Mongo et Elasticsearch
Beaucoup de points communs
Mongo ou Elasticsearch ?
Comment choisir ?
Popularité ?
db-engines.com
db-engines.com
db-engines.com
Pas très fiable ...
Démarrage
rapide
Developer friendly
Vers le Minimum Viable Product
Installation d’un cluster Elasticsearch
2 minutes
cluster.name: my_cluster
$ ./elasticsearch
$ ./elasticsearch
config/elasticsearch.yml
Installation d’un replicaset Mongo
$ mongod --dbpath=~/mongo-data/0 --replSet rs0
$ mongod --dbpath=~/mongo-data/1 --replSet rs0 --port 27018
$ mongod --dbpath=~/mongo-data/2 --replSet rs0 --port 27019
rs.initiate()
rs.add("<hostname>:27018")
rs.add("<hostname>:27019")
mongo shell
2 minutes + 30 sec
Démarrer un noeud Elasticsearch en
Java
Settings settings = Settings. builder()
.put("http.port", "9200")
.put("network.host" , "localhost")
.put("path.home", "/tmp/es-unit-tests" )
.put("path.data", "/tmp/es-unit-tests-data" )
.build();
Node node = NodeBuilder. nodeBuilder()
.local( true)
.data(true)
.clusterName( "elasticsearch-unit-tests" )
.settings(settings)
.build();
node.start();
Data IN
Data OUT
MongoDB
MongoDB
Index dans MongoDB
Storage Engines (Mongo > 3.0)
Ecriture dans Elasticsearch
Near real-time ?
Index Inversé
⇒
Terme Documents
brian #1
sens #2
vie #2 #1
Mise à jour dans Elastic
Relations
Disclaimer
Relations dans MongoDB
⇒
Relations dans MongoDB
⇒
Relations dans Elasticsearch
Full Text Search
Je veu fair du fotbal
MongoDB Full Text Search
Full Text Search
Agrégations
Les agrégations
MongoDB aggregation pipeline
json
json
json
json
$match $unwind $group
$sum $avg $min $max
$addToSet$year $month$week
Les agrégations dans Elasticsearch
2015
1974json
json
json
json
json
json
2015
batte sabre
1974
gun sabre
2015
sabre
145.3
1974
gun
2.4
sabre
0.34
batte
245.3
Stockage de
fichiers
GridFS
Attachment Type
GridFS / Attachment Type
Pour stocker des fichiers...
Modèle
distribué
Modèle distribué
⇒
Modèle distribué
Write Consistency
Modèle distribué
⇒
Sharding
CAP
⇒
Call me maybe : Kyle Kingsbury
https://aphyr.com/tags/jepsen
Call me maybe - Elasticsearch
Call me maybe - MongoDB
Performances
Benchmark
Benchmark
Benchmarks sucks !
Production
Allez, on passe en Prod !
Systèmes vivants !
Ecosystème
Ecosystème MongoDB
Ecosystème MongoDB
Client Elastic
Ecosystème Elastic
Cloud
Alors, Mongo ou
Elasticsearch ?
Alors ? MongoDB ou ElasticSearch ?
Les deux ?
Même paradigme
Une solution
write read
Mais ...
write read
?
Teeing
write read
write
Batch Maison
write read
Message Queue
write read
read write
Write
Push
Rôle de l’Indexer
Dénormaliser
Exemple (sans Parent Child)
Tweets
Users
Tweets
Exemple update
Tweets
Users
Tweets
Précalculer
Exemple pré-calcul : nbTweets
Tweets
Users
Tweets
Exemple pré-calcul
Tweets
Users
Tweets
Pour conclure
Conclusion
Conclusion
Storage Mashup ;-)
Merci !
Drink & Food Time

Contenu connexe

Tendances

Les modèles NoSQL
Les modèles NoSQLLes modèles NoSQL
Les modèles NoSQL
ebiznext
 

Tendances (20)

M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change MethodsM|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
 
MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at Scale
 
Quand utiliser MongoDB … Et quand vous en passer…
Quand utiliser MongoDB	… Et quand vous en passer…Quand utiliser MongoDB	… Et quand vous en passer…
Quand utiliser MongoDB … Et quand vous en passer…
 
PostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | EdurekaPostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | Edureka
 
지적 대화를 위한 깊고 넓은 딥러닝 PyCon APAC 2016
지적 대화를 위한 깊고 넓은 딥러닝 PyCon APAC 2016지적 대화를 위한 깊고 넓은 딥러닝 PyCon APAC 2016
지적 대화를 위한 깊고 넓은 딥러닝 PyCon APAC 2016
 
[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
 
Alphorm.com Formation Big Data & Hadoop : Le Guide Complet
Alphorm.com Formation Big Data & Hadoop : Le Guide CompletAlphorm.com Formation Big Data & Hadoop : Le Guide Complet
Alphorm.com Formation Big Data & Hadoop : Le Guide Complet
 
Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 Overview
 
PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오
 
Mongo DB 성능최적화 전략
Mongo DB 성능최적화 전략Mongo DB 성능최적화 전략
Mongo DB 성능최적화 전략
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB Performance Tuning
MongoDB Performance TuningMongoDB Performance Tuning
MongoDB Performance Tuning
 
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
 
Using Time Window Compaction Strategy For Time Series Workloads
Using Time Window Compaction Strategy For Time Series WorkloadsUsing Time Window Compaction Strategy For Time Series Workloads
Using Time Window Compaction Strategy For Time Series Workloads
 
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
 
Les modèles NoSQL
Les modèles NoSQLLes modèles NoSQL
Les modèles NoSQL
 
Postgresql
PostgresqlPostgresql
Postgresql
 

En vedette

Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDBSplunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
MongoDB
 
Comparação de desempenho entre SQL e NoSQL
Comparação de desempenho entre SQL e NoSQLComparação de desempenho entre SQL e NoSQL
Comparação de desempenho entre SQL e NoSQL
pichiliani
 
Business Track: Building a Private Cloud to Empower the Business at Goldman ...
Business Track: Building a Private Cloud  to Empower the Business at Goldman ...Business Track: Building a Private Cloud  to Empower the Business at Goldman ...
Business Track: Building a Private Cloud to Empower the Business at Goldman ...
MongoDB
 
API Management architect presentation
API Management architect presentationAPI Management architect presentation
API Management architect presentation
sflynn073
 

En vedette (12)

Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDBSplunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
Splunk's Hunk: A Powerful Way to Visualize Your Data Stored in MongoDB
 
Comparação de desempenho entre SQL e NoSQL
Comparação de desempenho entre SQL e NoSQLComparação de desempenho entre SQL e NoSQL
Comparação de desempenho entre SQL e NoSQL
 
Business Track: Building a Private Cloud to Empower the Business at Goldman ...
Business Track: Building a Private Cloud  to Empower the Business at Goldman ...Business Track: Building a Private Cloud  to Empower the Business at Goldman ...
Business Track: Building a Private Cloud to Empower the Business at Goldman ...
 
Making Pretty Charts in Splunk
Making Pretty Charts in SplunkMaking Pretty Charts in Splunk
Making Pretty Charts in Splunk
 
Unified IT Monitoring: Beautiful Dashboards vs. Deep Reporting - What’s More ...
Unified IT Monitoring: Beautiful Dashboards vs. Deep Reporting - What’s More ...Unified IT Monitoring: Beautiful Dashboards vs. Deep Reporting - What’s More ...
Unified IT Monitoring: Beautiful Dashboards vs. Deep Reporting - What’s More ...
 
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation PipelinesMongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
MongoDB Europe 2016 - Advanced MongoDB Aggregation Pipelines
 
The Reference Model for an Open Archival Information System (OAIS)
The Reference Model for an Open Archival Information System (OAIS)The Reference Model for an Open Archival Information System (OAIS)
The Reference Model for an Open Archival Information System (OAIS)
 
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
Real-Time Analytics Visualized w/ Kafka + Streamliner + MemSQL + ZoomData, An...
 
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
How to leverage MongoDB for Big Data Analysis and Operations with MongoDB's A...
 
The Enterprise Service Bus is Dead! Long live the Enterprise Service Bus, Rim...
The Enterprise Service Bus is Dead! Long live the Enterprise Service Bus, Rim...The Enterprise Service Bus is Dead! Long live the Enterprise Service Bus, Rim...
The Enterprise Service Bus is Dead! Long live the Enterprise Service Bus, Rim...
 
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
 
API Management architect presentation
API Management architect presentationAPI Management architect presentation
API Management architect presentation
 

Similaire à MongoDB et Elasticsearch, meilleurs ennemis ?

2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp012014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
MongoDB
 
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Bruno Bonnin
 
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
MongoDB
 

Similaire à MongoDB et Elasticsearch, meilleurs ennemis ? (20)

Crud
CrudCrud
Crud
 
Réussir une montée en charge avec MongoDB
Réussir une montée en charge avec MongoDBRéussir une montée en charge avec MongoDB
Réussir une montée en charge avec MongoDB
 
Présentation mongoDB et mongoId
Présentation mongoDB et mongoIdPrésentation mongoDB et mongoId
Présentation mongoDB et mongoId
 
Tout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pasTout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pas
 
Tout ce que le getting started mongo db ne vous dira pas
Tout ce que le getting started mongo db ne vous dira pasTout ce que le getting started mongo db ne vous dira pas
Tout ce que le getting started mongo db ne vous dira pas
 
Ruby et MongoDB dans la pratique, MongoFR
Ruby et MongoDB dans la pratique, MongoFRRuby et MongoDB dans la pratique, MongoFR
Ruby et MongoDB dans la pratique, MongoFR
 
Mesurer la performance dans le milieu hostile du développement Java
Mesurer la performance dans le milieu hostile du développement JavaMesurer la performance dans le milieu hostile du développement Java
Mesurer la performance dans le milieu hostile du développement Java
 
Pytong2015
Pytong2015Pytong2015
Pytong2015
 
Installation Et Configuration De Nutch
Installation Et Configuration De NutchInstallation Et Configuration De Nutch
Installation Et Configuration De Nutch
 
Installation Et Configuration De Monkey Spider
Installation Et Configuration De Monkey SpiderInstallation Et Configuration De Monkey Spider
Installation Et Configuration De Monkey Spider
 
JBoss clustering et tuning (lab 3/3)
JBoss clustering et tuning (lab 3/3)JBoss clustering et tuning (lab 3/3)
JBoss clustering et tuning (lab 3/3)
 
Confoo 2022 - le cycle d'une instance MySQL
Confoo 2022  - le cycle d'une instance MySQLConfoo 2022  - le cycle d'une instance MySQL
Confoo 2022 - le cycle d'une instance MySQL
 
Pgbackrest meetup
Pgbackrest meetupPgbackrest meetup
Pgbackrest meetup
 
SQL Debug avec Django @ PyConFr 2015
SQL Debug avec Django @ PyConFr 2015SQL Debug avec Django @ PyConFr 2015
SQL Debug avec Django @ PyConFr 2015
 
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp012014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
 
Sec day cuckoo_workshop
Sec day cuckoo_workshopSec day cuckoo_workshop
Sec day cuckoo_workshop
 
Meetup CMS Rubedo 12 décembre 2013
Meetup CMS Rubedo 12 décembre 2013Meetup CMS Rubedo 12 décembre 2013
Meetup CMS Rubedo 12 décembre 2013
 
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
 
Breizhcamp : Guide de survie du développeur dans une application (Java) qui rame
Breizhcamp : Guide de survie du développeur dans une application (Java) qui rameBreizhcamp : Guide de survie du développeur dans une application (Java) qui rame
Breizhcamp : Guide de survie du développeur dans une application (Java) qui rame
 
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
 

Plus de Sébastien Prunier

Nantes JUG - Les News - 2013-10-10
Nantes JUG - Les News - 2013-10-10Nantes JUG - Les News - 2013-10-10
Nantes JUG - Les News - 2013-10-10
Sébastien Prunier
 

Plus de Sébastien Prunier (11)

De votre idée géniale à votre Minimum Viable Product - Café Techno Niort ...
De votre idée géniale à votre Minimum Viable Product - Café Techno Niort ...De votre idée géniale à votre Minimum Viable Product - Café Techno Niort ...
De votre idée géniale à votre Minimum Viable Product - Café Techno Niort ...
 
De votre idée géniale à votre Minimum Viable Product - Rencontres National...
De votre idée géniale à votre Minimum Viable Product - Rencontres National...De votre idée géniale à votre Minimum Viable Product - Rencontres National...
De votre idée géniale à votre Minimum Viable Product - Rencontres National...
 
[Breizhcamp 2015] Refactoring avec 1,22% de code couvert par les tests ... Go...
[Breizhcamp 2015] Refactoring avec 1,22% de code couvert par les tests ... Go...[Breizhcamp 2015] Refactoring avec 1,22% de code couvert par les tests ... Go...
[Breizhcamp 2015] Refactoring avec 1,22% de code couvert par les tests ... Go...
 
MongoDB Aggregation Framework in action !
MongoDB Aggregation Framework in action !MongoDB Aggregation Framework in action !
MongoDB Aggregation Framework in action !
 
Refactoring avec 1,22% de code couvert par les tests ... Golden Master testin...
Refactoring avec 1,22% de code couvert par les tests ... Golden Master testin...Refactoring avec 1,22% de code couvert par les tests ... Golden Master testin...
Refactoring avec 1,22% de code couvert par les tests ... Golden Master testin...
 
Nantes JUG - Les News - 2013-10-10
Nantes JUG - Les News - 2013-10-10Nantes JUG - Les News - 2013-10-10
Nantes JUG - Les News - 2013-10-10
 
JugSummerCamp 2013 - Un backend NoSQL pour Geektic avec MongoDB
JugSummerCamp 2013 - Un backend NoSQL pour Geektic avec MongoDBJugSummerCamp 2013 - Un backend NoSQL pour Geektic avec MongoDB
JugSummerCamp 2013 - Un backend NoSQL pour Geektic avec MongoDB
 
Poitou Charentes JUG - Traçabilité dans une architecture distribuée avec Node...
Poitou Charentes JUG - Traçabilité dans une architecture distribuée avec Node...Poitou Charentes JUG - Traçabilité dans une architecture distribuée avec Node...
Poitou Charentes JUG - Traçabilité dans une architecture distribuée avec Node...
 
Nantes JUG - Traçabilité dans une architecture distribuée avec Node.js et Mon...
Nantes JUG - Traçabilité dans une architecture distribuée avec Node.js et Mon...Nantes JUG - Traçabilité dans une architecture distribuée avec Node.js et Mon...
Nantes JUG - Traçabilité dans une architecture distribuée avec Node.js et Mon...
 
Add BPM to your business applications with Bonita Open Solution - JugSummerCa...
Add BPM to your business applications with Bonita Open Solution - JugSummerCa...Add BPM to your business applications with Bonita Open Solution - JugSummerCa...
Add BPM to your business applications with Bonita Open Solution - JugSummerCa...
 
Nantes Jug - Java 7
Nantes Jug - Java 7Nantes Jug - Java 7
Nantes Jug - Java 7
 

MongoDB et Elasticsearch, meilleurs ennemis ?