Why should I use DynamoDB?

Home»AWS Support Community Forum»Why should I use DynamoDB?

Why should I use DynamoDB?

Larry W

We plan to move data to noSql db and we need to figure out what are the main difference between DynamoDB and MongoDB ..

This discussion contains 1 reply and has 156 views.


Aldrin Leal

NoSQL is more a set of principles (just like Agile), and Values, than a paradigm, in contrast to the SQL model

Some principles include:

- Think outside the record: MongoDB is Document-Oriented, HBase is Column-Oriented
- A relaxed schema, allowing rich types and stuff like Multi-Valued-Data-Types (MVDT)
- Care less about ACID
- Accept the CAP Theorem and start to accept Eventual Consistency

DynamoDB is good when some properties are met, like:

- Most of the Lookups are Key Based, or there are a composite key + subkey pair
- You want availability in spite of consistency (this feature is optional)
- You have SLA’s and need to keep managed, consistent, yet elastic, Read/Write Throughput
- Your Schema is flexible (beyond the key + optional hash key)
- Your records are under 64KiB
- You optionally want this data hadoop-able (specially from Hive)

So, good cases are:

- Log Records, with a Write-Many, Read Few Scenario
- Session State from Webservers (Write / Read at predictable, elastic pace)
- Aggregated Tables (GROUP BY Materialized Views)

I’m not comparing with MongoDB, although some features are quite similar (specially eventual consistency), and my knowledge on MongoDB is also limited (just a user, you know)

DynamoDB is actually AWS Third Incarnation of the original Dynamo Paper (the same architecture which powers S3, SNS and SQS). The second one was SimpleDB (which is a shame, since I love it for 80% of the cases). Cassandra and Redis are alternate implementations of the same paper.

We’ve covered DynamoDB in this series of articles:

- Overview and Hello World: http://www.newvem.com/dynamodb-and-what-makes-it-special-part-i-the-mapper-framework/
- That Magic Atomic Update thingie: http://www.newvem.com/dynamodb-beyond-the-mapper-low-level-api-using-ranges-atomic-updates-throughput-and-monitoring/
- Dynamo talking to Plush Toy Elephants (read: Hadoop) http://www.newvem.com/amazon-dynamodb-part-iii-mapreducin-logs/

And there’s the Bonus Track, where we cover SNS and CloudWatch for Handling DynamoDB resource scarsity:

- CloudWatch, SNS and Dynamo: http://www.newvem.com/handling-aws-cloudwatch-notifications-with-sns/

Hope it helps

You must be logged in to reply to this topic.