Skip to content

Visualise operations #17

Description

@harnen

It'd be great to be able to visualise each DHT operation to see which nodes where involved. It could look something like this:
image
So that the green node is the one initiating the operation and the orange nodes are those receiving messages from the green node. It'd be great to have the order in which the nodes received messages (see the numbers inside the nodes above).

This visualisation should work as a stand-alone Python script that takes two arguments: log_folder and operation_id
The code should:

  1. go to log_folder
  2. open msg.csv and operation.csv (their content is described below)
  3. find the operation_id in operation.csv and read the IDs of messages being part of this operation
  4. find all the messages (as indicated by their IDs) msg.csv
  5. for each message, get the timestamp (for ordering) and its recipient (node ID)
  6. Plot all the nodes involved with appropriate colouring. Probably we want to plot uniquely nodes involved in the operation (plotting all the nodes would make the graph unreadable). The positioning of the nodes on the graph depends on their ID (to be read from the CSV file). Here we implemented something very similar in Java. The only difference was that we were plotting nodes on a circle, while here - it should be a line.

msg.csv format

dst,src,id,type,status
1162108940544403440407323680711908192418011416041,1294132996371968615893927407296059812556716358774,3640,MSG_FIND,received
582504333628133905589894181758786484624509529280,517092521273911443780583962535602246248585563897,2306,MSG_RESPONSE,received
1173766384250104915679484402433318358433920669974,1340436185847765078409504697114401727993936585960,3638,MSG_RESPONSE,received
548323660530707593354023005309674150079209149607,460500804558408130176867309598886923912236022200,2305,MSG_RESPONSE,received
1162108940544403440407323680711908192418011416041,1257060909721786674278947997860434271040184211092,3639,MSG_RESPONSE,received
582504333628133905589894181758786484624509529280,377581293506465762593726960224799368423707233727,2304,MSG_FIND,receive

operations.csv format

src,id,type,messages
1294132996371968615893927407296059812556716358774,2,OP_FIND,3640|2306|3638

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions