no sql - intro
DESCRIPTION
TRANSCRIPT
![Page 1: No SQL - Intro](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/1.jpg)
NoSQLTech Days 2012
Boris Bucha
![Page 2: No SQL - Intro](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/2.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/3.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/4.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/5.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/6.jpg)
So what do WE typically store ?
Objects graphs
![Page 7: No SQL - Intro](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/7.jpg)
Object graphs like…
![Page 8: No SQL - Intro](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/8.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/9.jpg)
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](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/10.jpg)
Cost of working with aggregates
![Page 11: No SQL - Intro](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/11.jpg)
RavenDB
![Page 12: No SQL - Intro](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/12.jpg)
Use cases
• When ?– View model persistance – CQRS– Aggregates stores
• When NOT ?– BI, Reporting – many adhoc queries
![Page 13: No SQL - Intro](https://reader033.vdocument.in/reader033/viewer/2022061223/54c6f6e74a795929038b45a4/html5/thumbnails/13.jpg)
Cloud friendly