NoSQL in der Cloud - Why?

Post on 27-Jan-2015

117 views 2 download

Tags:

description

This presentation shows why NoSQL is a good fit for Cloud applications.

transcript

NoSQL in der Cloud – Why?

Andreas Hartmann

19.11.2012

19.11.2012 NoSQL in der Cloud – Why?2

Quelle: http://res.sys-con.com/story/mar12/2188748/ CloudBigData_0_0.jpg

Why Cloud???

19.11.2012 NoSQL in der Cloud – Why?3

What does Big Data mean???

19.11.2012 NoSQL in der Cloud – Why?4

Why NoSQL???

BigData Connectivity P2P Knowledge

Concurrencey Diversity Cloud

19.11.2012 NoSQL in der Cloud – Why?5

What is the Problem with Big Data

19.11.2012 NoSQL in der Cloud – Why?6

► Caching

► Master/Slave

► Master/Master

► Cluster

► Table Partitioning

► Federated Tables

► Sharding

Quelle: http://www.codefutures.com/database-sharding/

NoSQL Basics – CAP Theorem

19.11.2012 NoSQL in der Cloud – Why?7

Consistency

Each client always has the same view of the data

Availability

All clients can always read and write

Partition tolerance

The System continues to operate despite arbitrary message loss

Quelle: http://blog.nahurst.com/visual-guide-to-nosql-syste ms

ACID-BASE

ACID

Atomicity

► all or nothing rule

Consistency

► any transaction the database performs will take it from one consistent state to another

Isolation

► no transaction should be able to interfere with another transaction at all

Durability

► once a transaction has been committed, it will remain so

BASE

Basically Available

► the system does guarantee availability, in terms of the CAP theorem

Soft-State

► the state of the system may change over time, even without input

Eventual Consistency

► the system will become consistent over time, given that the system doesn't receive input during that time

19.11.2012 NoSQL in der Cloud – Why?8

Quelle: http://en.wikipedia.org/wiki/ACID

Quelle: http://stackoverflow.com/questions/3342497/explanat ion-of-base-terminology

Things to think about!!!

19.11.2012 NoSQL in der Cloud – Why?9

► Scalability

► High Availability

► Caching

► Architecture

► Load Balancing

► Queuing

► Data Handling

► Federation

► Serving Files

► Storing Files

Quelle: http://cloudscaling.com/blog/cloud-computing/up-out -centralized-and-decentralized

Open Your Mind;-)

19.11.2012 NoSQL in der Cloud – Why?10

Quelle: http://images.tribe.net/tribe/upload/photo/ deb/074/deb074db-81fc-4b8a-bfbd-b18b922885cb

NoSQL Tagcloud

19.11.2012 NoSQL in der Cloud – Why?11

Datastore Types

19.11.2012 NoSQL in der Cloud – Why?12

Key/Value Store

Document Store

Extensible Record

Stores (Wide-column Stores)

Graph Database

What ist means

Query

Data is easily and quickly read/storedusing primary key

Denormalize data for commonly usedqueries

► Shema Design is optimized for the mostcommon Use-Cases

Developer

More technologies to have fun with

Broader choice of persistence stores

Probably Cross Store Persistence

► Store name, firstname etc in RDBMS

► Store followers in Graph database

► Store Content in RDBMS

► Store User Generated Content in Document database

19.11.2012 NoSQL in der Cloud – Why?13

Quelle: http://www.slideshare.net/adessoAG/no-sql-9355109

Wich is the right one

19.11.2012 NoSQL in der Cloud – Why?14

Quelle: http://www.slideshare.net/emileifrem/nosql-east-a-nosql-overview-and-the-benefits-of-graph-databases

Wich is the right one

19.11.2012 NoSQL in der Cloud – Why?15

Quelle: http://martinfowler.com/articles/nosql-intro.pdf

Architecture Case Study

19.11.2012 NoSQL in der Cloud – Why?16

Business Critical Data Read/Write

Data should be consistentRarley Changed Data /

Various Reads / Slight inconsistencies are OK

mongoDB as an Example

19.11.2012 NoSQL in der Cloud – Why?17

Document-oriented &

schemaless

JSON like documents

written in C++Open Source with a AGPL-Licence v.3.0

mongoDB in Detail

19.11.2012 NoSQL in der Cloud – Why?18

MongoDB Basics

Security and Authentication – Indexes

Replication – Scaling

Map/Reduce – Binary Data Sets

Monitoring – Backup

Schema Design – Connectivity – Ecosystem

mongoDB – Replication

Replica Sets

► A replica set consists of two or more nodes that are copies of each other

► The replica set automatically selects a primary (master).

► Drivers can automatically detect when a replica set primary changes and will begin sending writes to the new primary

Why Replica Sets

► Automated Failover

► Read Scaling (slaveOkay Method)

► Maintenance

► Disaster Recovery

19.11.2012 NoSQL in der Cloud – Why?19

Quelle: http://www.mongodb.org/display/DOCS/Replica+Sets

mongoDB – Scaling

Sharding

► Horizontal scaling across multiple nodes

Sharding Key

19.11.2012 NoSQL in der Cloud – Why?20

mongoDB – Scaling

Replica Sets comes together with Sharding

19.11.2012 NoSQL in der Cloud – Why?21

Quelle: http://www.mongodb.org/display/DOCS/Sharding+Introd uction

M A P

mongoDB – Map/Reduce

Parallel processing huge datasets on distributed sy stems

19.11.2012 NoSQL in der Cloud – Why?22

Data Data DataData

R E D U C E

mongoDB – Map/Reduce

Map

► XXX

19.11.2012 NoSQL in der Cloud – Why?23

Map Reduce Execute

var map = function() {

emit( this.author, { pages: this.pages } );

};

mongoDB – Map/Reduce

Reduce

19.11.2012 NoSQL in der Cloud – Why?24

var reduce = function( key, values ) {var sum = 0;

values.forEach( function( doc ) {sum += doc.pages;

} );

return { "pages": sum };};

Map Reduce Execute

mongoDB – Map/Reduce

Execute

19.11.2012 NoSQL in der Cloud – Why?25

db.bookstore.mapReduce( map, reduce,{ out: "myresultcollection" } );

{"result" : "myresultcollection","timeMillis" : 156,"counts" : {

"input" : 7,"emit" : 7,"reduce" : 3,"output" : 3

},"ok" : 1,

}

Map Reduce Execute

19.11.2012 NoSQL in der Cloud – Why?26

Quelle: http://res.sys-con.com/story/mar12/2188748/ CloudBigData_0_0.jpgQuelle: http://www.techweekeurope.co.uk/wp-content/ uploads/2011/03/Big-Data.jpg

Thank you for your attention!

www.adesso.deinfo@adesso.de