SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Downloaden Sie, um offline zu lesen
aus der Praxis


13.12.2011
Dipl.-Inf. (FH) Johannes Hoppe
M.Sc. Johannes Hofmeister
Johannes Hoppe
  .NET Webentwickler
 www.johanneshoppe.de
Johannes Hofmeister
    .NET Domänenexperte
  www.twitter.com/pro_cessor
01
Not only SQL
Daten




 2002   2004   2006   2008   2010   2012
Daten
›   Facebook hat 60k Server (2010)
›   Google hat 450k Server (2006)
›   Microsoft: hat 100k - 500k Server (seit Azure)

                                 Facebook Server Footprint
Trend 1: increasing data sizes
Trend 2: more connectedness (“web 2.0”)
Trend 3: more individualization (fever structure)
verteilte und horizontale Skalierbarkeit
kein relationales Datenmodell (kein SQL)
schemafrei / schwache Schemarestriktionen
anderes Konsistenzmodell
Scale-up
Vertikale Skalierung
Server auf mehr Leistungsfähigkeit trimmen
Scale-out
horizontale Skalierung
Einfügen von Nodes (Rechnerknoten)
Schemafrei
kein ALTER TABLE
kein Wartungsfenster *
Datenversionierung im Code!




* morgens ausschlafen
Anforderungen
an ein verteiltes System




                           Consistency
                                  Konsistenz




               Partition
                                           Availability
               Tolerance                       Verfügbarkeit
                Ausfalltoleranz
CAP Theorem
›   2000: E. Brewer, N. Lynch
›   You can satisfy

    at most 2 out of the 3 requirements
Consistency
›   The system is in a consistent state after an operation
›   All clients see the same data
›   Strong consistency (ACID)
    vs. eventual consistency (BASE)



    ACID: Atomicity, Consistency, Isolation and Durability
    BASE: Basically Available, Soft state, Eventually consistent
Availability
›   System is “always on”, no downtime
›   Node failure tolerance
    – all clients can find some available replica
›   Software/hardware upgrade tolerance
Partition tolerance
›   System continues to function even when
    split into disconnected subsets (network disruption)
›   Not only for reads, but writes as well
“Drum prüfe,
wer sich ewig bindet.”
Friedrich Schiller
Kategorisierung
›   Key-Value stores
›   Document stores 
›   Wide Column stores
›   Graphdatenbanken
›   weitere
02
MongoDB
NoSQL




   MongoDB Quick Reference Cards
   http://www.10gen.com/reference
“Deployment”
›   Standardverzeichnis erstellen: c:datadb
›   Server-Start: mongod.exe
›   Shell: mongo.exe
BSON         Master/Slave
JavaScript   C# Driver
Sharding     GNU AGPL
JSON  BSON
All JSON documents are stored in a binary
format called BSON. BSON supports a
richer set of types than JSON.
http://bsonspec.org
CRUD – Create
(in the shell)
› db.people.save({name: 'Smith', age: 30});
See how the save command works:
› db.foo.save
CRUD – Create
…with a bit JavaScript

for(i=0; i<1000; i++) {
    ['quiz', 'essay', 'exam'].forEach(function(name) {
        var score = Math.floor(Math.random() * 50) + 50;
        db.scores.save({student: i, name: name, score: score});
    });
  }
  db.scores.count();
CRUD – Read
Queries are specified using a document-style syntax!

›   db.scores.find();
›   db.scores.find({score: 50});
›   db.scores.find({score: {"$gte": 70}});
›   db.scores.find({score: {"$gte": 70}});
CRUD – Update
›   db.people.update({name: 'Smith'}, {'$set': {interests: []}});
›   db.people.update({name: 'Smith'},
          {'$push': {interests: ['chess']}});
