Selecting the Right NoSQL Tool for the Job

Preview:

Citation preview

Choosing a NoSQL Solution

Thursday, August 25, 11

Dave GrijalvaDirector of Platform Technology

Thursday, August 25, 11

NoSQL

Thursday, August 25, 11

Why so many?

Thursday, August 25, 11

Tradeoffs

Thursday, August 25, 11

CAP Theorem

C

PA

Consistency

Partition Tolerance

Availability

Unpossible

Thursday, August 25, 11

Access Patterns

• How much content?

• How many operations?

• Ratios of Insert/Update/Read/Delete?

• How valuable is your data?

Thursday, August 25, 11

Schema and Indexing

• How will you access your data?

• User Requests vs Background Processing

• Secondary Indexes

Thursday, August 25, 11

Clustering

•Where is the sharding done?

• Adding and removing nodes

•Where (in the world) is your data?

• Failure cases

Thursday, August 25, 11

Operations

• Backup and recovery

• Multi-datacenter issues

• Ease of deployment

• Tools integration

• Support

Thursday, August 25, 11

NoSQL @ ngmoco:)

Thursday, August 25, 11

Start Simple

Load Balancer

API Server API Server API Server

MySQL MySQLMemcached

Thursday, August 25, 11

OAuth

• Shared secret based

• Signature validation on every request

• Tokens are per session

• Tokens expire

Thursday, August 25, 11

Redis

• In memory key/value store

• Really fast

• Delayed persistence

• Supports TTL per record

• Values can be blobs, lists, sets, or hashes

Thursday, August 25, 11

Game Data Store

• Per user, per game key/value store

• Exposed via REST API

• Very write heavy

• Keys are usually provided upfront

• High data throughput

Thursday, August 25, 11

Cassandra

• Configurable consistency

• No single write master

• Sharding managed by the cluster

• Built in replication

• Supercolumns!

Thursday, August 25, 11

“The Bank”

• High transaction volume

• ACID a requirement

• Lots of tracking required for revenue calculations

• Five nines uptime

• Insert dominant

Thursday, August 25, 11

Marklogic

• XML Document store

• Transactional

• Insert based persistence

• Temporal

• Clustered

Thursday, August 25, 11

Tips

• Start as simple as possible

• Learn how the systems work

• Try to find success and failure stories

• Explore failure scenarios. Test!

• There is no best solution. Look for a best match solution

Thursday, August 25, 11

ngmoco:) is hiring!ngmoco.com/careers

Thursday, August 25, 11

Questions?

Thursday, August 25, 11

Recommended