Vearol / TalTech-Network-Protocol

A team project for Network Protocol class
0 stars 0 forks source link

Complete routing part until 22(Mon) #6

Open 1n4r1 opened 5 years ago

1n4r1 commented 5 years ago

Let's specify and agree on what is "Routing part"

Vearol commented 5 years ago

As I see it - we need a routing table, which is a graph with ford-bellmann to tell the best path

  1. Implement Ford-Bellmann with weighted graph, aka Google it and paste the code
  2. Implement functions for returning {name, ip, port}, with given destination id(GPG key)
  3. Implement function for updating table
  4. Implement funtions for importing table into JSON and for sending
1n4r1 commented 5 years ago

Actually. this does not have to be a graph. if we have info of a number of node, path and distance, its enough.

After connected to the network, we need following procedures to get info of neighbors

  1. broadcast full table request for all neighbors at first (if we couldn' receive anything, try again)
  2. function to receive all responses
  3. function to parse the packets. retrieve data from packets as JSON format. (I'll post the format after this post)
  4. function to parse json and save as dict
  5. function to parse dictionary and change to JSON
  6. implement functions to determine shortest"gpgkey, ip, port"
    • if we wanna achieve port num, probably we need to confirm the implementation of other team. Unfortunately, we(all team) never agreed on port num and API to get port of other nodes
  7. implement function to send following packets for administration (depends on the implementation of other team)
    • request full table for 1 node
    • respond full table for 1 node
    • notification of update for all neighbors
    • keepalive for all neighbors
    • request identiy
    • respond identiy
    • normal text for 1 neighbors still missing some but probably like this for this week. if anything point out, please reply
1n4r1 commented 5 years ago

Untitled Diagram

1n4r1 commented 5 years ago

In this situation, for the full table request of A, B should reply following JSON

nodes = 
{"A": ["B","C"],
 "B": ["A", "B", "D"],
 "C": ["A", "D"],
 "D": ["B", "E"],
 "E": ["B"]
}

for binding neighbor id and IP address, we can have another dictinoary

neighbors = {
"B": "xxx.xxx.xxx.xxx",
"C": "yyy.yyy.yyy.yyy"
}               

this is because we don't need IP/ports of other nodes which are not neighbors Anyway, at least we have to agree on this in our team This also I expect some other opinions, so if something is wrong, tell me