CRUD – Delete
›   db.dropDatabase();
›   db.foo.drop();
›   db.foo.remove();
“Map Reduce is the Uzi of aggregation
tools. Everything described with count,
distinct and group can be done with
MapReduce, and more.”
Kristina Chadorow, Michael Dirolf in MongoDB – The Definitive Guide
https://webnote.codeplex.com
03
RavenDB
NoSQL




   Raven Db Documentation – All you need to know
   http://beta.ravendb.net/docs
JSON        Transactional
LINQ        Lucene
100% .NET   AGPL / dual
RavenDb
›   Written by Oren Eini aka Ayende Rahien
    ›   Hibernating Rhinos
    ›   Rhino Mocks & Rhino.ServiceBus
›   Written in C#
Deployment
›   Get it via NuGet
›   Change defaults in Raven.Server.exe.config
    ›   It’s safe by default
›   Just run the Raven.Server.exe in the /server/ folder
Safe by default
›   Useful defaults
    ›   E.g. Limited page size – No Accidental SELECT *
›   ACID
    ›   Client / Server
    ›   Cross shard
Units
›   Documents
    ›   Collections
›   Indexes
›   Attachments
Designed to “just work”
›   Schema Free
    ›   Hardly any mapping required
    ›   dynamic (C# 4) yields great power
Designed to “just work”
›   Sleek Client API
    ›   Fluent API
    ›   Unit of Work Pattern
    ›   Extensible – Plugin Support
Makes developers happy
›   Testable
    ›   Interfaces all over
    ›   In-Memory Database
›   Extensible – Plugin Support
APIs
›   Native .NET Client API
›   HTTP API (Pseudo REST)
Indexes
›   Written as Linq Queries
›   Indexed with Lucene .NET
›   Lucene Syntax for querying
“While being RESTful is a goal of the
HTTP API, it is secondary to the goal of
exposing easy to use and powerful
functionality”
Ayende Rahien on the HTTP API - http://ravendb.net/documentation/docs-http-api-restful
HTTP API
  ›   Caching
  ›   E-Tags
  ›   Lucene Queries possible
C:>curl -X GET http://localhost:8080/docs/Categories/1 -i
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
ETag: 00000000-0000-0200-0000-000000000004
{
       "Name" : "Normal Importance",
       "Color" : "green"
}
Lucene Style Queries
Classic Linq Style                       Lucene Style
var notes = session                      var notes = session.Advanced
.Query<Note>()                           .LuceneQuery<Note>()
.Where(n => n.Category == “Important")   .Where(“Category:Important")
.ToArray();                              .ToArray();
04
Tabellen  Dokumente
05
Key and Index Strategies
FRAGEN?
https://webnote.codeplex.com/
Vielen Dank!
      Johannes Hoppe
    Johannes Hofmeister
Bildnachweise
Ausgewählter Ordner © Spectral-Design – Fotolia.com
Warnhinweis-Schild © Sascha Tiebel – Fotolia.com
Liste abhaken © Dirk Schumann – Fotolia.com
Stressed businessman © Selecstock – Fotolia.com

Weitere ähnliche Inhalte

Was ist angesagt?

Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp admins
Rick Taylor
 

Was ist angesagt? (20)

[2019.02.16] hst - orm
[2019.02.16] hst  - orm[2019.02.16] hst  - orm
[2019.02.16] hst - orm
 
Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
MuleSoft ESB Payload Encrypt using Anypoint Security
MuleSoft ESB Payload Encrypt using Anypoint SecurityMuleSoft ESB Payload Encrypt using Anypoint Security
MuleSoft ESB Payload Encrypt using Anypoint Security
 
Oozie at Yahoo
Oozie at YahooOozie at Yahoo
Oozie at Yahoo
 
MuleSoft ESB Object Store
MuleSoft ESB Object StoreMuleSoft ESB Object Store
MuleSoft ESB Object Store
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimization
 
Power shell for sp admins
Power shell for sp adminsPower shell for sp admins
Power shell for sp admins
 
Node JS | Dilkash Shaikh Mahajan
Node JS | Dilkash Shaikh MahajanNode JS | Dilkash Shaikh Mahajan
Node JS | Dilkash Shaikh Mahajan
 
MuleSoft ESB XML to CSV
MuleSoft ESB XML to CSVMuleSoft ESB XML to CSV
MuleSoft ESB XML to CSV
 
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
 
AEM WITH MONGODB
AEM WITH MONGODBAEM WITH MONGODB
AEM WITH MONGODB
 
MuleSoft ESB Shared Library
MuleSoft ESB Shared LibraryMuleSoft ESB Shared Library
MuleSoft ESB Shared Library
 
Sails.js Model / ORM introduce
Sails.js Model / ORM introduceSails.js Model / ORM introduce
Sails.js Model / ORM introduce
 
Scalable Text File Service with MongoDB (Intuit)
Scalable Text File Service with MongoDB (Intuit)Scalable Text File Service with MongoDB (Intuit)
Scalable Text File Service with MongoDB (Intuit)
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
Node proxy
Node proxyNode proxy
Node proxy
 
RavenDB 4.0
RavenDB 4.0RavenDB 4.0
RavenDB 4.0
 
Spring Boot Update
Spring Boot UpdateSpring Boot Update
Spring Boot Update
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
Sails js
Sails jsSails js
Sails js
 

Andere mochten auch

2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
Johannes Hoppe
 
2012-10-12 - NoSQL in .NET - mit Redis und Mongodb
2012-10-12 - NoSQL in .NET - mit Redis und Mongodb2012-10-12 - NoSQL in .NET - mit Redis und Mongodb
2012-10-12 - NoSQL in .NET - mit Redis und Mongodb
Johannes Hoppe
 
DMDW Extra Lesson - NoSql and MongoDB
DMDW  Extra Lesson - NoSql and MongoDBDMDW  Extra Lesson - NoSql and MongoDB
DMDW Extra Lesson - NoSql and MongoDB
Johannes Hoppe
 

Andere mochten auch (10)

2012-05-14 NoSQL in .NET - mit Redis und MongoDB
2012-05-14 NoSQL in .NET - mit Redis und MongoDB2012-05-14 NoSQL in .NET - mit Redis und MongoDB
2012-05-14 NoSQL in .NET - mit Redis und MongoDB
 
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
2012-05-10 - UG Karlsruhe: NoSQL in .NET - mit Redis und MongoDB
 
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
 
2013 02-26 - Software Tests with Mongo db
2013 02-26 - Software Tests with Mongo db2013 02-26 - Software Tests with Mongo db
2013 02-26 - Software Tests with Mongo db
 
2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDB2012-09-17 - WDC12: Node.js & MongoDB
2012-09-17 - WDC12: Node.js & MongoDB
 
2012-10-12 - NoSQL in .NET - mit Redis und Mongodb
2012-10-12 - NoSQL in .NET - mit Redis und Mongodb2012-10-12 - NoSQL in .NET - mit Redis und Mongodb
2012-10-12 - NoSQL in .NET - mit Redis und Mongodb
 
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
2012-08-29 - NoSQL Bootcamp (Redis, RavenDB & MongoDB für .NET Entwickler)
 
DMDW Extra Lesson - NoSql and MongoDB
DMDW  Extra Lesson - NoSql and MongoDBDMDW  Extra Lesson - NoSql and MongoDB
DMDW Extra Lesson - NoSql and MongoDB
 
2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach2015 02-09 - NoSQL Vorlesung Mosbach
2015 02-09 - NoSQL Vorlesung Mosbach
 
2012-01-31 NoSQL in .NET
2012-01-31 NoSQL in .NET2012-01-31 NoSQL in .NET
2012-01-31 NoSQL in .NET
 

Ähnlich wie 2011-12-13 NoSQL aus der Praxis

Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for Android
Jakir Hossain
 
SQL Azure Dec Update
SQL Azure Dec UpdateSQL Azure Dec Update
SQL Azure Dec Update
Eric Nelson
 

Ähnlich wie 2011-12-13 NoSQL aus der Praxis (20)

Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and docker
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
Azure Data platform
Azure Data platformAzure Data platform
Azure Data platform
 
Brk3288 sql server v.next with support on linux, windows and containers was...
Brk3288 sql server v.next with support on linux, windows and containers   was...Brk3288 sql server v.next with support on linux, windows and containers   was...
Brk3288 sql server v.next with support on linux, windows and containers was...
 
Azure SQL - more or/and less than SQL Server
Azure SQL - more or/and less than SQL ServerAzure SQL - more or/and less than SQL Server
Azure SQL - more or/and less than SQL Server
 
SQL on linux
SQL on linuxSQL on linux
SQL on linux
 
Exploiting NoSQL Like Never Before
Exploiting NoSQL Like Never BeforeExploiting NoSQL Like Never Before
Exploiting NoSQL Like Never Before
 
Best Practice SharePoint Architecture
Best Practice SharePoint ArchitectureBest Practice SharePoint Architecture
Best Practice SharePoint Architecture
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL Server
 
Journey Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersJourney Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million Users
 
Bootcamp 2017 - SQL Server on Linux
Bootcamp 2017 - SQL Server on LinuxBootcamp 2017 - SQL Server on Linux
Bootcamp 2017 - SQL Server on Linux
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for Android
 
SQL Azure Dec 2010 Update
SQL Azure Dec 2010 UpdateSQL Azure Dec 2010 Update
SQL Azure Dec 2010 Update
 
SQL Azure Dec Update
SQL Azure Dec UpdateSQL Azure Dec Update
SQL Azure Dec Update
 
SUSE Webinar - Introduction to SQL Server on Linux
SUSE Webinar - Introduction to SQL Server on LinuxSUSE Webinar - Introduction to SQL Server on Linux
SUSE Webinar - Introduction to SQL Server on Linux
 
Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)
Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)
Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)
 
