Scala Dynamo - a Scala (and Java!) API for Amazon’s DynamoDB
Last week saw the announcement of Amazon Web Services NoSQL database as a service, Dynamo. Dynamo has a number of very interesting features, not least that it runs as a managed service with certain guarantees with regards to scalability, resilience and performance. From the pricing structure, I would say that Dynamo is probably more expensive than using something like MongoDB for larger datasets. However, I think Dynamo has an interesting role to play for startups and companies with smaller storage needs: Dynamo is perfect as an “early NoSQL database” for startups - you outsource the expensive tasks of managing and scaling the database to Amazon until the point where your business concept has either been proved or disproved. If your concept is dead in the water, your data storage requirements may never really get to a threshold where other solutions are appreciably cheaper, and if your concept is a roaring success, well then you have every reason in the world to put in the effort to migrate from Dynamo to Mongo, Cassandra or something else.
A simple Dynamo API for Scala and Java
With that short intro to where I think Dynamo fits in, I thought I’d unveil Scala Dynamo, an open source project I quickly put together to make working with Dynamo a breeze in Scala or Java. The standard AWS Java API’s are verbose to say the least, but with Scala Dynamo you will be able to save and load Scala case classes or Java beans that fit into the Dynamo way of storing data in a single line. The main thrust of Scala Dynamo so far has been in serializing and deserializing case classes and java bean classes into and from Dynamo. I might add more features in the future as I familiarize myself further with Dynamo, but in the meantime, I think the library should already be quite useful to anyone using a JVM language wanting to work with Dynamo.
For examples, source code etc, check out Scala Dynamo’s GitHub repository!
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)