From 7d8b6a6fca0ceea0a7a6fd2d5e70d318a182c6c1 Mon Sep 17 00:00:00 2001
From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk>
Date: Fri, 9 Aug 2019 12:14:37 +0100
Subject: [PATCH] Extends clmc dev guide with info on graph api

---
 docs/clmc-development-guide.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/docs/clmc-development-guide.md b/docs/clmc-development-guide.md
index 28b2a25..ae70f33 100644
--- a/docs/clmc-development-guide.md
+++ b/docs/clmc-development-guide.md
@@ -375,6 +375,19 @@ All tests are implemented using *Python* and *Pytest*. The integration tests (lo
 lxc exec test-runner -- pytest -s --tb=short -rfp --pyargs /opt/clmc/src/test/clmctest
 ```
 
+#### Implementation details of the Graph API
+
+The Graph API includes a number of interfaces for managing a graph representing a given service function chain, a.k.a. a media service. This includes endpoints for creating and deleting various parts of the graph as well as running data queries, e.g. round trip time query. Ultimately, we use these to perform graph-based monitoring which includes the following steps:
+
+1) convert from time-series data to graph nodes and relationships
+2) build a temporal graph, that is a graph which represents the status of the media service in a given time range
+3) query the temporal graph for round-trip time measurements
+4) save the new measurements into InfluxDB
+5) delete the temporal graph
+6) repeat after a user-defined time period, e.g. 30 seconds
+
+All of this is automated in what is called the graph pipeline bash script located at **scripts/clmc-service/graph-pipeline.sh**. Whenever graph-based monitoring is requested through the CLMC service API, this script is ran in the background in a child process (the CLMC application server is the parent process). The graph API allows certain level of control operations over this process - start, stop and fetch status.
+
 #### Implementation details of the Alerts API
 
 The Alerts API is implemented on top of the Kapacitor HTTP API and includes the following main parts:
-- 
GitLab