Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualise operations #17

Open
harnen opened this issue Oct 6, 2022 · 0 comments
Open

Visualise operations #17

harnen opened this issue Oct 6, 2022 · 0 comments
Assignees

Comments

@harnen
Copy link
Collaborator

harnen commented Oct 6, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants