<div dir="ltr"><div dir="ltr">Dear Junxiao,<div>Your previous post made me understand why we need to write a golang library from scratch (i.e. Originally in golang). While I was originally planning to write one myself, as per my cursory look, it seems you have already developed a library yourself "<a href="https://github.com/usnistgov/ndn-dpdk/tree/master/ndn">https://github.com/usnistgov/ndn-dpdk/tree/master/ndn</a>".</div><div><br></div><div>However, in your email, you gave strong reasoning why an ndn library should be developed using native go, while in your contribution, you used cgo unsafe pointer in several places. Is there any particular reasoning for this? Is there some pitfall to attempting a pure go library? I am asking these from the perspective of genuine curiosity about your design choices.</div><div><br></div><div>As a part of a project, I intend to make a comparative evaluation of different NDN libraries (C++, Python, Golang etc.). If I intend to do something like this, would you say the golang library developed by you is mature enough for such a comparison?</div><div><br></div><div>Best Regards</div><div>Rafee</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 20, 2020 at 11:46 PM Mohammad Ishfaque Jahan Rafee <<a href="mailto:mij.rafee.1344@gmail.com">mij.rafee.1344@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you for your explanation. I understand my error now.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 20, 2020 at 7:35 PM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Rafee</div><div><br></div><div>NDN refers to a protocol, not a software.</div><div>NDN protocol has multiple implementations, such as NDNts, python-ndn, and NDN-Lite. These implementations have independent codebase, and are not bindings of one another.</div><div><br></div><div>While one could create a Go library as a binding of a C library (the only choice is NDN-Lite) using cgo, it may not be desirable.</div><div>From a Go programmer's point of view, such a binding library lacks several important benefits that a pure Go library would have:</div><div><ul><li>No memory safety.</li><li>Not scalable (due to the data structure design of NDN-Lite).</li><li>Insecure, because crypto occurs in C, not the robust Go crypto libraries.</li><li>APIs would feel like C, not Go.</li><li>Cannot cross compile by specifying GOOS and GOARCH environment variables.</li></ul></div><div><br></div><div>A decent Go library has to start from scratch, not as a binding of NDN-Lite.</div><div>Then, it would be go-gettable, and feel natural to Go programmers.</div><div><br></div><div>Yours, Junxiao</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 20, 2020 at 6:35 PM Mohammad Ishfaque Jahan Rafee <<a href="mailto:mij.rafee.1344@gmail.com" target="_blank">mij.rafee.1344@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Junxiao,<div>NDN-Go doesn't meet the requirements, but NDN itself does, isn't it? The way I see it, NDN-Go or python-ndn is binding for the underlying NDN project. I am not talking about rewriting the whole NDN in Go, which the previous maintainer did. However, if it's binding to the existing well-established project, such as NDN, then it starts to make more sense.</div><div><br></div><div>And yes, this initiative is very similar to GSoC.</div></div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><br></div></div></div></div></div>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div>Best Regards</div><div>Rafee</div><div><a href="http://www.mohammadrafee.com" target="_blank">www.mohammadrafee.com</a><br></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Best Regards</div><div>Rafee</div><div><a href="http://www.mohammadrafee.com" target="_blank">www.mohammadrafee.com</a><br></div></div></div></div></div>