Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

48
NoSQL: The Good, the Bad and the Ugly Rob Harrop

Transcript of Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Page 1: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

NoSQL: The Good, the Bad and the Ugly

Rob Harrop

Page 2: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

About Me

Page 3: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Co-founder of Spring Source

• Writer of books

• Now co-founder and CTO at Bamboo

• UK-based consumer finance startup

Page 4: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015
Page 5: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• I like data

• My business likes data

• NoSQL matters to me!

Page 6: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Naming

Page 7: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

NoSQL

Page 8: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Not Only SQL

Page 9: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

–Martin Fowler

“When we say "x is a NoSQL database" I think it's silly to interpret NoSQL as "Not Only"

because that would render the term meaningless. (You could then reasonably argue that SQL Server (say) is a NoSQL database.)”

Page 10: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Not using the relational model (nor the SQL language)

• Open source

• Designed to run on large clusters

• Based on the needs of 21st century web properties

• No schema, allowing fields to be added to any record without controls

Page 11: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Polyglot Persistence

Page 12: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

IMHO…

Page 13: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Landscape

Page 14: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Data Model• Relational

• Key-value

• Document

• Column

• Graph

• And many more…

Page 15: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Query Model• SQL

• Key/value

• Map/reduce

• JSON path

• Search

Page 16: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Storage

• Distributed

• Replicated

• In-memory

Page 17: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Durability

• Ephemeral stores

• System-of-record stores

• Archive store

Page 18: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Consistency

• Linearised

• Eventual

• Causal

Page 19: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Operations

• Backup

• Failover

• HA

• SaaS

Page 20: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Good, Bad and Ugly

Page 21: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Good: Choice

Page 22: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Right tool for the job

• Choose the simplest tool

• Have more fun

Page 23: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Bad: Choice

Page 24: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Making the choice is hard

• Danger of analysis paralysis

• Might head down the wrong road

Page 25: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Bad: Complexity

Page 26: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Consistency is front and centre

• Data models aren’t always straightforward

• Might head down the wrong road

Page 27: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Good: Complexity

Page 28: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Illusions of reliability and consistency are removed

• Deeper understanding cannot hurt

Page 29: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Bad: Marketing

Page 30: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Many elaborate claims

• Plenty of dis-information

• Difficult for beginners to find the kernel of truth

Page 31: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Good: Science!

Page 32: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015
Page 33: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Good quality experience reports

• Solid base of literature

• Deep analysis

• Kyle Kingsbury - Jepsen

• Testing isn’t all that hard

Page 34: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Ugly: Trolling

Page 35: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Sheer number of choices leads to many opinions

• Exaggerated claims compound with opinions

• Claims can be difficult to verify

• Evangelism leads to emotional investment

Page 36: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Good: Many Models

Page 37: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• No longer one big data model

• Compose models to solve a problem

• Different models with different requirements

• Model per micro-service?

Page 38: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• Split by use-case

• Read model for analytics

• Search model

• Low latency write model

• Layer within use-case

• Caching

• System of record

• Separate write model (CQRS)

Page 39: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Good: SaaS

Page 40: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

• AWS

• Redshift, DynamoDB, Elasticache, S3, RDS

• Google Cloud

• SQL, Storage, BigQuery, Datastore

• Azure

• SQL, DocumentDB, Redis, Storage

Page 41: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Good: SQL Innovation

Page 42: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Doing NoSQL

Page 43: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Learn

• Understand the concepts

• Don’t get overwhelmed!

• Read the literature

• The Morning Paper from Adrian Colyer

Page 44: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Specify• What are your performance/reliability/scalability

requirements?

• How will you handle differing consistency models?

• Who owns what data?

• How long does data live for?

• Does data live in only one place?

Page 45: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Get Started• Implement something small

• Caching, search, analysis

• Use ancillary technologies

• Blob store

• Archive storage

Page 46: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Get Serious• Get the best out of your SQL database

• Identify core functional areas for NoSQL

• Low-latency

• Document

• Migrate gradually

• Consider parallel runs

Page 47: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Get Sophisticated

• Segment system into multiple models

• Identify consistency/durability/reliability boundaries

• Fit the right store to each model

• Layer stores within a model as needed

Page 48: Rob Harrop- Key Note The God, the Bad and the Ugly - NoSQL matters Paris 2015

Q&A@robertharrop