Git Product home page Git Product logo

linq2dynamodb's Introduction

LINQ2DynamoDb

A type-safe data context for AWS DynamoDB with LINQ and in-memory caching support. Allows to combine DynamoDB's durability with cache speed and read consistency

Nuget:

PM> Install-Package Linq2DynamoDb.DataContext
PM> Install-Package Linq2DynamoDb.DataContext.Caching.MemcacheD
PM> Install-Package Linq2DynamoDb.DataContext.Caching.Redis
PM> Install-Package Linq2DynamoDb.AspNet.DataSource

Nuget

Please, also take a look at the series of posts (one, two, three, four).

AWS DynamoDB is a cool, highly-available and highly-durable NoSQL database. Yet, because of its throughput capacity restrictions, it might get:

  • unpredictably slow,
  • unpredictably expensive. AWS SDK for .Net (via its Amazon.DynamoDB.DataModel namespace) provides a cool type-safe way to store and retrieve .Net classes from/to DynamoDB. Yet:
  • it's still not very .Net-friendly and doesn't fit well with some other common data technologies on .Net platform like LINQ and data binding,
  • its objects cannot be directly cached in e.g. ElastiCache, because they're not serializable.

LINQ2DynamoDB tries to address all of those concerns.

Linq2DynamoDb.DataContext translates LINQ queries into corresponding DynamoDB Get/Query/Scan operations (trying to choose the most effective one) and stores query results in an in-memory cache (currently MemcacheD and Redis are supported). When data is modified, it's saved both to DynamoDB and to cache. This mitigates another issue of DynamoDB: inconsistent reads (Get/Query operations can be consistent for a double price, Scan operations cannot). If Linq2DynamoDb.DataContext succeeds to load the data from cache, that data will for sure be of the latest version.

A very common scenario for using DynamoDB is storing some kind of user profiles or other user-specific data in one big table with HashKey set to some UserID. Linq2DynamoDb.DataContext gracefully supports this case by allowing you to specify a predefined HashKey value for the entities. Then your DataContext instance represents (and correctly caches) a set of entities for a specific user (or whatever).

And now Linq2DynamoDb.DataContext also supports OData!

Currently, Linq2DynamoDb.DataContext is itself based on AWS SDK's Amazon.DynamoDBv2.DocumentModel namespace and uses Document's change-tracking mechanism. We'll try to slowly move away from it in future.

There're, of course, still many other things to do. They're now recorded as issues, so, please, vote for them (and add your own proposed tasks/features).

Bugs? Suggestions? Complaints? We'd love to hear them! Would like to contribute? You're welcome! Any other help? Greatly appreciated!

linq2dynamodb's People

Contributors

blakegordon avatar danieljurek avatar darkms avatar dguisinger avatar lcharold avatar lebowitz avatar scale-tone avatar sheastrickland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.