Why you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloudWhy you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloud
 

Mehr von Johannes Hoppe

2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGL2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGL
Johannes Hoppe
 
2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup Niederrhein2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup Niederrhein
Johannes Hoppe
 
2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein Neckar2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein Neckar
Johannes Hoppe
 
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
Johannes Hoppe
 

Mehr von Johannes Hoppe (20)

2017 - NoSQL Vorlesung Mosbach
2017 - NoSQL Vorlesung Mosbach2017 - NoSQL Vorlesung Mosbach
2017 - NoSQL Vorlesung Mosbach
 
NoSQL - Hands on
NoSQL - Hands onNoSQL - Hands on
NoSQL - Hands on
 
Einführung in Angular 2
Einführung in Angular 2Einführung in Angular 2
Einführung in Angular 2
 
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und IonicMDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
MDC kompakt 2014: Hybride Apps mit Cordova, AngularJS und Ionic
 
2012-06-25 - MapReduce auf Azure
2012-06-25 - MapReduce auf Azure2012-06-25 - MapReduce auf Azure
2012-06-25 - MapReduce auf Azure
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security
 
2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScript2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScript
 
2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScript2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScript
 
2013 05-03 - HTML5 & JavaScript Security
2013 05-03 -  HTML5 & JavaScript Security2013 05-03 -  HTML5 & JavaScript Security
2013 05-03 - HTML5 & JavaScript Security
 
