1

There have been questions in the past about creating an abstraction layer for NoSQL databases, but they differ so much that it wasn't really possible without missing out on most of the features that they provide.

This recently changed with the introduction of Amazon's DynamoDb which looks almost identical to Microsoft's Azure Table Storage so I'm looking at making an open source abstraction layer. Everybody loves abstraction as it gives us more leverage when trying to persuade our employers to embraces these 'new' technologies.

As far as I can tell

AzureTable.RowKey == DynamoDB.HashKey
AzureTable.PartitionKey == DynamoDB.RangeKey

Can anybody see what issues may arise and what functionality I may lose by creating this abstraction layer?

Both appear to partition the data in the same way, and their querying looks similar.

The first thing I've noticed is that Microsoft's c# SDK requires your class to derive from TableServiceEntity whereas Amazon's c# object persistence framework uses attributes on the HashKey and RangeKey properties.

Community
  • 1
  • 1
Tim
  • 7,746
  • 3
  • 49
  • 83
  • Have you proceeded to build this abstraction layer, and is it available open-source? – Bart Verkoeijen Feb 28 '14 at 02:31
  • I don't think it is a good idea, simple because Azure Tables are a wide column store, and AWS DynamoDB is a document store. In this case you should consider Azure Tables vs AWS SimpleDB, or AWS DynamoDB vs Azure DocumentDB. – Diego Mendes Oct 01 '16 at 12:40
  • A lot has changed since 2012. Azure DocumentDB didn't even exist back then! – Tim Oct 06 '16 at 13:50

1 Answers1

1

While reviewing the comparison in here: Comparing Windows Azure Table Storage and Amazon DynamoDB, I asked myself what exactly are you trying to abstract.
You need to ask yourself that, then present the trade offs you picked when creating the classes and restraints in order for the community to have a good sense of what are you trying to achieve and hopefully help you perfect it.
Having said that and from the top of my head I'll raise a few questions you should figure out:
1. How are you going to force the difference in object sizes? (1MB / 64KB)
2. How are you going to abstract DynamoDB's provisioned throughput?
3. How are you going to force the 256 attribute limit Azure Table Storage have?

Good luck

Chen Harel
  • 9,684
  • 5
  • 44
  • 58
  • Ideally, I'd like to be able to deploy to Azure or Amazon EC2 without having to re-factor any code. My employer will be more likely to accept a solution where we're not locked into a specific vendor. – Tim May 09 '12 at 14:44
  • In my mind projects that use DynamoDB need a lot of Application code to use it efficiently.. the abstraction in the DB layer seems a bit redundant – Chen Harel May 09 '12 at 17:37