Top Banner
NoSQL Tech Days 2012 Boris Bucha
13
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: No SQL - Intro

NoSQLTech Days 2012

Boris Bucha

Page 2: No SQL - Intro

THE APP

GDI, WPF, SVG, CSS, HTML5 Canvas, WebForms, JSP, …

Message Bus, Crif Technology Platform, Crif CreditFlow, BizTalk, … (long/short running, sync/async ..)

Oracle, Microsoft, Postrge ? … SQL

Page 3: No SQL - Intro

Why so relational ?

• Store / Load interface• Simple , beautiful , flexible (efficiently enough

supports many usecases - almost)• 5 comammandments to make life easier (5NF)– Ayende - compression

• Integration vs Application database (SOA) – agreed (relational) model makes DB easy target to

misuse by other apps

Page 4: No SQL - Intro

The ugly

• Impedance mismatch (well …)

• “Don’t scale” (well …) – Google, Facebook, Linkedin,..– Vertical / horizontal– Shared disk (in cluster)

• Don’t capture the way data are accessed (UI, BL analogy)

vs

Page 5: No SQL - Intro

Welcome to the world ofPolyglot persistence

• Document storesCouchDB, MongoDB, RavenDB, …

• Key-value stores

• Column Family stores

• Graph storesNeo4J, Infinite Graph, OrientDB, FlockDB,…

Page 6: No SQL - Intro

So what do WE typically store ?

Objects graphs

Page 7: No SQL - Intro

Object graphs like…

Page 8: No SQL - Intro

Object graphs that respect rulesof concurrent access

• Objects can often be edited as a group– Coarse-Grained Lock [PoEAA]

(Fowler 2002)

Consistency aplied to groups Object graph = intent

Impedance mismatch !!

Page 9: No SQL - Intro

Aggregate [DDD]

• Consistency boundaries (ACID)

• Relational databases are aggregate-ignorant• Document database to RESCUE!• 1 IO OP = Sharding (sharding function ie. geoloc,

• vip customers,)

Effective Aggregate Design [http://dddcommunity.org/library/vernon_2011]

Page 10: No SQL - Intro

Cost of working with aggregates

Page 11: No SQL - Intro

RavenDB

Page 12: No SQL - Intro

Use cases

• When ?– View model persistance – CQRS– Aggregates stores

• When NOT ?– BI, Reporting – many adhoc queries

Page 13: No SQL - Intro

Cloud friendly