2013-03-23 - NoSQL Spartakiade
2013-03-23 - NoSQL Spartakiade2013-03-23 - NoSQL Spartakiade
2013-03-23 - NoSQL Spartakiade
 
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
 
2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGL2012-10-16 - WebTechCon 2012: HTML5 & WebGL
2012-10-16 - WebTechCon 2012: HTML5 & WebGL
 
2012-09-18 - HTML5 & WebGL
2012-09-18 - HTML5 & WebGL2012-09-18 - HTML5 & WebGL
2012-09-18 - HTML5 & WebGL
 
2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup Niederrhein2012-04-12 - AOP .NET UserGroup Niederrhein
2012-04-12 - AOP .NET UserGroup Niederrhein
 
2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein Neckar2011-06-27 - AOP - .NET User Group Rhein Neckar
2011-06-27 - AOP - .NET User Group Rhein Neckar
 
DMDW 8. Student Presentation - Groovy to MongoDB
DMDW 8. Student Presentation - Groovy to MongoDBDMDW 8. Student Presentation - Groovy to MongoDB
DMDW 8. Student Presentation - Groovy to MongoDB
 
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
 
DMDW 7. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 7. Student Presentation - Pentaho Data Integration (Kettle)DMDW 7. Student Presentation - Pentaho Data Integration (Kettle)
DMDW 7. Student Presentation - Pentaho Data Integration (Kettle)
 
