Project Description
The Cloud Ninja Polyglot Persistence project is a sample that demonstrates the use of multiple and different types of repositories to persist application data.


This is a sample that utilizes multiple databases to persist application data. The solution is not a complete working ecommerce solution, and ecommerce is used as the basis for the sample to demonstrate key concepts to building solutions utilizing a polyglot persistence approach. This sample solution contains a web commerce site implemented as an ASP.NET 4.5 MVC4 ecommerce shopping site. The repositories are implemented in various languages using different database technologies, and by entirely different groups of developers.

Cannot resolve image macro, invalid image name or id.

Repository Services
  • Shopping Cart
  • Catalog
  • Recommendation
  • Orders
  • User Session

Database Technologies
  • Windows Azure Table Storage
  • Windows Azure SQL Database
  • MongoDB
  • Redis
  • CouchDB
  • Neo4J

Web Site

The ASP.NET web site that consumes the repository services and can be simply pointed at a different implementation of a service by configuring the web.config for the application and pointing it to an endpoint for an implementation that conforms to the documented REST interface. The sample ecommerce web application can be deployed to a windows azure web site or cloud service and simply needs to be configured to use the various deployed services.


A test project is used to ensure the REST interface for a service implementation conform to the REST interface specification.

Data Import Utility

This is a simple command line application that is used to import sample data in to the repositories. This can be used to import a sample product catalog for which data is defined in JSON files.

Repository Services

This is the interesting part. A number of implementations were created using different database technologies to explore the various benefits and challenges with the technologies as well as the general trade-offs with a polyglot persistence approach.

Service Implementations
  • Windows Azure Table Storage
  • Orders Windows Azure SQL Database
  • Catalog Service with .NET and MongoDB
  • Catalog Service with Erlang and CouchDB
  • Catalog Service with node.js and MongoDB
  • User Session Service with .NET and Windows Azure Table Storage
  • User Session Service with .NET and Redis
  • User Session Service with .NET and In Memory
  • Recommendation Service with .NET and Neo4J


Last edited Jul 16, 2013 at 10:36 PM by trentmswanson, version 11