SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
MongoDB
Fluch oder Segen

Michele Catalano I 04. Oktober 2012




                                      © 2012 Mayflower GmbH
SQL versus NoSQL


Relationale Database (SQL)        No SQL - different from
                                  SQL

       ACID
                                              BASE
       Atomicity
                                              Basically Available
       Consistency
                                              Soft State
       Isolation
                                              Eventually consistent
       Durability



   -Strong consistency                        -Weak consistency
   -Isolation                                 -Availability
   -Two-Phase commit                          -Easy development
   -Complex development                       -Faster
   -More reliable



                             Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 2
NoSQL


Key Value Store                                 Column Store




Graph Databases                                Document Stores




                  Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 3
MongoDB Definition




                    Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB Definition



I Named from „humongous“ = gigantisch




                           Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB Definition



I Named from „humongous“ = gigantisch
I Dokument-oriented NoSQL datastore
   • Open Source: https://github.com/mongodb
   • Support from Manufacturer 10gen: http://www.
     10gen.com




                             Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB Definition



I Named from „humongous“ = gigantisch
I Dokument-oriented NoSQL datastore
   • Open Source: https://github.com/mongodb
   • Support from Manufacturer 10gen: http://www.
     10gen.com
I Replication & High Availability




                                Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB Definition



I Named from „humongous“ = gigantisch
I Dokument-oriented NoSQL datastore
   • Open Source: https://github.com/mongodb
   • Support from Manufacturer 10gen: http://www.
     10gen.com
I Replication & High Availability
I Sharding & High scalability (Scale-Out)




                               Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB Definition



I Named from „humongous“ = gigantisch
I Dokument-oriented NoSQL datastore
   • Open Source: https://github.com/mongodb
   • Support from Manufacturer 10gen: http://www.
     10gen.com
I Replication & High Availability
I Sharding & High scalability (Scale-Out)
I Full index support




                               Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB Definition



I Named from „humongous“ = gigantisch
I Dokument-oriented NoSQL datastore
   • Open Source: https://github.com/mongodb
   • Support from Manufacturer 10gen: http://www.
     10gen.com
I Replication & High Availability
I Sharding & High scalability (Scale-Out)
I Full index support
I Map/Reduce




                               Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB Definition



I Named from „humongous“ = gigantisch
I Dokument-oriented NoSQL datastore
   • Open Source: https://github.com/mongodb
   • Support from Manufacturer 10gen: http://www.
     10gen.com
I Replication & High Availability
I Sharding & High scalability (Scale-Out)
I Full index support
I Map/Reduce
I Geospatial indexes / queries


                                 Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 4
MongoDB



 Dokumenten Store

         JSON/BSON
                                                                Javascript




     Horizontal Skalieren mit Sharding



                                         Aufallsicherheit mit ReplicaSet




                                   Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 5
Document Store


 JSON/BSON

             {
             
   "_id" : ObjectId("506cd89ea5b7c630ac719bd6"),
             
   "Title" : "Hallo bei dem Vortrag",
             
   "autor" : "Michele Catalano",
             
   "thema" : "MongoDB, was geht ab",
             
   "noch ein document" : {
             
   
          "weiter" : 12344
             
   },
             
   "liste" : [
             
   
          23,
             
   
          445,
             
   
          566
             
   ]
             }



                             Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 6
Document Store Naming




      MySQL             MongoDB
      database          db
      table             collection
      row               document
      column            content in
                        document



                         Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 7
Javascript



 SpiderMonkey

                            Map/Reduce



         mongo shell


                       db.vortrag.find({„title“ : „MongoDB“})

                       db.freunde.update({„title“:“MongoDB“
                       },{ $set : { „nochwas“:“TaTA“}})




                              Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 8
ReplicaSet und Sharding


  Sicherheit durch ReplicaSet




                          ReplicaSe
                          t




                                      Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
ReplicaSet und Sharding


  Sicherheit durch ReplicaSet




                          ReplicaSe
                            ReplicaSe
                          t
                            t




                                    Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
ReplicaSet und Sharding


  Sicherheit durch ReplicaSet
     Skalierung per Sharding mit Hardware




                          ReplicaSe
                            ReplicaSe
                          t
                            t




                                    Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
ReplicaSet und Sharding


    Sicherheit durch ReplicaSet
       Skalierung per Sharding mit Hardware




Config                       ReplicaSe
 Config                        ReplicaSe
  Config
Server                      t
 Server                       t
  Server




                                      Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
ReplicaSet und Sharding


    Sicherheit durch ReplicaSet
       Skalierung per Sharding mit Hardware

                         Shard 1


