<div dir="ltr">Thanks a lot! </div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 10, 2016 at 11:41 AM Sylvain Afchain <<a href="mailto:safchain@redhat.com">safchain@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="gmail_msg">
<br class="gmail_msg">
Yes Github issue is the right place to discuss implementation. I confirmed that we agreed adding counter on interfaces metadata but need to elaborate a bit :)<br class="gmail_msg">
<br class="gmail_msg">
For the Gremlin sutff :<br class="gmail_msg">
<br class="gmail_msg">
The "Skydive" Gremlin language is implemented in two packages : topology/graph/traversal and flow/traversal. flow/traversal register extra steps.<br class="gmail_msg">
<br class="gmail_msg">
For the step sum it should be implemented like the other flow extensions. Please take a look at the NewFlowTraversalExtension, ScanIdent, ParseStep in the flow/traversal/traversal.go. You can have a look at the step `Hops`, `Nodes` as examples. Each step has to implement the interface GremlinTraversalStep defined in topology/graph/traversal/traversal_parser.go<br class="gmail_msg">
<br class="gmail_msg">
About the aggregation on the WebUI side, with not but I would prefer to have a gremlin implementation too in order to have the feature exposed by the API.<br class="gmail_msg">
<br class="gmail_msg">
About the offloading, we could take the same approach that we took for the sort step.<br class="gmail_msg">
<br class="gmail_msg">
For the sort step there are currently two possible call path :<br class="gmail_msg">
<br class="gmail_msg">
- Time context (step context), request to the datastore, so the datastore does the job not Skydive<br class="gmail_msg">
- No Time context(live flows), sort done by agent then merge sort by the analyzer, so a part of the process is distributed.<br class="gmail_msg">
<br class="gmail_msg">
Regards,<br class="gmail_msg">
Sylvain<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
----- Original Message -----<br class="gmail_msg">
> Hi kostya.<br class="gmail_msg">
><br class="gmail_msg">
> I'm still interested in this topic. Let's discuss implementations details<br class="gmail_msg">
> on the github issue, But AFAIR, we agreed with safchain that we could rely<br class="gmail_msg">
> on third party go lib that polls counter interfaces :<br class="gmail_msg">
><br class="gmail_msg">
> <a href="https://github.com/shirou/gopsutil/tree/master/net" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/shirou/gopsutil/tree/master/net</a><br class="gmail_msg">
><br class="gmail_msg">
> And add interesting data to node's metadata.<br class="gmail_msg">
><br class="gmail_msg">
> Mat<br class="gmail_msg">
><br class="gmail_msg">
> On Wed, Nov 9, 2016 at 5:18 PM, Kostya <<a href="mailto:konstantin.dorfman@gmail.com" class="gmail_msg" target="_blank">konstantin.dorfman@gmail.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> > Hello Mathieu,<br class="gmail_msg">
> > Do you want to discuss design/implementation ideas on<br class="gmail_msg">
> > <a href="https://github.com/skydive-project/skydive/issues/109" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/skydive-project/skydive/issues/109</a> ? This will be very<br class="gmail_msg">
> > helpful for me.<br class="gmail_msg">
> ><br class="gmail_msg">
> > We need some general API to get/calculate bandwidth of the edge, it could<br class="gmail_msg">
> > be implemented as sum of every flow's ABbytes for specific node (if<br class="gmail_msg">
> > capture is active on it), otherwise it could be interface stats as we can<br class="gmail_msg">
> > get from OS (ifconfig stats).<br class="gmail_msg">
> ><br class="gmail_msg">
> > Syvain, can you guide me a little about Gremlin module?<br class="gmail_msg">
> ><br class="gmail_msg">
> > >We are going to add a `sum` step to the gremlin language for that and we<br class="gmail_msg">
> > could display the result in the >WebUI when pointing edges<br class="gmail_msg">
> ><br class="gmail_msg">
> > so, Gremlin request going through "api/topology" to Analyzer; it does<br class="gmail_msg">
> > general logic of Metric aggregation/sum: returns back synthetic data<br class="gmail_msg">
> > `flow` containing the result?<br class="gmail_msg">
> ><br class="gmail_msg">
> > Why it is better than to get all flows stored currently in the Vertex and<br class="gmail_msg">
> > compute aggregation on webUI side? It might be better to offload<br class="gmail_msg">
> > computation from Analyzer (better for scaling).<br class="gmail_msg">
> ><br class="gmail_msg">
> > Thanks, Kostya<br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> > On Wed, Nov 2, 2016 at 3:35 PM Sylvain Afchain <<a href="mailto:safchain@redhat.com" class="gmail_msg" target="_blank">safchain@redhat.com</a>><br class="gmail_msg">
> > wrote:<br class="gmail_msg">
> ><br class="gmail_msg">
> >> Hello,<br class="gmail_msg">
> >><br class="gmail_msg">
> >> So there is already a way to retrieve metrics thanks to the WebUI, not on<br class="gmail_msg">
> >> edge but on node where the captures occur. There is an on going work to be<br class="gmail_msg">
> >> able to aggregate metrics from multiple capture so that we could get the<br class="gmail_msg">
> >> bandwidth on a link. We are going to add a `sum` step to the gremlin<br class="gmail_msg">
> >> language for that and we could display the result in the WebUI when<br class="gmail_msg">
> >> pointing edges ?<br class="gmail_msg">
> >><br class="gmail_msg">
> >> But here I'm talking about flow capture not interface metrics. There is a<br class="gmail_msg">
> >> opened issue[1] to bring interface metrics to the graph and I know that<br class="gmail_msg">
> >> Mathieu wanted to work on this. What we could do is to store interface<br class="gmail_msg">
> >> metrics as node metadata ?<br class="gmail_msg">
> >><br class="gmail_msg">
> >> About the WebUI and updates :<br class="gmail_msg">
> >><br class="gmail_msg">
> >> The webui is listening graph events thanks to a websocket connection.<br class="gmail_msg">
> >> Each time there is a modification of the graph on the analyzer side, an<br class="gmail_msg">
> >> event for the change is sent to all the websocket clients so to the webui.<br class="gmail_msg">
> >> And as you said the event message are consumed by ProcessGraphMessage.<br class="gmail_msg">
> >><br class="gmail_msg">
> >> Sylvain<br class="gmail_msg">
> >><br class="gmail_msg">
> >> [1] <a href="https://github.com/skydive-project/skydive/issues/109" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/skydive-project/skydive/issues/109</a><br class="gmail_msg">
> >><br class="gmail_msg">
> >> ----- Original Message -----<br class="gmail_msg">
> >> > Hello,<br class="gmail_msg">
> >> > I'm thinking about adding some metadata on webUI edges along active<br class="gmail_msg">
> >> capture<br class="gmail_msg">
> >> > - bandwidth, so one can understand traffic on the given topology.<br class="gmail_msg">
> >> > As I see this task can be divided into the following:<br class="gmail_msg">
> >> > 1. Add bandwidth metadata to the Edge<br class="gmail_msg">
> >> > 2. When webUI gets "NewEdge" оr "NewUpdate" message in<br class="gmail_msg">
> >> > ProcessGraphMessage() function, need to draw this bandwidth info on the<br class="gmail_msg">
> >> > edge of the graph representation.<br class="gmail_msg">
> >> > 3. Adding new or modifying existing probe in order it will be able to<br class="gmail_msg">
> >> > generate/compute bandwidth data and supply it to the Agent graph.<br class="gmail_msg">
> >> ><br class="gmail_msg">
> >> > So, what do you think about the idea? Where should I start with adding<br class="gmail_msg">
> >> such<br class="gmail_msg">
> >> > info?<br class="gmail_msg">
> >> ><br class="gmail_msg">
> >> > I suppose we can store the bandwidth info as metadata in these:<br class="gmail_msg">
> >> > 1) type graphElement struct {<br class="gmail_msg">
> >> > ID Identifier<br class="gmail_msg">
> >> > metadata Metadata<br class="gmail_msg">
> >> > host string<br class="gmail_msg">
> >> > }<br class="gmail_msg">
> >> > 3) type Edge struct {<br class="gmail_msg">
> >> > graphElement<br class="gmail_msg">
> >> > parent Identifier<br class="gmail_msg">
> >> > child Identifier<br class="gmail_msg">
> >> > }<br class="gmail_msg">
> >> > 3) type MemoryBackendEdge struct {<br class="gmail_msg">
> >> > *Edge<br class="gmail_msg">
> >> > }<br class="gmail_msg">
> >> ><br class="gmail_msg">
> >> > Another, more general question: can you please describe in two words,<br class="gmail_msg">
> >> what<br class="gmail_msg">
> >> > is data flow from in memory graph of Analyzer to webUI:<br class="gmail_msg">
> >> > - how update of webUI started<br class="gmail_msg">
> >> > - when it is updated (on changes, periodically)<br class="gmail_msg">
> >> ><br class="gmail_msg">
> >> > And what flows should I look into to understand and to start playing<br class="gmail_msg">
> >> with<br class="gmail_msg">
> >> > adding additional metadata described above?<br class="gmail_msg">
> >> ><br class="gmail_msg">
> >> > Thanks,<br class="gmail_msg">
> >> > Kostya<br class="gmail_msg">
> >> ><br class="gmail_msg">
> >><br class="gmail_msg">
> ><br class="gmail_msg">
><br class="gmail_msg">
</blockquote></div>