[Mini-NDN] Beginners question: Mini-NDN applications & Python-NDN

Peter Kietzmann peter.kietzmann at haw-hamburg.de
Fri Jul 30 08:43:47 PDT 2021


Dear list, Lan, Xinyu Ma,

TL;DR:
does anyone have an example of how to run the python-NDN
producer/consumer example applications on multiple hosts started from
mini-NDN?

--

Many thanks for your guidance. I was able to move a bit forward (with
Philipps help), however, two questions remain open. Not sure which is
mini-NDN or python-NDN related.

Basically, I implement consumer/producer classes in
mini-NDN/examples/mnndn.py and start them separately (using AppManager)
on two different hosts in a three-node line topology. Internally, these
classes should call python-NDN/examples/consumer.py (and producer.py
respectively).

1. Calling the python script from the consumer class alike "python3
<path>/consumer.py" leads to:

"python3 /home/vagrant/python-ndn/examples/consumer.py" == Traceback
(most recent call last):
  File "/home/vagrant/python-ndn/examples/consumer.py", line 19, in <module>
    import ndn.utils
ModuleNotFoundError: No module named 'ndn'

This can be "fixed", creating a standalone executable from the
respective python script beforehand, but is very un-handy. What is a
better solution?

2. The current python-NDN producer is blocking. Where would be the right
place to make it asynchronous, within the python-NDN application, or
within mini-NDN that runs the application on a host?

Thanks again and cheers
Peter

On 29.07.21 18:30, Lan Wang (lanwang) wrote:
> Hi Peter,
> 
> Welcome to Mini-NDN.  I think developing a Python-NDN application in
> Mini-NDN is the same as developing it outside Mini-NDN.  The purpose of
> using Mini-NDN is to avoid having to change any applications.  For
> specific questions about Python NDN, it’s best to read the documentation
> https://python-ndn.readthedocs.io/en/latest/src/examples/examples.html and
> ask the developers, e.g., Xinyu Ma (xinyu.ma at cs.ucla.edu
> <mailto:xinyu.ma at cs.ucla.edu>).
> 
> Lan
> 
>> On Jul 28, 2021, at 10:12 AM, Peter Kietzmann
>> <peter.kietzmann at haw-hamburg.de
>> <mailto:peter.kietzmann at haw-hamburg.de>> wrote:
>>
>> CAUTION: This email originated from outside of the organization. Do
>> not click links or open attachments unless you recognize the sender
>> and trust the content is safe.
>>
>>
>> Dear Community,
>>
>> first of all: I am an absolute newbie to Mini-NDN (/the whole NDN code
>> base), so apologies for asking basic or duplicate questions :).
>>
>> I've successfully installed your VM and played with built-in examples
>> (ndnping etc.) and my own topologies -> that worked well! Now I would
>> like to implement consumer/producer application logic. Python-NDN [1]
>> seems like a promising candidate, however, I cannot find starter
>> material. How to run Python-NDN applications on top of Mini-NDN?
>>
>> Can anyone navigate me to a tutorial, a similar topic on this list, or
>> share first steps that might help to get started?
>>
>> Many thanks in advance!
>>
>> Cheers
>> Peter
>>
>> [1] https://github.com/named-data/python-ndn
>>
>>
>>
>> --
>> Peter Kietzmann
>>
>> Hamburg University of Applied Sciences
>> Dept. Informatik, Internet Technologies Group
>> Berliner Tor 7, 20099 Hamburg, Germany
>> Fon: +49-40-42875-8426
>> Web: http://www.haw-hamburg.de/inet
>>
>> _______________________________________________
>> Mini-NDN mailing list
>> Mini-NDN at lists.cs.ucla.edu <mailto:Mini-NDN at lists.cs.ucla.edu>
>> http://www.lists.cs.ucla.edu/mailman/listinfo/mini-ndn
> 

-- 
Peter Kietzmann

Hamburg University of Applied Sciences
Dept. Informatik, Internet Technologies Group
Berliner Tor 7, 20099 Hamburg, Germany
Fon: +49-40-42875-8426
Web: http://www.haw-hamburg.de/inet

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20210730/fa59e13c/attachment.sig>


More information about the Mini-NDN mailing list