19
NoSQL Konzepte live und in Farbe Astrid Ritscher code.talks 2014

NoSQL Konzepte live und in Farbe

Embed Size (px)

DESCRIPTION

Die Präsentation wurde auf der code.talks 2014 gezeigt und stellt zwei Konzepte von NoSQL Datenbanken vor, dynamisches Schema und horizontale Skalierbarkeit.

Citation preview

Page 1: NoSQL Konzepte live und in Farbe

NoSQL Konzepte live und in FarbeAstrid Ritscher !

code.talks 2014 !

!

Page 2: NoSQL Konzepte live und in Farbe

NoSQL - Antwort auf Big Data

© Acando GmbH

Variety

VelocityVolume

Page 3: NoSQL Konzepte live und in Farbe

NoSQL-Technologien

© Acando GmbH

Graphen Spalten Dokumente

Page 4: NoSQL Konzepte live und in Farbe

• Document Oriented

• General Purpose

• Open Source

• Community Driven

• Commodity Hardware

© Acando GmbH

Page 5: NoSQL Konzepte live und in Farbe

Dokumentenorientierte NoSQL-Technologie

albums

© Acando GmbH

Page 6: NoSQL Konzepte live und in Farbe

Relational vs. Flexibelalbum

album

album artist

track count

_id

tracks

name

composer

_id

name

composer

genre

_id

album

id

album

album artist

track count

track

id

name

composer

genre

album_id

track

id

name

composer

genre

album_id

© Acando GmbH

Page 7: NoSQL Konzepte live und in Farbe

Flexibles Schema

© Acando GmbH

{ "_id" : 123, "album" : "Neon Bible", "album artist" : "Arcade Fire", "disc count" : 1, "track count" : 11, "tracks" : [ { "_id" : 733, "name" : "Black Mirror", "composer" : "Richard Reed Parry" }, { "_id" : 735, "name" : "Keep The Car Running", "composer" : "Arcade Fire“, "genre" : "Rock" } ] }

album

album

album artist

track count

_id

tracks

name

composer

_idname

composergenre

_id

Page 8: NoSQL Konzepte live und in Farbe

Live

© Acando GmbH

start mongod server flexible data schema show: find, insert, update and remove

Page 9: NoSQL Konzepte live und in Farbe

Performance

© Acando GmbH

Skalierbarkeit

Page 10: NoSQL Konzepte live und in Farbe

Vertikale Skalierung

© Acando GmbH

Page 11: NoSQL Konzepte live und in Farbe

Horizontale Skalierung

© Acando GmbH

Page 12: NoSQL Konzepte live und in Farbe

mongod

MongoDB Server

Your Application

Native Driver

© Acando GmbH

Page 13: NoSQL Konzepte live und in Farbe

Shard 2Shard 1 Shard 3Config

Router

mongodmongod mongod mongod

mongos

Sharding

Your Application

Native Driver

© Acando GmbH

Page 14: NoSQL Konzepte live und in Farbe

ShardingShard Collection: albums Shard Key: album artist

© Acando GmbH

album

album

album artist

track count

_id

tracks

name

composer

_idname

composergenre

_id

Page 15: NoSQL Konzepte live und in Farbe

Sharding

albums

Shard Collection: albums Shard Key: album artist

Shard 1 Shard 3

chunk 1

chunk 3

chunk 4

chunk 2chunk 1 chunk 3 chunk 4

A-B C-F G-T U-Z

© Acando GmbH

Shard 2

chunk 2

Page 16: NoSQL Konzepte live und in Farbe

Shard 2Shard 1 Shard 3Config

Router

mongodmongod mongod mongod

mongos

Sharding

Your Application

Native Driver

© Acando GmbH

Page 17: NoSQL Konzepte live und in Farbe

© Acando GmbH

start shard, config server and router

initialize sharding for a collection

show shard distribution and chunks

Live

Page 18: NoSQL Konzepte live und in Farbe

Shard 2Shard 1 Shard 3Config

Router

mongod

mongod

mongod

mongod

mongod

mongod

mongod

mongod

mongod

mongod

mongod

Sharding in Produktion

mongod

Your Application

Native Driver

© Acando GmbH

mongos mongosmongos mongos

Page 19: NoSQL Konzepte live und in Farbe

© Acando GmbH

Astrid Ritscher

NoSQL Konzepte live und in Farbe