<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello everyone.
    <div class="moz-forward-container">
      <p><br>
      </p>
      <p>Sorry in advance if this has been discussed elsewhere, or if I
        am overlooking something! I am currently working on a project
        using NDN and have encountered a problem with interests not
        being aggregated as I thought they would be. To highlight the
        issue consider the following case:</p>
      <p>                ---- B<br>
      </p>
      <p>            /<br>
      </p>
      <p>G --- E<br>
      </p>
      <p>            \</p>
      <p>                ---- A</p>
      <p>In this example, G is the producer of some data under <i>/test/g</i>,
        A and B are consumers interested in the data G produces and E is
        an intermediate router connecting G to A/B. Each of these nodes
        are running in a docker container on the same machine and I set
        up the faces and routes before hand using <i>nfdc</i> in the
        following manner:</p>
      <p>- On <b>nodeA</b>: <i>nfdc face create udp://nodee.com; nfdc
          route add /test/g <face_id_of_e></i></p>
      <p><i>- </i><i>On <b>node</b><b>B</b>: </i><i>nfdc face create
          udp://nodee.com; nfdc route add /test/g <face_id_of_e></i></p>
      <p><i>- </i><i>On <b>nodeE</b>: </i><i><i>nfdc face create
            udp://nodeg.com; nfdc route add /test/g <face_id_of_g></i></i></p>
      <p>Note I don't make faces / routes in the direction of the
        dataflow (i.e. there is no premade face/route from E --> A)
        as I don't think they are needed. Also these host names resolve
        correctly through the use of an overlay network in docker. <br>
      </p>
      <p><i><i><br>
          </i></i></p>
      <p>Node G also runs NFD and a jNDN app which registers the prefix
        <i>/test/g </i>and I can control when to call <i>face.processEvents()
        </i>using a key stroke, so that I can control when things
        happen. <br>
      </p>
      <p><br>
      </p>
      <p>I then ran this test with NFD's <i>Forwarder</i> and <i>ContentStore</i>
        modules set to a log level of DEBUG so I could see what was
        going on:</p>
      <p><br>
      </p>
      <p>- On <b>node A</b>: <i>ndnpeek /test/g/0 -l 1000000 <br>
        </i></p>
      <p><i>    - </i>This expresses an interest for <i>/test/g/0</i>
        with a long timeout for those who might not be familiar<br>
      </p>
      <p><i>    - </i>This reaches node E who creates a PIT entry and
        forwards it to node G as expected</p>
      <p>    - This then reaches node G who's NFD forwards it on to the
        jNDN app for handling</p>
      <p>        - However the app does <b>not</b> respond with the
        Data or even see the Interest yet, as I will manually call <i>face.processEvents()</i>
        with a key stroke<i> later<br>
        </i></p>
      <p><i><br>
        </i></p>
      <p><i>- </i>On <b>node B</b>: <i>ndnpeek /test/g/0 -l 1000000</i></p>
      <p>    - This again reaches node E <br>
      </p>
      <p>    - Node E does <b>not</b> create a <b>new </b>PIT entry
        (or at least the <i>nPitEntries</i> from the output of <i>nfdc
          status</i> doesn't change), but presumably adds node B's face
        to the existing entry.</p>
      <p>    - <b>However, node E then forwards a <u>second</u>
          Interest to G with the same name of <i>/test/g/0</i></b></p>
      <p><b>       </b>- This second interest reaches node G's NFD who
        proceeds to forward the second interest to the jNDN app.</p>
          - This is the behavior I wasn't expecting!<br>
      <p><br>
      </p>
      <p>- On <b>node G</b>: I finally call <i>face.processEvents()</i><br>
      </p>
      <p>    - Node G then sees the <b>two</b> Interests (which have
        the <b>exact same name</b>) and responds to them with the
        appropriate Data</p>
      <p>    - Whichever Data packet reaches node G's NFD first is then
        forwarded to node E and onto nodes A and B</p>
      <p>    - The Data packet that reaches node G's NFD second is then
        marked as unsolicited and dropped by the NFD</p>
      <p><br>
      </p>
      <p>Is this intended behavior or have I set something up wrong? The
        packet produced by G is multicasted back to both A and B through
        E indicating that the PIT entries are correct, but it seems odd
        that the application level producer at node G must see both of
        these interests? For context I am currently prototyping a small
        P2P multiplayer game that runs over NDN, meaning Interest
        aggregation could save producers a lot of cycles and network
        traffic. <br>
      </p>
      <p>The logs produced by the NFDs at each of the nodes are
        available at <a moz-do-not-send="true"
          href="https://github.com/stefano-lupo/NFD-Interest-Aggregation-Logs">this
          repo</a> if anyone would like to take a look - I included
        copies which have only (what I think is) the relevant
        information and some comments on what happens.</p>
      <p><br>
      </p>
      <p>Thanks in advance for any information.</p>
      <p>Stefano<br>
      </p>
    </div>
  </body>
</html>