Open zjkmxy opened 10 months ago
Drop in some quick fix to the NDNts's "forwarder" so that it can surpress unsatisfied Interests
NDNts probably will never have a full featured forwarder as default, because it would significantly increase code size. I'd see whether I can provide hooks to customize certain parts of the forwarding logic.
Avoid Interests' being forwarded
NDNts can potentially offer an Interest forwarding filter option or FIB lookup hook. Sample API would look like one of these:
Forwarder.create({
canForwardInterest(inFace: FwFace, outFace: FwFace, pkt: FwPacket<Interest>): boolean {
return true;
},
});
Forwarder.create({
forwardInterest(inFace: FwFace, pkt: FwPacket<Interest>, lookupFIB: () => Iterable<FwFace>): Iterable<FwFace> {
return lookupFIB();
},
});
Let me know your thoughts.
Varun has implemented a face to support WebSocket broadcast: https://github.com/pulsejet/ndnts-ws
Browser side code copies each packet passing through the Forwarder
to the WebSocket server; it does not correctly handle non-encodable messages such as RejectInterest
and CancelInterest
.
I don't see how it's related to PeerJS or loop prevention.
Browser side code copies each packet passing through the
Forwarder
to the WebSocket server; it does not correctly handle non-encodable messages such asRejectInterest
andCancelInterest
. I don't see how it's related to PeerJS or loop prevention.
@pulsejet Sorry. I have not been working on this for a while and I'm not aware of current progress. Maybe Varun can give more details.
Yes I expect there to be issues. This is more of a quick hack to emulate a broadcast medium; probably much better ways to do this.
Compile an in-browser forwarder using WASM.
I'd consider this to be the ideal solution.
I'd consider this to be the ideal solution.
Now it is the time to pick up your old Rust NDN forwarder. (I'm joking)
No plan to fix this for now. Maybe related: there was a NDN microforwarder in browser: 2nd-ndn-hackathon/firefox-micro-forwarder Poster paper: https://conferences2.sigcomm.org/acm-icn/2016/proceedings/p201-shang.pdf
Current PeerJS transport does not work with more than 2 peers due to Interest loop. Actually, the
Forwarder
class of NDNts is not a real forwarder at all, but simply a demultiplexer.https://github.com/zjkmxy/ndn-workspace-solid/blob/dbb3c470b1fdc62c2a52a3cc78889a64686ebdd8/src/adaptors/peerjs-transport.ts#L8
To correctly use PeerJS transport without having Interest loop, we need to do one of the following:
Varun has implemented a face to support WebSocket broadcast: https://github.com/pulsejet/ndnts-ws It may also be ported.