No SQL - Intro
-
Upload
boris-bucha -
Category
Documents
-
view
126 -
download
5
description
Transcript of No SQL - Intro
NoSQLTech Days 2012
Boris Bucha
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
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
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
Welcome to the world ofPolyglot persistence
• Document storesCouchDB, MongoDB, RavenDB, …
• Key-value stores
• Column Family stores
• Graph storesNeo4J, Infinite Graph, OrientDB, FlockDB,…
So what do WE typically store ?
Objects graphs
Object graphs like…
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 !!
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]
Cost of working with aggregates
RavenDB
Use cases
• When ?– View model persistance – CQRS– Aggregates stores
• When NOT ?– BI, Reporting – many adhoc queries
Cloud friendly