[Ndn-lib] node-browserify

Burke, Jeff jburke at remap.ucla.edu
Thu Jan 23 21:47:10 PST 2014

Hi Ryan,

Thanks for the email!  We’ll take a look at all of your new work.

Note that we discovered that the way our code (and browserify) handles wrapping the buffer slows things down in the browser significantly, so we are working on an alternative that maintains performance in both use cases.


From: Ryan Bennett <nomad.ry at gmail.com<mailto:nomad.ry at gmail.com>>
Date: Thu, 23 Jan 2014 13:20:11 -0700
To: <Ndn-lib at lists.cs.ucla.edu<mailto:Ndn-lib at lists.cs.ucla.edu>>
Subject: [Ndn-lib] node-browserify

Hey Guys,

Had to start a new thread since I wasn't a member of the mailing list when this went out, but I have some thoughts on NDN-js + browserify:

Browserify is indeed handy, though there are a few extra caveats regarding using it with NDN-js:

-If browserify detects use of the "Buffer" object, it pulls in a 'browserify-buffer' module, which breaks our custom buffer class.

-bundling a bundle (ie, compiling ndn-js with browserify, and then including the bundle via browserify in a project) creates a bit of a mess.

I've taken this into account and shimmed NDN-js into a browser ready npm module (https://npmjs.org/package/ndn-browser-shim). If you're interested in the steps from current library to this module, I've got an overview at http://rosewiki.org/view/ndn-browser-shim and you can check out my fork of ndn-js at https://github.com/rynomad/ndn-js

Apologies for not keeping the list apprised of my status on this; wasn't sure anyone would be interested... I've been using this shim to build NDN-BrowserKit (https://github.com/rynomad/NDN-BrowserKit) quick overview of that projects goals for anyone interested:

-One time Key + cert generation saved in browser local storage

-WebRTC signaling over NDN resulting in datachannel based Face transport (only works in the latest chrome release with SCTP datachannels for binary data)

-NDN database in indexedDB (works in newer FF + chrome, but currently has significant memory leaks)

-Basic forwarding (expanded from forwarder.jsm in main ndn-js repo). currently tested up to 4 hops (5 browser tabs interfaced over WebRTC)

-Daemonize in a webworker to avoid blocking the UI thread with large load (not yet started)

-ndndc style prefix registration/interface setup API (add and destroyface loosely implimented)

-In-memory LRU/Staleness-aware cache (currently only doing exact matches and ejecting stale content rather than simply marking)

-ndn.io<http://ndn.io/> object for segmentation and reassembly of JSON and BLOBs, basic pipelining for fetching multi-segment objects. (works but could probably use some cleanup)

_______________________________________________ Ndn-lib mailing list Ndn-lib at lists.cs.ucla.edu<mailto:Ndn-lib at lists.cs.ucla.edu> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-lib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-lib/attachments/20140124/1ca56229/attachment.html>

More information about the Ndn-lib mailing list