Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking to Contribute #8

Open
cScarlson opened this issue Apr 18, 2013 · 1 comment
Open

Looking to Contribute #8

cScarlson opened this issue Apr 18, 2013 · 1 comment

Comments

@cScarlson
Copy link

Hey truedat101,

Wanted to say keep up the good work - looks like its starting to come together nicely.

I wanted to formally let you know I plan to contribute, as I have some ideas that you may like. However, I'm still taking baby steps in CCNx and was hoping you could shed some insight.

As I said, I'm still warming up to the CCNx basics, so understanding these is essential. I have searched high and low to find out what the process for turning a Name-string into a CCNb-compatible format. My question is, if I have the Interest "ccnx:/PARC/readMe" - how do I prepare it to go over the wire via TCP? I just want to ping the CCNd and get a response of ANY kind.

Example:

  1. Take the ccnx Name (var name = 'ccnx:/PARC/readMe';), and split() on slash '/'.
  2. base64Encode name: name[1] = base64Encode(name[1]); name[2] = base64Encode(name[2]);
  3. Pack prefixes into XML: <...><...><component ...>name[1]...</...>
  4. XML to hex: var Interest = new hex(XML);
  5. Create buffer: var buf = new Buffer(16).fill(0);
  6. Write to buffer: buf.write(XML);
  7. Send to CCNd: tcp.write(buf);

As you can see, I'm in the weeds here, so ANY insight is greatly appreciated.

Much Appreciation,

Cody

@truedat101
Copy link
Owner

Hi @cScarlson ! I'm flattered anyone is interested in this little project. I think you've hit the nail on the head. There are a bunch of things that aren't clear from a read of the Jacobson paper (around implementation) and reviewing the CCNx source which make adapting language binding to a new language tricky, and make migration to a new platform a bit of a challenge.

In CCN C code, this is a matter of creating an interest (as far as your questions). I'd suggest experimenting first with the basic utilities in the CCNx release (like ccnput, ccncat and ccnget). The source is there and you can start to get a feeling for how to use the utilities. You greater question is about the packet format. Rather than reinvent the over-the wire format in Javascript, I think the first goal I had was in the server portion of CCN4BNode api set to wrap the encoding of this data to send over the wire to a CCNd. From the client side I think there needs to be a definition of the common set of JS libs needed to support a solid CCNx client. These same libraries can end up getting re-used for different use cases, either for in the browser, for in a server side context, or possibly inside of a browser plugin.

I thought it might be useful to have a ccn4b client library to handle the backandforth translation of the stream data from its raw format into the XML encoding and then the ccnb format. That said, there are some fundamental architectural differences in the JS VM sandbox security model vs. what one can do from a rich client platform, like opening direct TCP sockets or sending UDP datagrams. I think we can achieve quite a bit piggy backing on the work down around Web Sockets (which I currently think to implement over SocketIO).

I'm happy to have any help and where ever your expertise may lie. Once complexity I've created here is that there are a bunch of projects here:
ccn4b
ccn4bnode
ccn4bname.js

I envision there being some general ccn JS libs that would be geared towards client library usage or shared across client or server side. And there would be some node.js specific pieces that support this particular implementation.

Feel free to fork, and jump in and create issues in the issue tracker so we can map out the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants