Complete routing part until 22(Mon)
1n4r1 opened this issue · 4 comments
1n4r1 commented
Let's specify and agree on what is "Routing part"
Vearol commented
As I see it - we need a routing table, which is a graph with ford-bellmann to tell the best path
- Implement Ford-Bellmann with weighted graph, aka Google it and paste the code
- Implement functions for returning {name, ip, port}, with given destination id(GPG key)
- Implement function for updating table
- Implement funtions for importing table into JSON and for sending
1n4r1 commented
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
- broadcast full table request for all neighbors at first (if we couldn' receive anything, try again)
- function to receive all responses
- function to parse the packets. retrieve data from packets as JSON format. (I'll post the format after this post)
- function to parse json and save as dict
- function to parse dictionary and change to JSON
- 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
- 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
1n4r1 commented
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