DMDW 9. Student Presentation - Java to MySQL
DMDW 9. Student Presentation - Java to MySQLDMDW 9. Student Presentation - Java to MySQL
DMDW 9. Student Presentation - Java to MySQL
 
DMDW 11. Student Presentation - JAVA to MongoDB
DMDW 11. Student Presentation - JAVA to MongoDBDMDW 11. Student Presentation - JAVA to MongoDB
DMDW 11. Student Presentation - JAVA to MongoDB
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

2011-12-13 NoSQL aus der Praxis

  • 1. aus der Praxis 13.12.2011 Dipl.-Inf. (FH) Johannes Hoppe M.Sc. Johannes Hofmeister
  • 2. Johannes Hoppe .NET Webentwickler www.johanneshoppe.de
  • 3. Johannes Hofmeister .NET Domänenexperte www.twitter.com/pro_cessor
  • 5. Daten 2002 2004 2006 2008 2010 2012
  • 6. Daten › Facebook hat 60k Server (2010) › Google hat 450k Server (2006) › Microsoft: hat 100k - 500k Server (seit Azure) Facebook Server Footprint
  • 7. Trend 1: increasing data sizes Trend 2: more connectedness (“web 2.0”) Trend 3: more individualization (fever structure)
  • 8.
  • 9. verteilte und horizontale Skalierbarkeit kein relationales Datenmodell (kein SQL) schemafrei / schwache Schemarestriktionen anderes Konsistenzmodell
  • 10. Scale-up Vertikale Skalierung Server auf mehr Leistungsfähigkeit trimmen
  • 12. Schemafrei kein ALTER TABLE kein Wartungsfenster * Datenversionierung im Code! * morgens ausschlafen
  • 13. Anforderungen an ein verteiltes System Consistency Konsistenz Partition Availability Tolerance Verfügbarkeit Ausfalltoleranz
  • 14. CAP Theorem › 2000: E. Brewer, N. Lynch › You can satisfy at most 2 out of the 3 requirements
  • 15. Consistency › The system is in a consistent state after an operation › All clients see the same data › Strong consistency (ACID) vs. eventual consistency (BASE) ACID: Atomicity, Consistency, Isolation and Durability BASE: Basically Available, Soft state, Eventually consistent
  • 16. Availability › System is “always on”, no downtime › Node failure tolerance – all clients can find some available replica › Software/hardware upgrade tolerance
  • 17. Partition tolerance › System continues to function even when split into disconnected subsets (network disruption) › Not only for reads, but writes as well
  • 18. “Drum prüfe, wer sich ewig bindet.” Friedrich Schiller
  • 19. Kategorisierung › Key-Value stores › Document stores  › Wide Column stores › Graphdatenbanken › weitere
  • 21. NoSQL MongoDB Quick Reference Cards http://www.10gen.com/reference
  • 22. “Deployment” › Standardverzeichnis erstellen: c:datadb › Server-Start: mongod.exe › Shell: mongo.exe
  • 23.
  • 24. BSON Master/Slave JavaScript C# Driver Sharding GNU AGPL
  • 25. JSON  BSON All JSON documents are stored in a binary format called BSON. BSON supports a richer set of types than JSON. http://bsonspec.org
  • 26. CRUD – Create (in the shell) › db.people.save({name: 'Smith', age: 30}); See how the save command works: › db.foo.save
  • 27. CRUD – Create …with a bit JavaScript for(i=0; i<1000; i++) { ['quiz', 'essay', 'exam'].forEach(function(name) { var score = Math.floor(Math.random() * 50) + 50; db.scores.save({student: i, name: name, score: score}); }); } db.scores.count();
  • 28. CRUD – Read Queries are specified using a document-style syntax! › db.scores.find(); › db.scores.find({score: 50}); › db.scores.find({score: {"$gte": 70}}); › db.scores.find({score: {"$gte": 70}});
  • 29. CRUD – Update › db.people.update({name: 'Smith'}, {'$set': {interests: []}}); › db.people.update({name: 'Smith'}, {'$push': {interests: ['chess']}});
  • 30. CRUD – Delete › db.dropDatabase(); › db.foo.drop(); › db.foo.remove();
  • 31. “Map Reduce is the Uzi of aggregation tools. Everything described with count, distinct and group can be done with MapReduce, and more.” Kristina Chadorow, Michael Dirolf in MongoDB – The Definitive Guide
  • 34. NoSQL Raven Db Documentation – All you need to know http://beta.ravendb.net/docs
  • 35. JSON Transactional LINQ Lucene 100% .NET AGPL / dual
  • 36. RavenDb › Written by Oren Eini aka Ayende Rahien › Hibernating Rhinos › Rhino Mocks & Rhino.ServiceBus › Written in C#
  • 37. Deployment › Get it via NuGet › Change defaults in Raven.Server.exe.config › It’s safe by default › Just run the Raven.Server.exe in the /server/ folder
  • 38.
  • 39. Safe by default › Useful defaults › E.g. Limited page size – No Accidental SELECT * › ACID › Client / Server › Cross shard
  • 40. Units › Documents › Collections › Indexes › Attachments
  • 41. Designed to “just work” › Schema Free › Hardly any mapping required › dynamic (C# 4) yields great power
  • 42. Designed to “just work” › Sleek Client API › Fluent API › Unit of Work Pattern › Extensible – Plugin Support
  • 43. Makes developers happy › Testable › Interfaces all over › In-Memory Database › Extensible – Plugin Support
  • 44. APIs › Native .NET Client API › HTTP API (Pseudo REST)
  • 45. Indexes › Written as Linq Queries › Indexed with Lucene .NET › Lucene Syntax for querying
  • 46. “While being RESTful is a goal of the HTTP API, it is secondary to the goal of exposing easy to use and powerful functionality” Ayende Rahien on the HTTP API - http://ravendb.net/documentation/docs-http-api-restful
  • 47. HTTP API › Caching › E-Tags › Lucene Queries possible C:>curl -X GET http://localhost:8080/docs/Categories/1 -i HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 ETag: 00000000-0000-0200-0000-000000000004 { "Name" : "Normal Importance", "Color" : "green" }
  • 48. Lucene Style Queries Classic Linq Style Lucene Style var notes = session var notes = session.Advanced .Query<Note>() .LuceneQuery<Note>() .Where(n => n.Category == “Important") .Where(“Category:Important") .ToArray(); .ToArray();
  • 50. 05 Key and Index Strategies
  • 51.
  • 54. Vielen Dank! Johannes Hoppe Johannes Hofmeister
  • 55. Bildnachweise Ausgewählter Ordner © Spectral-Design – Fotolia.com Warnhinweis-Schild © Sascha Tiebel – Fotolia.com Liste abhaken © Dirk Schumann – Fotolia.com Stressed businessman © Selecstock – Fotolia.com