Skip to content

Alternative graph implementations built on the Azure CosmosDB SQL API, Java, Spring Boot, and Spring Data

License

Notifications You must be signed in to change notification settings

cjoakim/azure-cosmosdb-altgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AltGraph is a set of reference applications that demonstrate how to build “graph applications” with Cosmos DB for NoSQL and leverage its’ features to achieve a performant, integrated, and low-cost solutions. It currently demonstrates two different graph use-cases, with two different implementations.

Currently, AltGraph is built with the Java programming language, and the Spring Boot and Spring Data frameworks. D3.js is used in the Web UI for visualizations, but you can use any similar JavaScript library for your implementations. There is also an implementation in C# in the dotnet directory.

At this time, there are two designs and implementations for your reference:

  • A version 1 design uses the concept of "RDF Triples" to implement a Bill-of-Materials graph using NPM data (the Node Package Manager tool in the Node.js ecosystem). The graph of dependencies for a library can be seen as a bill-of-materials.

  • A version 2 design featuring more in-memory functionality and the JGraphT software library. This implementation used the IMDb (Internet Movie Database) dataset as a very rich social-network. The large downloadable IMDb datasets encourage the exploration of "the six degrees of Kevin Bacon". The wrangled AltGraph IMDb data contains over 1-million vertices and 3.9 million edges, all stored in-memory in the JVM (Java Virtual Machine) with JGraphT.

These implementations may be used as-is, or as a starting point for your own implementations. Both are designed to showcase the power and efficiency of the Cosmos DB NoSQL API for graph solutions.


Example NPM Graph

This example shows a graph of the dependencies for the NPM "tedious" library.


Example IMDb Graph

This example shows "one-degree of Kevin Bacon".


Directory Structure of this Repository

├── altgraph_data_app       A Java Spring CommandLineRunner (console) application
└── altgraph_web_app        A Java Spring Web application, see docker-compose.yml
├── az                      az CLI scripts to deploy AltGraph as an Azure Container Instance
├── CosmosDB-AltGraph.pdf   Presentation PDF

Please read the CosmosDB-AltGraph.pdf document as you first start to explore AltGraph.

Links

Primary Developer

Chris Joakim, Microsoft, Cosmos DB Global Black Belt (GBB)

C# implementation

Jordan Bean, Microsoft

About

Alternative graph implementations built on the Azure CosmosDB SQL API, Java, Spring Boot, and Spring Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published