ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Notes from the field:
Different NoSQL tools in
       production
       Matthew Ford
We've used:

Key Value Stores:   Document Stores:

  Redis               MongoDB
  Tokyo Cabinet       CouchDB
Redis
Project: Gnip Filter

Requirements:

Users can filter realtime data streams by keywords.

Solution:

redis.set_add('ipad', 'client_id')

In the background we filter the data stream, when a keyword
matches, we push that piece of data to all the client ids.

redis.set_members('ipad')
Redis

Benefits:                 Drawbacks:

Fast                      Not fault tolerant

Simple model              No replication

Sets are useful           Whole data set in memory

O(1) for set add/remove
Tokyo Cabinet
Project: tweetarium

Requirement:

Store tweets from a user to build up twitter lists

Solution:

Serialized JSON from the twitter API, and arrays of twitter ids
for the lists. Running on a small slicehost slice (poor mans
memcached)


Live at http://tweetarium.com/
NoSQLEU: Different NoSQL tools in Production
Tokyo Cabinet

Benefits:         Drawbacks:

Still Fast        Documentation mostly in
                  Japanese
Persistent
                  Kyoto Cabinet (successor)
Space efficient
CouchDB
Project: Project management app

Requirements:

Everything needed to have version tracking (snapshots of the
entire project and all of it's associations).

Solution:

Hybrid system, removed version control from SQL and pass a
JSON representation of the project data to CouchDB.
CouchDB

Benefits:               Drawbacks:

Flexible                Library support (at the time)

Simplify architecture   JS Views, with changing
                        schema
Robust
                        HTTP not a fast as binary
                        protocol
MongoDB
Project: feesability

Problem:

Case estimation and planning tool, with the need to 'clone
cases'.

Solution:

All cases data is embedded within the case document (with
some references to other documents). This enables us to easily
clone an entire case.
MongoDB

Benefits:                  Drawbacks:

Flexible                   Replication not here yet

Fast                       Libraries are playing catch up

Ad-Hoc queries             Durability Trade-off

Easy to
query embedded documents
Conclusion




   Use the right tools for the job
Thanks!

More info

http://blog.bitzesty.com

General NoSQL news

http://nosql.mypopescu.com/

More Related Content

NoSQLEU: Different NoSQL tools in Production

  • 1. Notes from the field: Different NoSQL tools in production Matthew Ford
  • 2. We've used: Key Value Stores: Document Stores: Redis MongoDB Tokyo Cabinet CouchDB
  • 3. Redis Project: Gnip Filter Requirements: Users can filter realtime data streams by keywords. Solution: redis.set_add('ipad', 'client_id') In the background we filter the data stream, when a keyword matches, we push that piece of data to all the client ids. redis.set_members('ipad')
  • 4. Redis Benefits: Drawbacks: Fast Not fault tolerant Simple model No replication Sets are useful Whole data set in memory O(1) for set add/remove
  • 5. Tokyo Cabinet Project: tweetarium Requirement: Store tweets from a user to build up twitter lists Solution: Serialized JSON from the twitter API, and arrays of twitter ids for the lists. Running on a small slicehost slice (poor mans memcached) Live at http://tweetarium.com/
  • 7. Tokyo Cabinet Benefits: Drawbacks: Still Fast Documentation mostly in Japanese Persistent Kyoto Cabinet (successor) Space efficient
  • 8. CouchDB Project: Project management app Requirements: Everything needed to have version tracking (snapshots of the entire project and all of it's associations). Solution: Hybrid system, removed version control from SQL and pass a JSON representation of the project data to CouchDB.
  • 9. CouchDB Benefits: Drawbacks: Flexible Library support (at the time) Simplify architecture JS Views, with changing schema Robust HTTP not a fast as binary protocol
  • 10. MongoDB Project: feesability Problem: Case estimation and planning tool, with the need to 'clone cases'. Solution: All cases data is embedded within the case document (with some references to other documents). This enables us to easily clone an entire case.
  • 11. MongoDB Benefits: Drawbacks: Flexible Replication not here yet Fast Libraries are playing catch up Ad-Hoc queries Durability Trade-off Easy to query embedded documents
  • 12. Conclusion Use the right tools for the job