Config                       ReplicaSe
 Config                        ReplicaSe
  Config
Server                      t
 Server                       t
  Server




                                      Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
ReplicaSet und Sharding


    Sicherheit durch ReplicaSet
       Skalierung per Sharding mit Hardware

                         Shard 1


Config                       ReplicaSe                                  ReplicaSe
 Config                        ReplicaSe                                  ReplicaSe
  Config
Server                      t                                          t
 Server                       t                                          t
  Server




                                      Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
ReplicaSet und Sharding


    Sicherheit durch ReplicaSet
       Skalierung per Sharding mit Hardware

                         Shard 1                                   Shard 2


Config                       ReplicaSe                                  ReplicaSe
 Config                        ReplicaSe                                  ReplicaSe
  Config
Server                      t                                          t
 Server                       t                                          t
  Server




                                      Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
ReplicaSet und Sharding


    Sicherheit durch ReplicaSet
       Skalierung per Sharding mit Hardware

                         Shard 1                                   Shard 2


Config                       ReplicaSe                                  ReplicaSe
 Config                        ReplicaSe                                  ReplicaSe
  Config
Server                      t                                          t
 Server                       t                                          t
  Server




                              Erhöhung der Rechner Anzahl nicht der
                              Rechner power!

                                      Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 9
Sharding



I Chunks
   • Split der Index in ranges.
   • wenn unique index muss dieser der shardkey
     sein.


I Balancer
   • teuer und ausbremsend




                             Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 10
Achtung


  Schema
                                                                 Scalierung
              Map/Reduce



                                         Performance



      Error Handling


                                               Collection




                           Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 11
Schema und Collection



 Schema

  | Planung vor dem Deploment
  | Vorschau auf die wahrscheinliche
      Zukunft
  |   Grenzen der MongoDB beachten


                        Collection

                        | Erwartete Queries für die Dokumente
                         berücksichtigen
                        | Index klar definieren
                        | Dokumentengröße stabil halten.

                                       Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 12
Map/Reduce


 Javascript Funktion




                       SpiderMonkey ist single Thread!




                            Map/Reduce Jobs können die Datenbank
                            blockieren bzw. sich gegenseitig
                            stoppen.




                                     Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 13
Error Handling



I Fire and Forget
I Connection timeout heißt nicht. Das die Daten
  irgendwann doch geschrieben werden.
I Jeder Fehler muss sehr speziell behandelt werden.




                              Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 14
Performance



I Arbeitsspeicher muss mindestens die Indexes
  Vorhalten können
I Mehr Arbeitsspeicher ist besser
I Mehr Spindel ist besser (Parallel Platten z.B. RAID 0
  oder 10)
I Sehr hohe Anzahl der Netzwerk Connections.
I Trennung von Journal und Datenbank Dateien
  (auch Physich)




                                Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 15
Fazit



I Datensicherheit nicht garantiert
I Schnell durch massive Arbeitsspeicher Nutzung
I Dokumente einfach und schnell zu programmieren
I Nachhaltig Entwickeln sehr aufwendig
I Flexibilität der Dokumente nicht ganz so wahr wie
  versprochen.
I Vorausdenken ist absolutes muss!




                               Titel der Präsentation   I   Mayflower GmbH   I   04. Oktober 2012   I 16
Vielen Dank für Ihre
Aufmerksamkeit!




Kontakt Michele Catalano
        michele.catalano@mayflower.de
        +49 89 242054-1112

        Mayflower GmbH
        Mannhardtstr. 6
        80538 München



                                       © 2012 Mayflower GmbH

Más contenido relacionado

Destacado

Lobulos cerebrales
Lobulos cerebralesLobulos cerebrales
Lobulos cerebralespsico2015
 
Contrabrief de chocolate sol
Contrabrief de chocolate solContrabrief de chocolate sol
Contrabrief de chocolate solpedrosura94
 
DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...
DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...
DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...Deltares
 
Aprender a leer y escribir
Aprender a leer y escribirAprender a leer y escribir
Aprender a leer y escribirIris Ramírez
 
CoralCare LED unit - Preliminary Field Test Report - FINAL v3
CoralCare LED unit - Preliminary Field Test Report - FINAL v3CoralCare LED unit - Preliminary Field Test Report - FINAL v3
CoralCare LED unit - Preliminary Field Test Report - FINAL v3Tim Wijgerde
 
Plantilla CUBECRAFT (blanco)
Plantilla CUBECRAFT (blanco)Plantilla CUBECRAFT (blanco)
Plantilla CUBECRAFT (blanco)Geohistoria23
 
