Using Gremlin.NET and Azure Cosmos DB for code analysis
summary
A .NET code-analysis tool now persists a property-graph model of assemblies into Azure Cosmos DB using Gremlin.NET, replacing fragile string queries with a bytecode-based requests workflow by implementing a CosmosDBRemoteConnection that translates bytecode to script and deserializes vertices, edges, paths and valueMaps. Cosmos DB supports Gremlin.NET 3.5 (not 3.6), Gremlin.Net extensions are stale, and the pipeline already answers queries like classes with >30 incoming accessedBy edges to reveal a single highly coupled class; work in progress but end-to-end persists and queries code graphs.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 2:00Motivation
- 3:40Persistence
- 6:17Property Graph
- 7:34Code Model
- 9:14Libraries
- 10:22Cosmos DB Connection
- 12:45Submitting the query
- 13:43Drawbacks
- 15:03GremlinNET Extensions
- 15:39bytecode based request approach
- 17:39what now
- 18:05example
- 19:07driver remote connection
- 19:50driver remote connection interface
- 20:49Groovy translator
- 21:47Deserialize vertices
- 22:12Analyzing NET assemblies
- 22:31Querying data
- 23:18Visualization
- 24:19Conclusion
related talks
57mGraphing Your Way Through the Cosmos: Common Data Problems Solved with Graphs
45mGetting the Most from NoSQL in the Cloud with Azure Cosmos DB
54mSay Yes to NoSQL for the .NET SQL Developer
01h 01mFrom SQL to Azure Cosmos DB
14mUse EF Core to transition from SQL Server to Azure Cosmos DB
10mWhat’s new for developers in Azure Cosmos DB
01h 13mBuilding Planet Scale .NET Apps with Azure Cosmos DB
47mWorking with data using Azure Functions
