Slide 1

Slide 1 text

nosql ¯\_(ツ)_/¯

Slide 2

Slide 2 text

ALERT ALERT ALERT

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

nosql

Slide 5

Slide 5 text

what even is nosql "A NoSQL database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases." - wikipedia

Slide 6

Slide 6 text

tradeoffs (with exceptions) heterogeneous data vs defined schemas write speed vs consistency many machines vs one or few machines OLAP vs OLTP

Slide 7

Slide 7 text

then why? they *might* model your data better they can be faster they can be used as secondary stores they *might* support larger scale

Slide 8

Slide 8 text

nosql taxonomy Document Key-Value Other MongoDb RethinkDb CouchDb Riak DynamoDb neo4j Redis HBase

Slide 9

Slide 9 text

someone else explains this well

Slide 10

Slide 10 text

distributed systems detour

Slide 11

Slide 11 text

CAP Theorem consistency - a read sees all previously completed writes availability - reads and writes always succeed partition tolerance - system works despite failures in parts

Slide 12

Slide 12 text

CAP Theorem PICK TWO AND YOU HAVE TO PICK PARTITION TOLERANCE AND IF YOU MESS UP YOU MIGHT GET NONE OF THEM

Slide 13

Slide 13 text

end distributed systems detour

Slide 14

Slide 14 text

Riak conflict resolution "With all of our options available, we want to resolve this conflict. Since the way of resolving this conflict is largely use-case specific, our application can decide how to proceed." - Little Riak Book

Slide 15

Slide 15 text

WELP

Slide 16

Slide 16 text

Use Riak 70 million players 7.5 million concurrent users 11,000 messages per second League Of Legends Chat http://highscalability.com/blog/2014/10/13/how-league-of- legends-scaled-chat-to-70-million-players-it-t.html

Slide 17

Slide 17 text

mongodb ¯\_(ツ)_/¯ schema-less document store

Slide 18

Slide 18 text

sql gibbering madness mongodb

Slide 19

Slide 19 text

database == database collection == table document == row

Slide 20

Slide 20 text

demo

Slide 21

Slide 21 text

more stuff flexible query language multiple indicies decent admin features

Slide 22

Slide 22 text

demo

Slide 23

Slide 23 text

no joins

Slide 24

Slide 24 text

denormalization vs in-app joins

Slide 25

Slide 25 text

demo

Slide 26

Slide 26 text

weaknesses no transactions tooling is poor collection-level locking ops can be hard

Slide 27

Slide 27 text

why? dip in to nosql working with json unstructured data large community working set in memory == SUPER FAST

Slide 28

Slide 28 text

why? PROTOTYPING

Slide 29

Slide 29 text

resources • http://www.slideshare.net/arangodb/introduction-to- column-oriented-databases • http://en.wikipedia.org/wiki/NoSQL • http://littleriakbook.com/ • http://vimeo.com/95066828 • http://aphyr.com/tags/jepsen • http://en.wikipedia.org/wiki/CAP_theorem • http://codahale.com/you-cant-sacrifice-partition- tolerance/ • http://docs.mongodb.org/manual/