Presentación Lisandro Caravaca en EBE 14
Presentación Lisandro Caravaca en EBE 14Presentación Lisandro Caravaca en EBE 14
Presentación Lisandro Caravaca en EBE 14Lisandro Caravaca
 
Innovación a Escala Humana
Innovación a Escala HumanaInnovación a Escala Humana
Innovación a Escala HumanaLuciano GALLON
 
Die region asien michael strasser sep2011
Die region asien michael strasser sep2011Die region asien michael strasser sep2011
Die region asien michael strasser sep2011rupertrechling
 
Einkommen und Armut in Tirol 2008
Einkommen und Armut in Tirol 2008Einkommen und Armut in Tirol 2008
Einkommen und Armut in Tirol 2008lebenmitzukunft
 

Destacado (12)

Lobulos cerebrales
Lobulos cerebralesLobulos cerebrales
Lobulos cerebrales
 
Contrabrief de chocolate sol
Contrabrief de chocolate solContrabrief de chocolate sol
Contrabrief de chocolate sol
 
DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...
DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...
DSD-INT 2015 - The future of computer modeling of coastal wetland, estuarine,...
 
Aprender a leer y escribir
Aprender a leer y escribirAprender a leer y escribir
Aprender a leer y escribir
 
Paz
PazPaz
Paz
 
CoralCare LED unit - Preliminary Field Test Report - FINAL v3
CoralCare LED unit - Preliminary Field Test Report - FINAL v3CoralCare LED unit - Preliminary Field Test Report - FINAL v3
CoralCare LED unit - Preliminary Field Test Report - FINAL v3
 
Plantilla CUBECRAFT (blanco)
Plantilla CUBECRAFT (blanco)Plantilla CUBECRAFT (blanco)
Plantilla CUBECRAFT (blanco)
 
Chapter 6 Work And Energy
Chapter 6 Work And EnergyChapter 6 Work And Energy
Chapter 6 Work And Energy
 
Presentación Lisandro Caravaca en EBE 14
Presentación Lisandro Caravaca en EBE 14Presentación Lisandro Caravaca en EBE 14
Presentación Lisandro Caravaca en EBE 14
 
Innovación a Escala Humana
Innovación a Escala HumanaInnovación a Escala Humana
Innovación a Escala Humana
 
Die region asien michael strasser sep2011
Die region asien michael strasser sep2011Die region asien michael strasser sep2011
Die region asien michael strasser sep2011
 
Einkommen und Armut in Tirol 2008
Einkommen und Armut in Tirol 2008Einkommen und Armut in Tirol 2008
Einkommen und Armut in Tirol 2008
 

Similar a Mongo db

DOAG Webinar Oracle und Docker
DOAG Webinar Oracle und DockerDOAG Webinar Oracle und Docker
DOAG Webinar Oracle und DockerStefan Oehrli
 
MongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDBMongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDBTobias Trelle
 
Boost your APEX Deployment and Provisioning with Docker
Boost your APEX Deployment and Provisioning with DockerBoost your APEX Deployment and Provisioning with Docker
Boost your APEX Deployment and Provisioning with DockerSteven Grzbielok
 
TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)
TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)
TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)die.agilen GmbH
 
Typo3 cms-6-0-die-neuerungen
Typo3 cms-6-0-die-neuerungenTypo3 cms-6-0-die-neuerungen
Typo3 cms-6-0-die-neuerungenMokhtar Slama
 
Kennst du ein Unternehmen, dass erfolgreich die QS outtasked hat?“
Kennst du einUnternehmen, dass erfolgreichdie QS outtasked hat?“Kennst du einUnternehmen, dass erfolgreichdie QS outtasked hat?“
Kennst du ein Unternehmen, dass erfolgreich die QS outtasked hat?“hpaustria
 
BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...
BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...
BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...Robin Sedlaczek
 
FMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico Busch
FMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico BuschFMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico Busch
FMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico BuschVerein FM Konferenz
 
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...gedoplan
 
Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)
Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)
Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)Trivadis
 

Similar a Mongo db (13)

DOAG Webinar Oracle und Docker
DOAG Webinar Oracle und DockerDOAG Webinar Oracle und Docker
DOAG Webinar Oracle und Docker
 
MongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDBMongoDB Munich 2012: Spring Data MongoDB
MongoDB Munich 2012: Spring Data MongoDB
 
Apex meets Docker
Apex meets DockerApex meets Docker
Apex meets Docker
 
