devcon summit 2014 #developersuniteph: the "what" and "why" of nosql by matias...

30
THE “WHAT” AND “WHY” OF NOSQL Matias Cascallares @mcascallares [email protected]

Upload: developers-connect-devcon-philippines

Post on 11-Jul-2015

1.990 views

Category:

Software


1 download

TRANSCRIPT

Page 1: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

THE “WHAT”AND “WHY” OF NOSQL

Matias Cascallares@mcascallares

[email protected]

Page 2: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Who Am I?

• Originally from Buenos Aires, Argentina

• Solutions Architect @ MongoDB based in

Singapore

• Software Engineer, most of my experience

in web environments

• In my toolbox I have Java, Python and

Node.js

Page 3: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Let me tell you a story…

• Beginning of 2011

• Tier-1 hardware manufacturer wanted to

build a social aggregator backend

• Supported platforms: Twitter, Facebook

and blogs (RSS/Atom)

• We were a MySql shop

Page 4: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

That moment!

Based on estimations:

- # of users

- dataset size

- write throughput

…we had some doubts

Page 5: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

The Expert

Page 6: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

NoSQL

Page 7: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Not OnlySQL

Page 8: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Why do we need to look

for new databases?

Page 9: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 10: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

First:Requirements

Page 11: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Some facts of our age

• 3M of emails sent per second

• 20 hs of video uploaded to YouTube p/min

• 75 products ordered on Amazon p/sec

• 100K new tweets per minute

Page 12: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Structured Data

Page 13: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Structured DataUnstructured Data

Page 14: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 15: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

SAY BIG DATA

ONE MORE TIME

Page 16: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 17: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Second:New Hardware

Page 18: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 19: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 20: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

.. and not so long time ago

Page 21: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Hardware nowadays

HTTP POST https://ec2.amazonaws.com/?Action=StartInstances &InstanceId.1=i-10a64379 &AUTHPARAMS

Page 22: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 23: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 24: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

NoSql Families

• Key-value stores

• Document databases

• BigTable

• Search engines

Page 25: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Key-value stores

• Access only by primary key

• Implementations are mainly in memory

• Insanely fast

• Value is "something" like a BLOB

Page 26: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Document databases

• General purpose data storage

• Dynamic schema / unstructured data

• Flexible query & indexing capabilities

• Consistent writes

• Aggregation capabilities

Page 27: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

BigTable

• Multidimensional sorted maps

• Data stored across a ring of nodes (P2P)

• Eventually consistent based on quorum

• Append only storage

• Fast when writing, not so fast when

reading.

Page 28: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Search engines

• Not used as primary storage

• Full-text search capabilities

• Faceted search

• Lightweight integration with REST APIs

Page 29: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB
Page 30: DevCon Summit 2014 #DevelopersUnitePH: The "What" and "Why" of NoSQL by Matias Cascallares, MongoDB

Thanks!