SlideShare une entreprise Scribd logo
1  sur  36
Créer des
applications
Java avec
MongoDB
Aveek Bushan
aveekshith.bushan@mongodb.com
Architecte de solutions, direction de la région Asie-
Pacifique
• @aveekshith
Table des matières
• De l'échantillonnage à « N = Tout »
• Conséquences sur les données
• Créer une application dans Java
• Principales fonctionnalités de MongoDB
• Établir des liens
Exemple aléatoire
Source d'image : SurveyMonkey
Échantillonnage
• Basé sur l'échantillonnage
aléatoire
• Utilisation dans divers domaines :
sondages d'opinion, estimation
de bogue, etc.
Problèmes
• Perte de précision : marge d'erreur
de 3 %
• Les échantillons sont-ils fiables ?
• Les valeurs hors norme (ou
« aberrations ») peuvent apporter
des informations intéressantes
• Les événements rares ont un
impact important qui ne peut pas
être pris en compte lors d'une
distribution standard
N = Tout
Du rapport de cause à effet vers la
corrélation
De la cause à la conséquence
Un accès au monde numérique de plus
en plus courant
Le coût du stockage de données a
diminué avec le temps
La possibilité de traiter des informations
non structurées et semi-structurées
Des outils logiciels pouvant traiter des
données en temps réel
Source : Big Data : Viktor Mayer-Schönberger et Kenneth Cukier
Conséquence sur les données
Données
enrichies
(DE)
Diversité
des
données
(DvD)
Traitement
rapide
(TR)
Disponibili
té des
données
(DD)
Volume de
données
(VD)
Géospatial
(GS)
Accès en
temps réel
(ATR)
Durabilité
des
données
(DuD)
Langage de
requête
expressif
Cohérence
forte
Index
secondaires
Flexibilité
Scalabilité
Performances
MongoDB : architecture de connexion
Base de données relationnelle + NoSQL
Exemples de besoins applicatifs
• Ensembles de compétences des employés
• Certification et niveau de compétence
• Affichage des données sur un tableau de
bord en temps réel
• Base de données fiable, performante et
offrant une scalabilité
Concevoir les schémas
Informations
intégrées
Documents
secondaires,
tableaux, etc.
Prise en charge de
manière native
Différence entre
les données
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Préparer l'application Java
• Ajouter les bibliothèques de pilotes aux nouvelles fonctionnalités
du Classpath 3.0
– Interface MongoCollection générique
– Nouvelle API asynchrone
– Nouvelle infrastructure de codec
– Nouveau pilote principal
• Démarrez l'instance de MongoDB. Nous allons commencer avec une instance
autonome. Pour un moteur de stockage performant pour l'écriture, démarrez
mongod en utilisant la chaîne –storageEngine wiredTiger
Créer l'objet Java
Ou utiliser
un Object-
Document
Mapper tel
que
Morphia
@Entity
public class coll {
@Id
private int id;
private String name;
@Embedded
private List<SkillsPOJO> skills;
@Embedded
private InfoPOJO info;
@Embedded
public class SkillsPOJO {
private String skill;
private int level;
private String version;
private boolean certified;
// Similarly for Info POJO
public class DataObject {
private int id;
private String name;
private List<SkillObject> obj;
private InfoObject info;
public class SkillObject {
private String skill;
private int level;
private String version;
private boolean certified;
public class InfoObject {
private String dept;
private int experience;
private List<Double> gps;
private String location;
private boolean reviewed;
Niveau de base de données
Se connecter à MongoDB
mongod
Client Java
Pilote
public void MongoConnect(String[] hosts) {
List<ServerAddress> seeds = new
ArrayList<ServerAddress>();
for (String h : hosts) {
// MongoDB Server address and Port
seeds.add(new ServerAddress(h));
}
// MongoDB client with internal connection pooling.
client = new MongoClient(seeds);
// The database to connect to
database = client.getDatabase("mydb");
// The collection to connect to
collection = database.getCollection("coll");
}
import com.mongodb.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
Ou utiliser un producteur de concepts d'origine
(ou ODM, pour Original Design Manufacturer)
import com.mongodb.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import org.mongodb.morphia.Datastore;
import org.mongodb.morphia.Morphia;
public void MorphiaConnect(String[] hosts) {
List<ServerAddress> seeds = new
ArrayList<ServerAddress>();
for (String h : hosts) {
seeds.add(new ServerAddress(h));
}
client = new MongoClient(seeds);
morphia = new Morphia();
// Map the Morphia Object
morphia.map(coll.class).map(SkillsPOJO.class).
map(InfoPOJO.class);
// Create a datastore to interact with MongoDB
// using POJOs
ds = morphia.createDatastore(client, "mydb");
}
Niveau de base de données
mongod
Client Java
Pilote
Authentification
String dbName = ”testdb";
String userName = "user1";
char[] password = {‘p',’w',’d'};
MongoCredential credential = MongoCredential.createMongoCRCredential(
dbName, userName, password);
// With the appropriate Credential
client = new MongoClient(seeds,
Arrays.asList(credential));
Effectuer quelques insertions
Avec Morphia
Document doc = new Document("_id", emplList.get(i).getId())
.append("name", emplList.get(i).getName())
.append("skills", skillBOList)
.append("info",
new Document("dept", info.getDept())
.append("yearsexp", info.getExperience())
.append("gps", info.getGPS())
.append("location", info.getLocation()));
collection.insertOne(doc);
import org.bson.Document;
import com.mongodb.client.MongoCollection;
public void insert(List<coll> emplList) throws InterruptedException {
ds.save(emplList);
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Operations asynchrones
// Factory of MongoClient Instances
client = MongoClients.create("mongodb://localhost");
database = client.getDatabase("mydb");
collection = database.getCollection("coll");
…
// methods that cause network IO take a SingleResponseCallback<T> and return immediately
collection.insertOne(doc, new SingleResultCallback<Void>() {
@Override
public void onResult(final Void result, final Throwable t) {
System.out.println("Inserted!");
}
});
…
import com.mongodb.async.SingleResultCallback;
import com.mongodb.async.client.*;
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Récupération des données
import static com.mongodb.client.model.Filters.*;
…
public void read(int id) {
Document myDoc = collection.find(eq("_id", id)).first();
System.out.println("Read Document with id: " + id + "n”
+ myDoc.toJson() + "n");
…
}
Avec Morphia
List<coll> empl = ds.createQuery(coll.class).filter("id =", id)
.asList();
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Récupération d'un point de données
{ "_id" : 5,
"name" : "John Snow",
"skills" : [
{
"name" : "java",
"level" : 3,
"certified" : true
},
{
"name" : "mongo",
"level" : 5
}
],
"info" : {
"dept" : "A91",
"yearsexp" : 3,
"gps" : [-74.00597, 40.71427],
"location" : "New York"
}
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Requête de géolocalisation
import static com.mongodb.client.model.Filters.*;
…
public void read(List<Double> gps, Double maxDistance, Double minDistance) {
double longitude = gps.get(0);
double latitude = gps.get(1);
collection.createIndex(new Document("info.gps", "2dsphere"));
MongoCursor<Document> cursor = collection.find(
near("info.gps", new Point(
new Position(longitude, latitude)),
maxDistance,
minDistance)).iterator();
while (cursor.hasNext()) {
…
}
…
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Résultat de géolocalisation
• Requête pour obtenir tous les employés dans et autour de Boston
(coordonnées GPS : latitude 42,35843 ; longitude -71,05977), tandis
que le paramètre maxDistance est défini sur 400 000 Ms
{ "_id" : 5,
"name" : "John Snow",
"skills" : [
{
"name" : "java",
"level" : 3,
"certified" : true
},
{
"name" : "mongo",
"level" : 5
}
],
"info" : {
"dept" : "A91",
"yearsexp" : 3,
"gps" : [-74.00597, 40.71427],
"location" : "New York"
}
}
{ "_id" :45,
"name" : ”Jack Kingsley",
"skills" : [
{
"name" : ”c++",
"level" : 4
},
{
"name" : "mongo",
"level" : 2,
“version”: “3.0”
}
],
"info" : {
"dept" : ”A83",
"yearsexp" : 18,
"gps" : [-71.05977,
42.35843],
"location" : ”Boston"
}
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Mise à jour des données
import static com.mongodb.client.model.Filters.*;
…
Map<String, Object> updateOps = new HashMap<String, Object>();
updateOps.put("$inc", new Document("info.yearsexp", 1));
updateOps.put("$set", new Document("info.reviewed", true));
result = collection.updateOne(eq("_id", id), new Document(updateOps));
Avec Morphia
Query<coll> query = ds.createQuery(coll.class).field("id").equal(id);
UpdateOperations<coll> ops = ds.createUpdateOperations(coll.class)
.inc("info.experience", 1)
.set("info.reviewed", true);
ds.update(query, ops);
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Résultat de la mise à jour
• Le point de données a été examiné après 1 an de travail supplémentaire
{ "_id" : 5,
"name" : "John Snow",
"skills" : [
{
"name" : "java",
"level" : 3,
"certified" : true
},
{
"name" : "mongo",
"level" : 5
}
],
"info" : {
"dept" : "A91",
"yearsexp" : 3,
"gps" : [-74.00597, 40.71427],
"location" : "New York"
}
}
{ "_id" : 5,
"name" : "John Snow",
"skills" : [
{
"name" : "java",
"level" : 3,
"certified" : true
},
{
"name" : "mongo",
"level" : 5
}
],
"info" : {
"dept" : "A91",
"yearsexp" : 4,
"gps" : [-74.00597,
40.71427],
"location" : "New York”,
“reviewied” : true
}
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Supprimer des données
Avec Morphia
import static com.mongodb.client.model.Filters.*;
…
public void delete(int id) {
collection.deleteOne(eq("_id", id));
System.out.println("Deleted Document with id: " + id + "n");
…
}
public void delete(int id) {
Query<coll> query = ds.createQuery(coll.class)
.field("id").equal(id);
ds.delete(query);
…
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Jeu de réplicas
Haute disponibilité
Secondaire Secondaire
Primaire
Client Java
Pilote
✔✗
✔ ✔
Primaire
• Basculement
automatisé
• Mises à niveau
propagées
• Assistance
technique pour
plusieurs centres
de données
• Durabilité des
données et
cohérence forte
Duplication
Pulsation
Injoignable
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Configuration de MongoDB
Utilisez MongoDB OpsManager ou l'automatisation de Cloud Manager pour configurer le
cluster
(ou)
sudo mongod --port 27017 --dbpath /data/rs1 --replSet rs --logpath /logs/rs1.log --fork
sudo mongod --port 27018 --dbpath /data/rs2 --replSet rs --logpath /logs/rs2.log --fork
sudo mongod --port 27019 --dbpath /data/rs3 --replSet rs --logpath /logs/rs3.log --fork
mongo --port 27017
> config = { "_id" : "rs", "members" : [
... {"host":"localhost:27017", "_id":0},
... {"host":"localhost:27018", "_id":1},
... {"host":"localhost:27019", "_id":2}
... ]
... }
rs.initiate(config)
Dans le programme Java,
transmettez les adresses
et les ports des membres
du jeu de réplicas en tant
que chaîne de connexion
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Assurer la durabilité
• L'objet WriteConcern est reconnu
(Acknowledged) par défaut =>
l'opération d'écriture a été reçue et a
appliqué la modification en mémoire
• Une panne du serveur primaire peut
entraîner une perte de données
• Un objet WriteConcern plus strict, tel
qu'un paramètre Majority ou w:2
for (int retry = 0; retry < 3; retry++) {
try {
collection.withWriteConcern(WriteConcern.MAJORITY)
.insertOne(doc);
break;
} catch (Exception e) {
e.getMessage();
Thread.sleep(5000);
}
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Cohérence finale
Application de
création de
rapports
Pilote
Jeu de réplicas
P
S S
• Procédez à la lecture à partir du nœud le plus proche
pour diminuer la latence
• Les applications en lecture seule où la cohérence finale
est OK, par exemple : applications de création de
rapports
• Peut être obtenue en utilisant l'objet ReadPreference
dans MongoDB
• Les modes sont Primary, PrimaryPreferred, Secondary,
SecondaryPreferred et Nearest
L'application de création
de rapports et le membre
secondaire sont sur le
même centre de données
myDoc = collection
.withReadPreference(ReadPreference.nearest())
.find(eq("_id", id)).first();
Meilleures pratiques pour la haute
disponibilité
• Haute disponibilité pour résoudre les pannes de centre de
données et alimenter les configurations de nœuds
actif/actif => 5 nœuds sur 3 centres de données
• Pour les opérations d'écriture => la plupart des nœuds
doivent être actifs
• Pour les opérations de lecture => les lectures secondaires
peuvent continuer
• Lorsque la plupart des nœuds sont inactifs => forcez la
reconfiguration pour continuer les opérations d'écriture
rs:SECONDARY> config = { "_id" : "rs", "members" : [
... {"host":"localhost:27018", "_id":1}
... ]
... }
rs:SECONDARY> rs.reconfig(config, {force:true})
{ "ok" : 1 }
rs:PRIMARY>
Jeu de réplicas
Supprimé Supprimé
Primaire
Client Java
Pilote
✔
✗✗
Agrégation de données
import static com.mongodb.client.model.Accumulators.avg;
import static com.mongodb.client.model.Accumulators.sum;
import static com.mongodb.client.model.Aggregates.group;
import static com.mongodb.client.model.Aggregates.sort;
import static com.mongodb.client.model.Aggregates.unwind;
import static com.mongodb.client.model.Aggregates.out;
…
public void deptForSkills() {
Document group = new Document();
group.append("skills", "$skills.name");
group.append("dept", "$info.dept");
AggregateIterable<Document> iter =
collection.aggregate(Arrays
.asList(unwind("$skills"),
group(group, avg("avgLevel",
"$skills.level"),
sum("count", 1)),
sort(new Document().append(
"_id.skills", 1).append(
"avgLevel", -1)),
out("skills")));
}
DE
DvD
TR
DD
VD
GS
ATR
Du
D
{ "_id" : 5,
"name" : "John Snow",
"skills" : [
{
"name" : "java",
"level" : 3,
"certified" : true
},
{
"name" :
"mongo",
"level" : 5
}
],
"info" : {
"dept" : "A91",
"yearsexp" : 3,
"gps" : [-74.00597,
40.71427],
"location" : "New York"
}
}
Aggregation - Output
{ "_id" : { "skills" : "c++", "dept" : "A75" }, "avgLevel" : 5, "count" : 10 }
{ "_id" : { "skills" : "c++", "dept" : "A83" }, "avgLevel" : 4.666666666666667, "count" : 30 }
{ "_id" : { "skills" : "c++", "dept" : "A91" }, "avgLevel" : 3, "count" : 10 }
{ "_id" : { "skills" : "java", "dept" : "A75" }, "avgLevel" : 4, "count" : 10 }
{ "_id" : { "skills" : "java", "dept" : "A83" }, "avgLevel" : 3.5, "count" : 10 }
{ "_id" : { "skills" : "java", "dept" : "A91" }, "avgLevel" : 3, "count" : 40 }
{ "_id" : { "skills" : "mongo", "dept" : "A91" }, "avgLevel" : 5, "count" : 40}
{ "_id" : { "skills" : "mongo", "dept" : "A83" }, "avgLevel" : 2, "count" : 10 }
{ "_id" : { "skills" : "mongo", "dept" : "A75" }, "avgLevel" : 1, "count" : 10 }
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Niveau de base de données
Partitionnement
Partition 1
Client Java
Pilote
Partition 2
P
S S
P
S S
Routeur Routeur …
Niveau client
Serveur de
configuration
Serveur de
configuration
Serveur de
configuration
Partition N
P
S S
• Procédez à une montée en
charge en fonction de vos
besoins
• La redondance est intégrée à
tous les niveaux
• 3 types de partitionnement :
Range (Plage), Hashed (Haché)
ou Tag-Aware (basé sur la
position géographique)
DE
DvD
TR
DD
VD
GS
ATR
Du
D
Configuration de MongoDB
Utilisez MongoDB OpsManager ou l'automatisation de Cloud Manager pour configurer le cluster
(ou)
sudo mongod --port 37017 --dbpath /data/shard1 --logpath /logs/shard1.log –fork
sudo mongod --port 37018 --dbpath /data/shard2 --logpath /logs/shard2.log –fork
sudo mongod --port 47017 --dbpath /data/cfg —configsvr --logpath /logs/cfg.log –fork
sudo mongos --port 57017 --configdb localhost:47017
sudo mongos --port 57018 --configdb localhost:47017
mongo --port 57017
> sh.addShard("localhost:37017”)
> sh.addShard("localhost:37018”)
> sh.enableSharding("mydb”)
> sh.shardCollection("mydb.coll",{"_id":1})
Dans le programme Java,
transmettez les adresses
IP et les ports du routeur
en tant que chaîne de
connexion
DE
DvD
TR
DD
VD
GS
ATR
Du
D
MongoDB pour le Big Data
Données
enrichies
(DE)
Diversité
des
données
(DvD)
Traitement
rapide
(TR)
Disponibili
té des
données
(DD)
Volume de
données
(VD)
Géospatial
(GS)
Accès en
temps réel
(ATR)
Durabilité
des
données
(DuD)
Modèle de données
flexible et schéma
dynamique
Données
intégrées
Duplication native
entre les centres de
données
Objet
WriteConcern
adapté
Modèle de
requête et
fonction
d'agrégation
complets
Fonctionnalit
és
géospatiales
natives
Scalabilité
horizontale selon
vos besoins
Sous-documents,
tableaux, etc.
Pour en savoir plus : Java/MongoDB
Ressource Emplacement
Pilote Java MongoDB
http://docs.mongodb.com/ecosyst
em/drivers/java/
API Java pour se
connecter à MongoDB
http://api.mongodb.com/java/3.0/
Télécharger le pilote
http://mongodb.github.io/mongo-
java-driver/
Projet Morphia
https://github.com/mongodb/morp
hia
Pilote Hadoop pour
MongoDB
http://docs.mongodb.com/ecosyst
em/tools/hadoop/
Formation MongoDB
University
https://university.mongodb.com/co
urses/M101J/about?jmp=docs&_g
a=1.249916550.1866581253.1440
492145
Ressource Emplacement
Études de cas mongodb.com/customers
Présentations mongodb.com/presentations
Formation en ligne gratuite university.mongodb.com
Webinaires et événements mongodb.com/events
Documentation docs.mongodb.com
Téléchargements
MongoDB
mongodb.com/download
Informations
supplémentaires
info@mongodb.com
Pour en savoir plus : MongoDB
Merci !
info@mongodb.com
Vous pouvez me contacter à l'adresse suivante :
Créer des applications Java avec MongoDB

Contenu connexe

Tendances

Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...
Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...
Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...ENSET, Université Hassan II Casablanca
 
BigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-ReduceBigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-ReduceLilia Sfaxi
 
Cours Big Data Chap2
Cours Big Data Chap2Cours Big Data Chap2
Cours Big Data Chap2Amal Abid
 
Rapport pfe isi_Big data Analytique
Rapport pfe isi_Big data AnalytiqueRapport pfe isi_Big data Analytique
Rapport pfe isi_Big data AnalytiqueYosra ADDALI
 
Base de données NoSQL
Base de données NoSQLBase de données NoSQL
Base de données NoSQLOussama ARBI
 
Cours data warehouse
Cours data warehouseCours data warehouse
Cours data warehousekhlifi z
 
Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkAmal Abid
 
BI : Analyse des Données avec Mondrian
BI : Analyse des Données avec Mondrian BI : Analyse des Données avec Mondrian
BI : Analyse des Données avec Mondrian Lilia Sfaxi
 
Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...
Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...
Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...MOHAMMED MOURADI
 
BigData_Chp3: Data Processing
BigData_Chp3: Data ProcessingBigData_Chp3: Data Processing
BigData_Chp3: Data ProcessingLilia Sfaxi
 
Cours Big Data Chap5
Cours Big Data Chap5Cours Big Data Chap5
Cours Big Data Chap5Amal Abid
 
BigData_Chp1: Introduction à la Big Data
BigData_Chp1: Introduction à la Big DataBigData_Chp1: Introduction à la Big Data
BigData_Chp1: Introduction à la Big DataLilia Sfaxi
 
Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...
Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...
Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...ENSET, Université Hassan II Casablanca
 
exercices business intelligence
exercices business intelligence exercices business intelligence
exercices business intelligence Yassine Badri
 
Rapport PFE : Développement D'une application de gestion des cartes de fidéli...
Rapport PFE : Développement D'une application de gestion des cartes de fidéli...Rapport PFE : Développement D'une application de gestion des cartes de fidéli...
Rapport PFE : Développement D'une application de gestion des cartes de fidéli...Riadh K.
 
Les Streams de Java 8
Les Streams de Java 8Les Streams de Java 8
Les Streams de Java 8Antoine Rey
 
Tp2 - WS avec JAXRS
Tp2 - WS avec JAXRSTp2 - WS avec JAXRS
Tp2 - WS avec JAXRSLilia Sfaxi
 

Tendances (20)

Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...
Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...
Mise en oeuvre des Frameworks de Machines et Deep Learning pour les Applicati...
 
BigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-ReduceBigData_Chp2: Hadoop & Map-Reduce
BigData_Chp2: Hadoop & Map-Reduce
 
Cours Big Data Chap2
Cours Big Data Chap2Cours Big Data Chap2
Cours Big Data Chap2
 
Technologies pour le Big Data
Technologies pour le Big DataTechnologies pour le Big Data
Technologies pour le Big Data
 
Rapport pfe isi_Big data Analytique
Rapport pfe isi_Big data AnalytiqueRapport pfe isi_Big data Analytique
Rapport pfe isi_Big data Analytique
 
Base de données NoSQL
Base de données NoSQLBase de données NoSQL
Base de données NoSQL
 
Cours data warehouse
Cours data warehouseCours data warehouse
Cours data warehouse
 
Cours Big Data Chap4 - Spark
Cours Big Data Chap4 - SparkCours Big Data Chap4 - Spark
Cours Big Data Chap4 - Spark
 
BI : Analyse des Données avec Mondrian
BI : Analyse des Données avec Mondrian BI : Analyse des Données avec Mondrian
BI : Analyse des Données avec Mondrian
 
Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...
Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...
Rapport application web (Spring BOOT,angular4) et mobile(ionc3) gestion des a...
 
BigData_Chp3: Data Processing
BigData_Chp3: Data ProcessingBigData_Chp3: Data Processing
BigData_Chp3: Data Processing
 
Cours Big Data Chap5
Cours Big Data Chap5Cours Big Data Chap5
Cours Big Data Chap5
 
BigData_Chp1: Introduction à la Big Data
BigData_Chp1: Introduction à la Big DataBigData_Chp1: Introduction à la Big Data
BigData_Chp1: Introduction à la Big Data
 
Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...
Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...
Conférence: Catalyseurs de l'Intelligence Artificielle et Écosystème des Fram...
 
exercices business intelligence
exercices business intelligence exercices business intelligence
exercices business intelligence
 
Rapport PFE : Développement D'une application de gestion des cartes de fidéli...
Rapport PFE : Développement D'une application de gestion des cartes de fidéli...Rapport PFE : Développement D'une application de gestion des cartes de fidéli...
Rapport PFE : Développement D'une application de gestion des cartes de fidéli...
 
Mise en oeuvre des framework de machines et deep learning v1
Mise en oeuvre des framework de machines et deep learning v1 Mise en oeuvre des framework de machines et deep learning v1
Mise en oeuvre des framework de machines et deep learning v1
 
Les Streams de Java 8
Les Streams de Java 8Les Streams de Java 8
Les Streams de Java 8
 
Tp2 - WS avec JAXRS
Tp2 - WS avec JAXRSTp2 - WS avec JAXRS
Tp2 - WS avec JAXRS
 
Un introduction à Pig
Un introduction à PigUn introduction à Pig
Un introduction à Pig
 

En vedette

MongoDB and the Internet of Things
MongoDB and the Internet of ThingsMongoDB and the Internet of Things
MongoDB and the Internet of ThingsMongoDB
 
MongoDB & Machine Learning
MongoDB & Machine LearningMongoDB & Machine Learning
MongoDB & Machine LearningTom Maiaroto
 
Internet of things, Big Data and Analytics 101
Internet of things, Big Data and Analytics 101Internet of things, Big Data and Analytics 101
Internet of things, Big Data and Analytics 101Mukul Krishna
 
Pets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud StoryPets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud StoryRandy Bias
 
Big Data Analytics for the Industrial Internet of Things
Big Data Analytics for the Industrial Internet of ThingsBig Data Analytics for the Industrial Internet of Things
Big Data Analytics for the Industrial Internet of ThingsAnthony Chen
 
Internet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use CasesInternet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use CasesMongoDB
 
Mongo db et java en pratique
Mongo db et java en pratiqueMongo db et java en pratique
Mongo db et java en pratiqueKatia Aresti
 
Big data - Cours d'introduction l Data-business
Big data - Cours d'introduction l Data-businessBig data - Cours d'introduction l Data-business
Big data - Cours d'introduction l Data-businessVincent de Stoecklin
 
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 pasPierre-Alban DEWITTE
 

En vedette (9)

MongoDB and the Internet of Things
MongoDB and the Internet of ThingsMongoDB and the Internet of Things
MongoDB and the Internet of Things
 
MongoDB & Machine Learning
MongoDB & Machine LearningMongoDB & Machine Learning
MongoDB & Machine Learning
 
Internet of things, Big Data and Analytics 101
Internet of things, Big Data and Analytics 101Internet of things, Big Data and Analytics 101
Internet of things, Big Data and Analytics 101
 
Pets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud StoryPets vs. Cattle: The Elastic Cloud Story
Pets vs. Cattle: The Elastic Cloud Story
 
Big Data Analytics for the Industrial Internet of Things
Big Data Analytics for the Industrial Internet of ThingsBig Data Analytics for the Industrial Internet of Things
Big Data Analytics for the Industrial Internet of Things
 
Internet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use CasesInternet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use Cases
 
Mongo db et java en pratique
Mongo db et java en pratiqueMongo db et java en pratique
Mongo db et java en pratique
 
Big data - Cours d'introduction l Data-business
Big data - Cours d'introduction l Data-businessBig data - Cours d'introduction l Data-business
Big data - Cours d'introduction l Data-business
 
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
 

Similaire à Créer des applications Java avec MongoDB

Devoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudDevoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudTugdual Grall
 
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-phpapp01MongoDB
 
Construisez votre première application MongoDB
Construisez votre première application MongoDBConstruisez votre première application MongoDB
Construisez votre première application MongoDBMongoDB
 
Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab ElasticsearchDavid Pilato
 
Initiation à Express js
Initiation à Express jsInitiation à Express js
Initiation à Express jsAbdoulaye Dieng
 
Les tests comportementaux avec aspnet core
Les tests comportementaux avec aspnet coreLes tests comportementaux avec aspnet core
Les tests comportementaux avec aspnet coreArnaud Auroux
 
Mettez du temps réel dans votre Drupal avec Node JS
Mettez du temps réel dans votre Drupal avec Node JSMettez du temps réel dans votre Drupal avec Node JS
Mettez du temps réel dans votre Drupal avec Node JSMatthieu Guillermin
 
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
 
php2 : formulaire-session-PDO
php2 : formulaire-session-PDOphp2 : formulaire-session-PDO
php2 : formulaire-session-PDOAbdoulaye Dieng
 
Web dev open door
Web dev   open doorWeb dev   open door
Web dev open doorLeTesteur
 
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 MongoDBSébastien Prunier
 
2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexing2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexingMongoDB
 
Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8
Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8
Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8DocDoku
 
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 pasBruno Bonnin
 
OWF12/HTML 5 local storage , olivier thomas, cto at webtyss
OWF12/HTML 5 local storage , olivier thomas, cto at webtyssOWF12/HTML 5 local storage , olivier thomas, cto at webtyss
OWF12/HTML 5 local storage , olivier thomas, cto at webtyssParis Open Source Summit
 
Procédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénientsProcédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénientsDenis Voituron
 

Similaire à Créer des applications Java avec MongoDB (20)

Devoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudDevoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le Cloud
 
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
 
Construisez votre première application MongoDB
Construisez votre première application MongoDBConstruisez votre première application MongoDB
Construisez votre première application MongoDB
 
Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab Elasticsearch
 
Pg jsonb format 16-9
Pg jsonb format 16-9Pg jsonb format 16-9
Pg jsonb format 16-9
 
Springioc
SpringiocSpringioc
Springioc
 
Initiation à Express js
Initiation à Express jsInitiation à Express js
Initiation à Express js
 
Les tests comportementaux avec aspnet core
Les tests comportementaux avec aspnet coreLes tests comportementaux avec aspnet core
Les tests comportementaux avec aspnet core
 
Mettez du temps réel dans votre Drupal avec Node JS
Mettez du temps réel dans votre Drupal avec Node JSMettez du temps réel dans votre Drupal avec Node JS
Mettez du temps réel dans votre Drupal avec Node JS
 
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.
 
php2 : formulaire-session-PDO
php2 : formulaire-session-PDOphp2 : formulaire-session-PDO
php2 : formulaire-session-PDO
 
Support Java Avancé Troisième Partie
Support Java Avancé Troisième PartieSupport Java Avancé Troisième Partie
Support Java Avancé Troisième Partie
 
Web dev open door
Web dev   open doorWeb dev   open door
Web dev open door
 
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
 
2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexing2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexing
 
Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8
Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8
Les Z'ApéroTech Toulouse #2 - Présentation des nouveautés de JakartaEE 8
 
Adopte une BDD
Adopte une BDDAdopte une BDD
Adopte une BDD
 
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
 
OWF12/HTML 5 local storage , olivier thomas, cto at webtyss
OWF12/HTML 5 local storage , olivier thomas, cto at webtyssOWF12/HTML 5 local storage , olivier thomas, cto at webtyss
OWF12/HTML 5 local storage , olivier thomas, cto at webtyss
 
Procédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénientsProcédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénients
 

Plus de MongoDB

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
 
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 MongoDBMongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump StartMongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB
 

Plus de MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
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 SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Créer des applications Java avec MongoDB

  • 1. Créer des applications Java avec MongoDB Aveek Bushan aveekshith.bushan@mongodb.com Architecte de solutions, direction de la région Asie- Pacifique • @aveekshith
  • 2. Table des matières • De l'échantillonnage à « N = Tout » • Conséquences sur les données • Créer une application dans Java • Principales fonctionnalités de MongoDB • Établir des liens
  • 3. Exemple aléatoire Source d'image : SurveyMonkey Échantillonnage • Basé sur l'échantillonnage aléatoire • Utilisation dans divers domaines : sondages d'opinion, estimation de bogue, etc. Problèmes • Perte de précision : marge d'erreur de 3 % • Les échantillons sont-ils fiables ? • Les valeurs hors norme (ou « aberrations ») peuvent apporter des informations intéressantes • Les événements rares ont un impact important qui ne peut pas être pris en compte lors d'une distribution standard
  • 4. N = Tout Du rapport de cause à effet vers la corrélation De la cause à la conséquence Un accès au monde numérique de plus en plus courant Le coût du stockage de données a diminué avec le temps La possibilité de traiter des informations non structurées et semi-structurées Des outils logiciels pouvant traiter des données en temps réel Source : Big Data : Viktor Mayer-Schönberger et Kenneth Cukier
  • 5. Conséquence sur les données Données enrichies (DE) Diversité des données (DvD) Traitement rapide (TR) Disponibili té des données (DD) Volume de données (VD) Géospatial (GS) Accès en temps réel (ATR) Durabilité des données (DuD)
  • 7. Exemples de besoins applicatifs • Ensembles de compétences des employés • Certification et niveau de compétence • Affichage des données sur un tableau de bord en temps réel • Base de données fiable, performante et offrant une scalabilité
  • 8. Concevoir les schémas Informations intégrées Documents secondaires, tableaux, etc. Prise en charge de manière native Différence entre les données DE DvD TR DD VD GS ATR Du D
  • 9. Préparer l'application Java • Ajouter les bibliothèques de pilotes aux nouvelles fonctionnalités du Classpath 3.0 – Interface MongoCollection générique – Nouvelle API asynchrone – Nouvelle infrastructure de codec – Nouveau pilote principal • Démarrez l'instance de MongoDB. Nous allons commencer avec une instance autonome. Pour un moteur de stockage performant pour l'écriture, démarrez mongod en utilisant la chaîne –storageEngine wiredTiger
  • 10. Créer l'objet Java Ou utiliser un Object- Document Mapper tel que Morphia @Entity public class coll { @Id private int id; private String name; @Embedded private List<SkillsPOJO> skills; @Embedded private InfoPOJO info; @Embedded public class SkillsPOJO { private String skill; private int level; private String version; private boolean certified; // Similarly for Info POJO public class DataObject { private int id; private String name; private List<SkillObject> obj; private InfoObject info; public class SkillObject { private String skill; private int level; private String version; private boolean certified; public class InfoObject { private String dept; private int experience; private List<Double> gps; private String location; private boolean reviewed;
  • 11. Niveau de base de données Se connecter à MongoDB mongod Client Java Pilote public void MongoConnect(String[] hosts) { List<ServerAddress> seeds = new ArrayList<ServerAddress>(); for (String h : hosts) { // MongoDB Server address and Port seeds.add(new ServerAddress(h)); } // MongoDB client with internal connection pooling. client = new MongoClient(seeds); // The database to connect to database = client.getDatabase("mydb"); // The collection to connect to collection = database.getCollection("coll"); } import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase;
  • 12. Ou utiliser un producteur de concepts d'origine (ou ODM, pour Original Design Manufacturer) import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.mongodb.morphia.Datastore; import org.mongodb.morphia.Morphia; public void MorphiaConnect(String[] hosts) { List<ServerAddress> seeds = new ArrayList<ServerAddress>(); for (String h : hosts) { seeds.add(new ServerAddress(h)); } client = new MongoClient(seeds); morphia = new Morphia(); // Map the Morphia Object morphia.map(coll.class).map(SkillsPOJO.class). map(InfoPOJO.class); // Create a datastore to interact with MongoDB // using POJOs ds = morphia.createDatastore(client, "mydb"); } Niveau de base de données mongod Client Java Pilote
  • 13. Authentification String dbName = ”testdb"; String userName = "user1"; char[] password = {‘p',’w',’d'}; MongoCredential credential = MongoCredential.createMongoCRCredential( dbName, userName, password); // With the appropriate Credential client = new MongoClient(seeds, Arrays.asList(credential));
  • 14. Effectuer quelques insertions Avec Morphia Document doc = new Document("_id", emplList.get(i).getId()) .append("name", emplList.get(i).getName()) .append("skills", skillBOList) .append("info", new Document("dept", info.getDept()) .append("yearsexp", info.getExperience()) .append("gps", info.getGPS()) .append("location", info.getLocation())); collection.insertOne(doc); import org.bson.Document; import com.mongodb.client.MongoCollection; public void insert(List<coll> emplList) throws InterruptedException { ds.save(emplList); } DE DvD TR DD VD GS ATR Du D
  • 15. Operations asynchrones // Factory of MongoClient Instances client = MongoClients.create("mongodb://localhost"); database = client.getDatabase("mydb"); collection = database.getCollection("coll"); … // methods that cause network IO take a SingleResponseCallback<T> and return immediately collection.insertOne(doc, new SingleResultCallback<Void>() { @Override public void onResult(final Void result, final Throwable t) { System.out.println("Inserted!"); } }); … import com.mongodb.async.SingleResultCallback; import com.mongodb.async.client.*; DE DvD TR DD VD GS ATR Du D
  • 16. Récupération des données import static com.mongodb.client.model.Filters.*; … public void read(int id) { Document myDoc = collection.find(eq("_id", id)).first(); System.out.println("Read Document with id: " + id + "n” + myDoc.toJson() + "n"); … } Avec Morphia List<coll> empl = ds.createQuery(coll.class).filter("id =", id) .asList(); DE DvD TR DD VD GS ATR Du D
  • 17. Récupération d'un point de données { "_id" : 5, "name" : "John Snow", "skills" : [ { "name" : "java", "level" : 3, "certified" : true }, { "name" : "mongo", "level" : 5 } ], "info" : { "dept" : "A91", "yearsexp" : 3, "gps" : [-74.00597, 40.71427], "location" : "New York" } } DE DvD TR DD VD GS ATR Du D
  • 18. Requête de géolocalisation import static com.mongodb.client.model.Filters.*; … public void read(List<Double> gps, Double maxDistance, Double minDistance) { double longitude = gps.get(0); double latitude = gps.get(1); collection.createIndex(new Document("info.gps", "2dsphere")); MongoCursor<Document> cursor = collection.find( near("info.gps", new Point( new Position(longitude, latitude)), maxDistance, minDistance)).iterator(); while (cursor.hasNext()) { … } … } DE DvD TR DD VD GS ATR Du D
  • 19. Résultat de géolocalisation • Requête pour obtenir tous les employés dans et autour de Boston (coordonnées GPS : latitude 42,35843 ; longitude -71,05977), tandis que le paramètre maxDistance est défini sur 400 000 Ms { "_id" : 5, "name" : "John Snow", "skills" : [ { "name" : "java", "level" : 3, "certified" : true }, { "name" : "mongo", "level" : 5 } ], "info" : { "dept" : "A91", "yearsexp" : 3, "gps" : [-74.00597, 40.71427], "location" : "New York" } } { "_id" :45, "name" : ”Jack Kingsley", "skills" : [ { "name" : ”c++", "level" : 4 }, { "name" : "mongo", "level" : 2, “version”: “3.0” } ], "info" : { "dept" : ”A83", "yearsexp" : 18, "gps" : [-71.05977, 42.35843], "location" : ”Boston" } } DE DvD TR DD VD GS ATR Du D
  • 20. Mise à jour des données import static com.mongodb.client.model.Filters.*; … Map<String, Object> updateOps = new HashMap<String, Object>(); updateOps.put("$inc", new Document("info.yearsexp", 1)); updateOps.put("$set", new Document("info.reviewed", true)); result = collection.updateOne(eq("_id", id), new Document(updateOps)); Avec Morphia Query<coll> query = ds.createQuery(coll.class).field("id").equal(id); UpdateOperations<coll> ops = ds.createUpdateOperations(coll.class) .inc("info.experience", 1) .set("info.reviewed", true); ds.update(query, ops); DE DvD TR DD VD GS ATR Du D
  • 21. Résultat de la mise à jour • Le point de données a été examiné après 1 an de travail supplémentaire { "_id" : 5, "name" : "John Snow", "skills" : [ { "name" : "java", "level" : 3, "certified" : true }, { "name" : "mongo", "level" : 5 } ], "info" : { "dept" : "A91", "yearsexp" : 3, "gps" : [-74.00597, 40.71427], "location" : "New York" } } { "_id" : 5, "name" : "John Snow", "skills" : [ { "name" : "java", "level" : 3, "certified" : true }, { "name" : "mongo", "level" : 5 } ], "info" : { "dept" : "A91", "yearsexp" : 4, "gps" : [-74.00597, 40.71427], "location" : "New York”, “reviewied” : true } } DE DvD TR DD VD GS ATR Du D
  • 22. Supprimer des données Avec Morphia import static com.mongodb.client.model.Filters.*; … public void delete(int id) { collection.deleteOne(eq("_id", id)); System.out.println("Deleted Document with id: " + id + "n"); … } public void delete(int id) { Query<coll> query = ds.createQuery(coll.class) .field("id").equal(id); ds.delete(query); … } DE DvD TR DD VD GS ATR Du D
  • 23. Jeu de réplicas Haute disponibilité Secondaire Secondaire Primaire Client Java Pilote ✔✗ ✔ ✔ Primaire • Basculement automatisé • Mises à niveau propagées • Assistance technique pour plusieurs centres de données • Durabilité des données et cohérence forte Duplication Pulsation Injoignable DE DvD TR DD VD GS ATR Du D
  • 24. Configuration de MongoDB Utilisez MongoDB OpsManager ou l'automatisation de Cloud Manager pour configurer le cluster (ou) sudo mongod --port 27017 --dbpath /data/rs1 --replSet rs --logpath /logs/rs1.log --fork sudo mongod --port 27018 --dbpath /data/rs2 --replSet rs --logpath /logs/rs2.log --fork sudo mongod --port 27019 --dbpath /data/rs3 --replSet rs --logpath /logs/rs3.log --fork mongo --port 27017 > config = { "_id" : "rs", "members" : [ ... {"host":"localhost:27017", "_id":0}, ... {"host":"localhost:27018", "_id":1}, ... {"host":"localhost:27019", "_id":2} ... ] ... } rs.initiate(config) Dans le programme Java, transmettez les adresses et les ports des membres du jeu de réplicas en tant que chaîne de connexion DE DvD TR DD VD GS ATR Du D
  • 25. Assurer la durabilité • L'objet WriteConcern est reconnu (Acknowledged) par défaut => l'opération d'écriture a été reçue et a appliqué la modification en mémoire • Une panne du serveur primaire peut entraîner une perte de données • Un objet WriteConcern plus strict, tel qu'un paramètre Majority ou w:2 for (int retry = 0; retry < 3; retry++) { try { collection.withWriteConcern(WriteConcern.MAJORITY) .insertOne(doc); break; } catch (Exception e) { e.getMessage(); Thread.sleep(5000); } } DE DvD TR DD VD GS ATR Du D
  • 26. Cohérence finale Application de création de rapports Pilote Jeu de réplicas P S S • Procédez à la lecture à partir du nœud le plus proche pour diminuer la latence • Les applications en lecture seule où la cohérence finale est OK, par exemple : applications de création de rapports • Peut être obtenue en utilisant l'objet ReadPreference dans MongoDB • Les modes sont Primary, PrimaryPreferred, Secondary, SecondaryPreferred et Nearest L'application de création de rapports et le membre secondaire sont sur le même centre de données myDoc = collection .withReadPreference(ReadPreference.nearest()) .find(eq("_id", id)).first();
  • 27. Meilleures pratiques pour la haute disponibilité • Haute disponibilité pour résoudre les pannes de centre de données et alimenter les configurations de nœuds actif/actif => 5 nœuds sur 3 centres de données • Pour les opérations d'écriture => la plupart des nœuds doivent être actifs • Pour les opérations de lecture => les lectures secondaires peuvent continuer • Lorsque la plupart des nœuds sont inactifs => forcez la reconfiguration pour continuer les opérations d'écriture rs:SECONDARY> config = { "_id" : "rs", "members" : [ ... {"host":"localhost:27018", "_id":1} ... ] ... } rs:SECONDARY> rs.reconfig(config, {force:true}) { "ok" : 1 } rs:PRIMARY> Jeu de réplicas Supprimé Supprimé Primaire Client Java Pilote ✔ ✗✗
  • 28. Agrégation de données import static com.mongodb.client.model.Accumulators.avg; import static com.mongodb.client.model.Accumulators.sum; import static com.mongodb.client.model.Aggregates.group; import static com.mongodb.client.model.Aggregates.sort; import static com.mongodb.client.model.Aggregates.unwind; import static com.mongodb.client.model.Aggregates.out; … public void deptForSkills() { Document group = new Document(); group.append("skills", "$skills.name"); group.append("dept", "$info.dept"); AggregateIterable<Document> iter = collection.aggregate(Arrays .asList(unwind("$skills"), group(group, avg("avgLevel", "$skills.level"), sum("count", 1)), sort(new Document().append( "_id.skills", 1).append( "avgLevel", -1)), out("skills"))); } DE DvD TR DD VD GS ATR Du D { "_id" : 5, "name" : "John Snow", "skills" : [ { "name" : "java", "level" : 3, "certified" : true }, { "name" : "mongo", "level" : 5 } ], "info" : { "dept" : "A91", "yearsexp" : 3, "gps" : [-74.00597, 40.71427], "location" : "New York" } }
  • 29. Aggregation - Output { "_id" : { "skills" : "c++", "dept" : "A75" }, "avgLevel" : 5, "count" : 10 } { "_id" : { "skills" : "c++", "dept" : "A83" }, "avgLevel" : 4.666666666666667, "count" : 30 } { "_id" : { "skills" : "c++", "dept" : "A91" }, "avgLevel" : 3, "count" : 10 } { "_id" : { "skills" : "java", "dept" : "A75" }, "avgLevel" : 4, "count" : 10 } { "_id" : { "skills" : "java", "dept" : "A83" }, "avgLevel" : 3.5, "count" : 10 } { "_id" : { "skills" : "java", "dept" : "A91" }, "avgLevel" : 3, "count" : 40 } { "_id" : { "skills" : "mongo", "dept" : "A91" }, "avgLevel" : 5, "count" : 40} { "_id" : { "skills" : "mongo", "dept" : "A83" }, "avgLevel" : 2, "count" : 10 } { "_id" : { "skills" : "mongo", "dept" : "A75" }, "avgLevel" : 1, "count" : 10 } DE DvD TR DD VD GS ATR Du D
  • 30. Niveau de base de données Partitionnement Partition 1 Client Java Pilote Partition 2 P S S P S S Routeur Routeur … Niveau client Serveur de configuration Serveur de configuration Serveur de configuration Partition N P S S • Procédez à une montée en charge en fonction de vos besoins • La redondance est intégrée à tous les niveaux • 3 types de partitionnement : Range (Plage), Hashed (Haché) ou Tag-Aware (basé sur la position géographique) DE DvD TR DD VD GS ATR Du D
  • 31. Configuration de MongoDB Utilisez MongoDB OpsManager ou l'automatisation de Cloud Manager pour configurer le cluster (ou) sudo mongod --port 37017 --dbpath /data/shard1 --logpath /logs/shard1.log –fork sudo mongod --port 37018 --dbpath /data/shard2 --logpath /logs/shard2.log –fork sudo mongod --port 47017 --dbpath /data/cfg —configsvr --logpath /logs/cfg.log –fork sudo mongos --port 57017 --configdb localhost:47017 sudo mongos --port 57018 --configdb localhost:47017 mongo --port 57017 > sh.addShard("localhost:37017”) > sh.addShard("localhost:37018”) > sh.enableSharding("mydb”) > sh.shardCollection("mydb.coll",{"_id":1}) Dans le programme Java, transmettez les adresses IP et les ports du routeur en tant que chaîne de connexion DE DvD TR DD VD GS ATR Du D
  • 32. MongoDB pour le Big Data Données enrichies (DE) Diversité des données (DvD) Traitement rapide (TR) Disponibili té des données (DD) Volume de données (VD) Géospatial (GS) Accès en temps réel (ATR) Durabilité des données (DuD) Modèle de données flexible et schéma dynamique Données intégrées Duplication native entre les centres de données Objet WriteConcern adapté Modèle de requête et fonction d'agrégation complets Fonctionnalit és géospatiales natives Scalabilité horizontale selon vos besoins Sous-documents, tableaux, etc.
  • 33. Pour en savoir plus : Java/MongoDB Ressource Emplacement Pilote Java MongoDB http://docs.mongodb.com/ecosyst em/drivers/java/ API Java pour se connecter à MongoDB http://api.mongodb.com/java/3.0/ Télécharger le pilote http://mongodb.github.io/mongo- java-driver/ Projet Morphia https://github.com/mongodb/morp hia Pilote Hadoop pour MongoDB http://docs.mongodb.com/ecosyst em/tools/hadoop/ Formation MongoDB University https://university.mongodb.com/co urses/M101J/about?jmp=docs&_g a=1.249916550.1866581253.1440 492145
  • 34. Ressource Emplacement Études de cas mongodb.com/customers Présentations mongodb.com/presentations Formation en ligne gratuite university.mongodb.com Webinaires et événements mongodb.com/events Documentation docs.mongodb.com Téléchargements MongoDB mongodb.com/download Informations supplémentaires info@mongodb.com Pour en savoir plus : MongoDB
  • 35. Merci ! info@mongodb.com Vous pouvez me contacter à l'adresse suivante :

Notes de l'éditeur

  1. Pilote principal : API alternative MongoDB Async Driver : une nouvelle API asynchrone qui peut exploiter l'objet AsynchronousSocketChannel de Netty ou Java 7 pour mettre en place des E/S rapides et sans blocage. Netty est une infrastructure client-serveur d'entrée/sorte non bloquante (ou NIO, pour « Non-Blocking I/O ») permettant de développer des applications Java pour le réseau, telles que des serveurs et des clients de protocole.
  2. Pool des connexions à la base de données, même avec plusieurs threads MongoClientOptions.Builder() connectionsPerHost HeartbeatConnectTimeout HeartbeatFrequency MaxconnectionIdleTime Pour créer une collection plafonnée -> createCollection (MaxDocuments, UsePowerof2Sizes, plafonnée), getCollection : repoussez la création jusqu'à l'écriture des données
  3. Mécanisme de réponse aux problématiques de MongoDB X509 Couche d'authentification et de sécurité simple (ou SASL, pour Simple Authentication and Security Layer) SCRAM Kerberos LDAP
  4. insertMany
  5. Cela s'applique également pour une fonction lambda avec Java 8 SingleResultCallback<T> : il s'agit d'une interface pour décrire la fin de l'exécution d'une opération asynchrone.
  6. QueryFilter
  7. Une position est la construction géométrique de base. Les « coordonnées » d'une entité géométrique se composent d'une position (pour une géométrie Point), d'un ensemble de positions (dans le cas des géométries LineString ou MultiPoint), d'un ensemble d'ensembles de positions (Polygones, MultiLineStrings) ou d'un ensemble multidimensionnel de positions (MultiPolygon)
  8. updateMany
  9. deleteMany