Vearol / TalTech-Network-Protocol

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

How to add new nodes? #45

Open 1n4r1 opened 5 years ago

1n4r1 commented 5 years ago

To add initial neighbor, we can configure like this

INIT_NODES = {
        "nodeself": ["127.0.0.1", 8080, "sample_nickname"]
        “newnode”: [“192.168.11.1”, 8080, “nickname_for_newnode”]
}

This is the format of each neighbor info

"GPG key": ["ip", port, "nickname"]
1n4r1 commented 5 years ago

Currently, we have 2 data structure for nodes.

  1. "routing table"
  2. contact info above

At first, we have a situation that "we have contact info but don't have routing table" By looking at contact info, we have to find our neighbor and send "full table request" this is what I expected.

1n4r1 commented 5 years ago

What we have to care of is that

for getting routing info (not identity), we have to use 8 bytes dest id.
Vearol commented 5 years ago

why GPG key for our server is 'nodeself', and not the value of SEVER_KEY constant?