go-ndn / nfd

NDN forwarder
GNU General Public License v2.0
6 stars 0 forks source link

Could I use the go nfd to develop a ndn testbed? #6

Open ychencode opened 7 years ago

ychencode commented 7 years ago

Hi there. I have six nodes and I want to use the six nodes to develop a go-ndn testbed. I have develop one node. On the node I can send interest and send data. But I want to make node1->node2->node3->node4->node5->node6 linked. I develop a publisher on the node1 and a consumer on node6. Could I use go-ndn nfd library achieve this goal? Thanks.

taylorchu commented 7 years ago

yes. For simplicity, go-nfd only listens for face creation. You will need to use "go-ndn/bridge" to connect two running go-nfd services.

The easiest way is to use docker-compose. We are going to release docker images for go-nfd and bridge later this month.

ychencode commented 7 years ago

That sounds very easy. Thank you. I will try to use it.

ychencode commented 7 years ago

Hi. I just try to link three node together. node1 as the publisher provided weather report service. node1 (10.3.200.26)started nfd and bridge process. At the node2(10.3.200.27) I configured the bridge.json liked following and started nfd and bridge process.

{
    "PrivateKeyPath" : "key/default.pri",
    "Local": {
        "Network": "tcp",
        "Address": ":6363",
    },
    "Remote": {
        "Network": "tcp",
        "Address": "10.3.200.26:6363",
    },
    "Cost": 30
}

At the node3(10.3.200.28) I also configured bridge.json like following and started nfd and bridge process.

{
    "PrivateKeyPath" : "key/default.pri",
    "Local": {
        "Network": "tcp",
        "Address": ":6363",
    },
    "Remote": {
        "Network": "tcp",
        "Address": "10.3.200.27:6363",
    },
    "Cost": 30
}

But when I start the publisher service at the node1. The subscriber can't get any response at the node3 but can at the node2. Why they linked together but can't get response at node3? And another question is the subscriber received old data. I guess it is due to the cache because I added some print in the mux.HandleFunc but it won't print every request. I want to ensure the latest data. What should I do? Thank you

taylorchu commented 7 years ago
  1. Bridge was originally designed to run like a directed tunnel. For example, to make node1 and node2 fully connected, you will need 2 bridge instances from 1 to 2 and 2 to 1. I am updating bridge today to support undirected mode and multiple tunnels.

  2. You need to specify MustBeFresh.

taylorchu commented 7 years ago

Here is the instruction on how you can build the testbed with docker-compose: https://hub.docker.com/r/gondn/bridge/.

ychencode commented 7 years ago

thank you