Boost your APEX Deployment and Provisioning with Docker
Boost your APEX Deployment and Provisioning with DockerBoost your APEX Deployment and Provisioning with Docker
Boost your APEX Deployment and Provisioning with Docker
 
Dockerize It - Mit apex in die amazon cloud
Dockerize It - Mit apex in die amazon cloudDockerize It - Mit apex in die amazon cloud
Dockerize It - Mit apex in die amazon cloud
 
TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)
TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)
TYPO3 CMS 6.0 - Die Neuerungen (typovision GmbH)
 
Typo3 cms-6-0-die-neuerungen
Typo3 cms-6-0-die-neuerungenTypo3 cms-6-0-die-neuerungen
Typo3 cms-6-0-die-neuerungen
 
Symfony2
Symfony2Symfony2
Symfony2
 
Kennst du ein Unternehmen, dass erfolgreich die QS outtasked hat?“
Kennst du einUnternehmen, dass erfolgreichdie QS outtasked hat?“Kennst du einUnternehmen, dass erfolgreichdie QS outtasked hat?“
Kennst du ein Unternehmen, dass erfolgreich die QS outtasked hat?“
 
BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...
BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...
BASTA! Spring 2017 - Warum warten auf die IDE? Direct Coding in der eigenen A...
 
FMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico Busch
FMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico BuschFMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico Busch
FMK2012: Datenaustausch zwischen FileMaker und MySQL von Nico Busch
 
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
Das Runde muss in das Eckige - Java-Anwendungen für Kubernetes entwickeln und...
 
Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)
Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)
Oracle Data Warehouse Integration Builder - Ein Selbstversuch (DOAG 2013)
 

