Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6
-
Upload
tugdual-grall -
Category
Technology
-
view
470 -
download
1
description
Transcript of Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
{“Developpeur” : “Découvre Mongo”}
@dwursteisen : David (SOAT) @karesti : Katia (Freelance) @tgrall : Tug (MongoDB)
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Hand’s On Lab
•Introduction
•MongoDB : Kesako?
•L’atelier • Contenu
• Code
• Application
•A vous de jouer!
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
{“about” : “us”}Katia Aresti •@karesti
•Freelance
David Wursteisen •@dwursteisen
•So@t
Tugdual Grall •@tgrall
•MongoDB
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
MongoDB
Document Database Open-SourceGeneral Purpose
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
MongoDB
•Document : JSON / Flexibilité
•Open Source : tout est sur GitHub
•Written in C++
•Sérialisation en BSON : efficacité / tapage
•Montée en charge horizontale : Sharding
•Haute Disponibilité : Réplication
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
De nombreux drivers
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Cet Atelier
Mongo Shell Java Code/App
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
VocabulaireRDBMS MongoDB
Table, View ➜ Collection
Row ➜ Document
Index ➜ Index
Join ➜ Embedded Document
Foreign Key ➜ Reference
Partition ➜ Shard
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Document?
Modèle Relationnel Modèle Document
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
{ "title" : "Hello World", "body" : "This is my first blog post", "date" : ISODate("2014-03-20T00:00:00Z"), "author" : {"id" : “jdoe","name" : "John Doe"}, "tags" : [ “adventure”, "mongodb" ], "comments" : [ { "date" : ISODate("2013-03-22T00:00:00Z"), "by" : { "id" : "csmith", "name" : "Charles Smith" }, "text" : "this is the comment" } ] }
Document
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Ce que nous allons voir
•Installation
•CRUD
•Recherche Full Text
•Requêtes Geospatiales
•Aggregation Framework
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Ce que nous ne verrons pas
•Haute Disponibilité / Réplication
•Sharding
•Administration
• Management/Monitoring
• Sauvegarde/Restauration
•Sécurité
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
MongoDB Architecture
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
MMS : MongoDB Management Service
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Etape 1 : Atelier
•Copier le contenu de la clé sur votre disque
•Ouvrir: • /devoxx-2014/tutorial.html
•Suivre les étapes de l’atelier !
!
•Note: toutes les sources sont disponibles sur GitHub •https://github.com/dwursteisen/atelier-mongodb-devoxx
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Etape 2 : Installation
$ tar -xvf mongodb-osx-x86_64-2.6.0.tgz!$ cd mongodb-osx-x86_64-2.6.0/bin!$ mkdir –p /data/db!$ ./mongod
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Etape 2 : Tester
:~ $ mongo!MongoDB shell version: 2.6.0!connecting to: test!> db.test.insert({text: 'Welcome to MongoDB'})!> db.test.find().pretty()!{!! "_id" : ObjectId("51c34130fbd5d7261b4cdb55"),!! "text" : "Welcome to MongoDB"!}
@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Etape 3: Découvrir et Coder
•Suivre l’atelier
•Créer des Services REST
•Les Consommer dans une application
@YourTwitterHandle@dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Demo
@YourTwitterHandle#DVXFR14{session hashtag} @dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Compr
endr
e
Comprendre ce qu’est MongoDB…
@YourTwitterHandle#DVXFR14{session hashtag} @dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Appre
ndre
Apprendre à utiliser MongoDB
@YourTwitterHandle#DVXFR14{session hashtag} @dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Deploy
er
Deployer MongoDB chez vous!!!
@YourTwitterHandle#DVXFR14{session hashtag} @dwursteisen | @karesti | @tgrall #DevoxxMongoDB
Q & A