BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Amazon Boosts JSON Support in DynamoDB NoSQL Database

Amazon Boosts JSON Support in DynamoDB NoSQL Database

This item in japanese

Last week, the Amazon Web Services team made changes to their DynamoDB NoSQL database service that improve JSON support, improve scalability, and expand the free usage tier. Developers can now use AWS SDKs to store, index, query, and update large JSON documents while consuming up to 25GB of free storage.

AWS published a blog post stating their belief that DynamoDB – traditionally seen as a key-value NoSQL store – now qualifies as a document store like MongoDB.

This new document-oriented support is implemented in the AWS SDKs and makes use of some new DynamoDB data types. The document support (available now in the AWS SDK for Java, the SDK for .NET, the SDK for Ruby, and an extension to the SDK for JavaScript in the Browser) makes it easy to map your JSON data or native language object on to DynamoDB's native data types and for supporting queries that are based on the structure of your document.

With this addition, DynamoDB becomes a full-fledged document store. Using the AWS SDKs, it is easy to store JSON documents in a DynamoDB table while preserving their complex and possibly nested "shape." The new data types could also be used to store other structured formats such as HTML or XML by building a very thin translation layer.

The implementation of this new capability is not identical across AWS SDKs and it should be noted that AWS uses JSON as a transport protocol only and doesn’t store the data itself as JSON documents. While the Java SDK offers the ability to load a JSON-encoded string directly into a DynamoDB database record, the .NET SDK requires developers to use the (updated) object model to build up a document. In addition to providing scalar data types like Number, String, and Binary in their object model, AWS introduced new document-oriented data types called List and Map. A List is described as an “ordered collection of values, similar to a JSON array” and a Map is an “unordered collection of name-value pairs, similar to a JSON object.”

In a blog post, AWS CTO Werner Vogels traced the history of DynamoDB and recognized the impact that lackluster JSON support had on developers.

While you could store JSON documents in DynamoDB from the day we launched, it was hard to do anything beyond storing and retrieving these documents. Developers did not have direct access to the nested attributes embedded deep within a JSON document, and losing sight of these deeply nested attributes deprived developers of some of the incredible native capabilities of DynamoDB.

Until now, developers who wanted to store and query JSON had two choices: a) develop quickly and insert opaque JSON blobs in DynamoDB while losing access to key DynamoDB capabilities, or b) decompose the JSON objects themselves into attributes, which requires additional programming effort and a fair bit of forethought.

DynamoDB’s new JSON capabilities aren’t limited to storing documents, but also querying them. While you can now view JSON documents in the AWS UI console, developers will be more interested in the ability to retrieve and update entire documents, or parts of a document, via the SDK. AWS upped the size restrictions for documents from 64KB to 400KB and loosened the scaling restrictions by letting users more than double or halve the amount of “capacity units” in a single action.  Amazon also kicked up the amount of storage available in the free tier of DynamoDB. Instead of 100MB of storage and 10 read capacity units, DynamoDB users can now store 25GB and consume 25 read/write capacity units for free. According to AWS, that’s enough juice to “run a mobile game with over 15,000 players, or run an ad tech platform serving 500,000 impressions per day.”

This AWS update is likely a response to the increased developer demand for JSON-friendly application services, and as GigaOm reports, an opportunity to take away momentum from mature services like MongoDB and newer offerings from Microsoft and Google. Perhaps as a subtle dig to those NoSQL offerings that struggle to operate at massive scale, Vogels claims that “now, developers do not have to choose between datastores that are optimized for scalability and those that are optimized for flexibility.”

Rate this Article

Adoption
Style

BT