<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Alex, Wentao, and Tai-Lin,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thank you very much for the information.  </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">So as a conclusion, it is not suggested to automate linking go programs to ndn-cxx, because concurrency and memory management will be a problem for the application. (Btw, SWIG 3.0 supports generating C++ code wrappers now, not sure if writing swig binding is still a problem.) </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">It is more prefered to use and help maintain go-ndn to develop ndn applications. This project is currently maintained by Tai-Lin.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 23, 2017 at 12:31 AM, Tai-Lin Chu <span dir="ltr"><<a href="mailto:tailinchu@gmail.com" target="_blank">tailinchu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I am the maintainer of go-ndn. I agree with Alex that ndn-cxx does not<br>
work well with go runtime. The main problems are thread-safety and<br>
memory management.<br>
<br>
For the programming model, I don't think it is entirely incompatible;<br>
this is a problem of designing an interface. I think (correct me if I<br>
am wrong) that all supported ndn libraries are designed to be async<br>
because the programming language cannot efficiently map async nature<br>
of networking to higher level abstraction. go encourages writing<br>
blocking code, which can be easily made async later with goroutine. If<br>
you look into go-ndn/ndn, lowest-level is still async, but higher<br>
level abstraction (go-ndn/mux) is synchronous, and handles one<br>
interest in a goroutine like go http library.<br>
<br>
go-ndn/ndn library is still maintained (we are going to release go-ndn<br>
1.8 next week or so), and the api is more or less stable. I tried to<br>
keep this core library minimal, and the newer works are some higher<br>
level libraries that use it, like go-ndn/raft and go-ndn/mux. We and<br>
some other companies/organizations have been running this for a while<br>
now, so it should be good if you are trying to prototype some NDN<br>
applications in go for your hackathon. Ping me if you need to know<br>
more about mux and go-ndn/raft.<br>
<br>
If you are interested in go-ndn performance, you can also benchmark<br>
it, and hope you will find it quite "optimized" :)<br>
<br>
Thanks!<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Feb 22, 2017 at 8:02 PM, Lei Pi (lpi) <<a href="mailto:lpi@memphis.edu">lpi@memphis.edu</a>> wrote:<br>
> Hi everyone,<br>
><br>
> While thinking about proposals for the coming NDN Hackathon, I’m curious<br>
> about the possibilities to write NDN applications in golang.<br>
><br>
> There is a go-ndn project on github [1], which seems to be re-implementing<br>
> ndn in golang. But it is not officially supported or maintained.<br>
><br>
> Another option for using ndn in golang is to link the binary with the<br>
> libndncxx / libndncpp library. [2][3][4]<br>
><br>
> Does anyone already have experience in using SWIG to link golang programs<br>
> with libndncxx or libndncpp?<br>
><br>
> [1] <a href="https://github.com/go-ndn/ndn" rel="noreferrer" target="_blank">https://github.com/go-ndn/ndn</a><br>
> [2] <a href="https://golang.org/doc/faq#Do_Go_programs_link_with_Cpp_programs" rel="noreferrer" target="_blank">https://golang.org/doc/faq#Do_<wbr>Go_programs_link_with_Cpp_<wbr>programs</a><br>
> [3] <a href="https://golang.org/cmd/cgo/" rel="noreferrer" target="_blank">https://golang.org/cmd/cgo/</a><br>
> [4] <a href="http://www.swig.org/Doc3.0/Go.html" rel="noreferrer" target="_blank">http://www.swig.org/Doc3.0/Go.<wbr>html</a><br>
><br>
> Thank you.<br>
> ----<br>
> Regards,<br>
> Lei Pi<br>
> University of Memphis<br>
> Masters Student in Computer Science<br>
><br>
><br>
><br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> Ndn-interest mailing list<br>
> <a href="mailto:Ndn-interest@lists.cs.ucla.edu">Ndn-interest@lists.cs.ucla.edu</a><br>
> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndn-interest</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Lei </div></div></div></div></div>
</div>