Mongo db

  • 1. MongoDB Fluch oder Segen Michele Catalano I 04. Oktober 2012 © 2012 Mayflower GmbH
  • 2. SQL versus NoSQL Relationale Database (SQL) No SQL - different from SQL ACID BASE Atomicity Basically Available Consistency Soft State Isolation Eventually consistent Durability -Strong consistency -Weak consistency -Isolation -Availability -Two-Phase commit -Easy development -Complex development -Faster -More reliable Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 2
  • 3. NoSQL Key Value Store Column Store Graph Databases Document Stores Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 3
  • 4. MongoDB Definition Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 5. MongoDB Definition I Named from „humongous“ = gigantisch Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 6. MongoDB Definition I Named from „humongous“ = gigantisch I Dokument-oriented NoSQL datastore • Open Source: https://github.com/mongodb • Support from Manufacturer 10gen: http://www. 10gen.com Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 7. MongoDB Definition I Named from „humongous“ = gigantisch I Dokument-oriented NoSQL datastore • Open Source: https://github.com/mongodb • Support from Manufacturer 10gen: http://www. 10gen.com I Replication & High Availability Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 8. MongoDB Definition I Named from „humongous“ = gigantisch I Dokument-oriented NoSQL datastore • Open Source: https://github.com/mongodb • Support from Manufacturer 10gen: http://www. 10gen.com I Replication & High Availability I Sharding & High scalability (Scale-Out) Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 9. MongoDB Definition I Named from „humongous“ = gigantisch I Dokument-oriented NoSQL datastore • Open Source: https://github.com/mongodb • Support from Manufacturer 10gen: http://www. 10gen.com I Replication & High Availability I Sharding & High scalability (Scale-Out) I Full index support Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 10. MongoDB Definition I Named from „humongous“ = gigantisch I Dokument-oriented NoSQL datastore • Open Source: https://github.com/mongodb • Support from Manufacturer 10gen: http://www. 10gen.com I Replication & High Availability I Sharding & High scalability (Scale-Out) I Full index support I Map/Reduce Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 11. MongoDB Definition I Named from „humongous“ = gigantisch I Dokument-oriented NoSQL datastore • Open Source: https://github.com/mongodb • Support from Manufacturer 10gen: http://www. 10gen.com I Replication & High Availability I Sharding & High scalability (Scale-Out) I Full index support I Map/Reduce I Geospatial indexes / queries Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 4
  • 12. MongoDB Dokumenten Store JSON/BSON Javascript Horizontal Skalieren mit Sharding Aufallsicherheit mit ReplicaSet Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 5
  • 13. Document Store JSON/BSON { "_id" : ObjectId("506cd89ea5b7c630ac719bd6"), "Title" : "Hallo bei dem Vortrag", "autor" : "Michele Catalano", "thema" : "MongoDB, was geht ab", "noch ein document" : { "weiter" : 12344 }, "liste" : [ 23, 445, 566 ] } Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 6
  • 14. Document Store Naming MySQL MongoDB database db table collection row document column content in document Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 7
  • 15. Javascript SpiderMonkey Map/Reduce mongo shell db.vortrag.find({„title“ : „MongoDB“}) db.freunde.update({„title“:“MongoDB“ },{ $set : { „nochwas“:“TaTA“}}) Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 8
  • 16. ReplicaSet und Sharding Sicherheit durch ReplicaSet ReplicaSe t Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 17. ReplicaSet und Sharding Sicherheit durch ReplicaSet ReplicaSe ReplicaSe t t Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 18. ReplicaSet und Sharding Sicherheit durch ReplicaSet Skalierung per Sharding mit Hardware ReplicaSe ReplicaSe t t Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 19. ReplicaSet und Sharding Sicherheit durch ReplicaSet Skalierung per Sharding mit Hardware Config ReplicaSe Config ReplicaSe Config Server t Server t Server Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 20. ReplicaSet und Sharding Sicherheit durch ReplicaSet Skalierung per Sharding mit Hardware Shard 1 Config ReplicaSe Config ReplicaSe Config Server t Server t Server Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 21. ReplicaSet und Sharding Sicherheit durch ReplicaSet Skalierung per Sharding mit Hardware Shard 1 Config ReplicaSe ReplicaSe Config ReplicaSe ReplicaSe Config Server t t Server t t Server Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 22. ReplicaSet und Sharding Sicherheit durch ReplicaSet Skalierung per Sharding mit Hardware Shard 1 Shard 2 Config ReplicaSe ReplicaSe Config ReplicaSe ReplicaSe Config Server t t Server t t Server Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 23. ReplicaSet und Sharding Sicherheit durch ReplicaSet Skalierung per Sharding mit Hardware Shard 1 Shard 2 Config ReplicaSe ReplicaSe Config ReplicaSe ReplicaSe Config Server t t Server t t Server Erhöhung der Rechner Anzahl nicht der Rechner power! Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 9
  • 24. Sharding I Chunks • Split der Index in ranges. • wenn unique index muss dieser der shardkey sein. I Balancer • teuer und ausbremsend Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 10
  • 25. Achtung Schema Scalierung Map/Reduce Performance Error Handling Collection Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 11
  • 26. Schema und Collection Schema | Planung vor dem Deploment | Vorschau auf die wahrscheinliche Zukunft | Grenzen der MongoDB beachten Collection | Erwartete Queries für die Dokumente berücksichtigen | Index klar definieren | Dokumentengröße stabil halten. Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 12
  • 27. Map/Reduce Javascript Funktion SpiderMonkey ist single Thread! Map/Reduce Jobs können die Datenbank blockieren bzw. sich gegenseitig stoppen. Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 13
  • 28. Error Handling I Fire and Forget I Connection timeout heißt nicht. Das die Daten irgendwann doch geschrieben werden. I Jeder Fehler muss sehr speziell behandelt werden. Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 14
  • 29. Performance I Arbeitsspeicher muss mindestens die Indexes Vorhalten können I Mehr Arbeitsspeicher ist besser I Mehr Spindel ist besser (Parallel Platten z.B. RAID 0 oder 10) I Sehr hohe Anzahl der Netzwerk Connections. I Trennung von Journal und Datenbank Dateien (auch Physich) Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 15
  • 30. Fazit I Datensicherheit nicht garantiert I Schnell durch massive Arbeitsspeicher Nutzung I Dokumente einfach und schnell zu programmieren I Nachhaltig Entwickeln sehr aufwendig I Flexibilität der Dokumente nicht ganz so wahr wie versprochen. I Vorausdenken ist absolutes muss! Titel der Präsentation I Mayflower GmbH I 04. Oktober 2012 I 16
  • 31. Vielen Dank für Ihre Aufmerksamkeit! Kontakt Michele Catalano michele.catalano@mayflower.de +49 89 242054-1112 Mayflower GmbH Mannhardtstr. 6 80538 München © 2012 Mayflower GmbH

Notas del editor

  1. \n
  2. \n ACID (Atomicity, Consistency, Isolation, Durability)\n BASE (Basically Available, Soft State, Eventually consistent)\n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. Engine ist SpiderMonkey vom Mozilla fondation\nMap/Reduce geht mit Javascript auf dem Server\nMongo shell ist javascript\n\n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. VFS Virtual File System\nFire and Forget\nHarddisk speed und spindelanzahl (RAID)\nVon ReplicaSet zu Sharding (2Server auf 7 Server!)\n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n