[Mini-NDN] [EXT] Sends next request after previously requested files have been received

Ritu Bordoloi bordoloi.ritu1988 at gmail.com
Tue Sep 22 17:40:50 PDT 2020


 Dear Junxiao,

Thank you again for your suggestion. Indeed my code was running multiple
instances of the bash script. I resolved this issue. However, now I can see
that only the first file has been successfully received by the host even
though my bash script was requesting four files.

Can you please tell me why the other 3 files have not been received by the
host? I think I am still doing something wrong here.

I am invoking my bash script using the following command:

ndn.net.hosts[3].cmd('/home/ritu/Downloads/mini-ndn/examples/nlsr/./mytest_4_nodes
{} {} {} {} &'.format(Reqfile1, Reqfile2, Reqfile3, Reqfile4))

where Reqfile1... 4 are the files that have been requested by the host d.

I am again appending my bash script below
#!/bin/bash
set -e
ndncatchunks /ndn/a-site/a/$1
ndncatchunks /ndn/a-site/a/$2
ndncatchunks /ndn/a-site/a/$3
ndncatchunks /ndn/a-site/a/$4

Further I am also attaching pcap and dump files for your reference. Please
do let me know your suggestions. That will be very helpful.

Thank you.

Kind regards,
Ritu

On Tue, Sep 22, 2020 at 4:28 PM Ritu Bordoloi <bordoloi.ritu1988 at gmail.com>
wrote:

> Dear Junxiao,
>
> I wrote a bash script for requesting multiple files. I am appending a
> sample script below, where the host requests 4 files.
>
> #!/bin/bash
> set -e
> ndncatchunks /ndn/a-site/a/$1
> ndncatchunks /ndn/a-site/a/$2
> ndncatchunks /ndn/a-site/a/$3
> ndncatchunks /ndn/a-site/a/$4
>
> However, the host is still sending the next interest requests without
> successfully retrieving the previously requested files completely.  I am
> attaching the pcap and ndndump files along with this email for your
> reference.
>
> Can you please give me any further suggestions for this?
>
> Thank you.
>
> Best regards,
> Ritu
>
> On Sat, Sep 19, 2020 at 9:00 PM Junxiao Shi <shijunxiao at email.arizona.edu>
> wrote:
>
>> Hi Ritu
>>
>> I don’t see where the loop is.
>> If you want to retrieve 10 files one after another, repeat the
>> ndncatchunks command 10 times in the same bash script, and invoke this bash
>> script only once.
>>
>> Yours, Junxiao
>>
>> On Sat, Sep 19, 2020 at 06:56 Ritu Bordoloi <bordoloi.ritu1988 at gmail.com>
>> wrote:
>>
>>> *External Email*
>>>
>>>
>>> Dear Junxiao,
>>>
>>> I wrote a bash script and invoked it at the consumer side as you
>>> suggested. I have appended the bash script below.
>>>
>>> #!/bin/bash
>>> set -e
>>> ndncatchunks /ndn/Adelaide1-site/Adelaide1/$1
>>>
>>> However, the consumer is still sending the next interest requests
>>> without successfully retrieving the previously requested files completely.
>>> I am attaching a dump file of a consumer for your reference. Can you please
>>> have a look?
>>>
>>> My main aim is to compute the delay between sending an interest and
>>> getting back the corresponding file by a consumer. The consumer can send
>>> multiple interests one after another. However, the consumer can send the
>>> next interest after it has successfully received the previously requested
>>> file.
>>>
>>> I would also like to mention here that I am using a loop to send
>>> multiple interest requests.
>>>
>>> I would be happy if someone could help me with this.
>>>
>>> Thank you in advance.
>>>
>>> Kind regards,
>>> Ritu
>>>
>>>
>>>
>>> On Fri, Sep 18, 2020 at 4:44 PM Junxiao Shi <
>>> shijunxiao at email.arizona.edu> wrote:
>>>
>>>> Hi Ritu
>>>>
>>>> No, these need to go into a bash script, then invoke the script from
>>>> Python.
>>>> *set -e* is not a flag passed to ndncatchunks, but a separate command
>>>> placed just under the shabang line.
>>>>
>>>> Yours, Junxiao
>>>>
>>>>
>>>> On Thu, Sep 17, 2020, 22:31 Ritu Bordoloi <bordoloi.ritu1988 at gmail.com>
>>>> wrote:
>>>>
>>>>> *External Email*
>>>>> Dear Junxiao,
>>>>>
>>>>> Thank you for your quick response.
>>>>>
>>>>> I tried to follow your suggestion. However, the consumer is not
>>>>> getting any files in this case. I am appending my ndncatchunks code below.
>>>>> I think I did something wrong there. Can you have a look, please?
>>>>>
>>>>> host.cmd('ndncatchunks *set -e* /ndn/{}-site/{}/{} | ndndump -v>
>>>>> out{} &'.format(hosts[0].name, hosts[0].name, Reqfile, host.name))
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Kind regards,
>>>>> Ritu
>>>>>
>>>>>
>>>>> On Fri, 18 Sep 2020, 11:51 am Junxiao Shi, <
>>>>> shijunxiao at email.arizona.edu> wrote:
>>>>>
>>>>>> Hi Ritu
>>>>>>
>>>>>> You can put ndncatchunks commands in a bash script, and invoke the
>>>>>> script on the consumer host.
>>>>>> On the top of this script, add a *set -e* command. This command
>>>>>> causes the script to abort if any command was unsuccessful, which ensures
>>>>>> the next retrieval would start only if the previous one succeeds.
>>>>>>
>>>>>> Yours, Junxiao
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Sep 17, 2020, 21:28 Ritu Bordoloi via Mini-NDN <
>>>>>> mini-ndn at lists.cs.ucla.edu> wrote:
>>>>>>
>>>>>>> *External Email*
>>>>>>> Dear All,
>>>>>>>
>>>>>>> I would like to implement a very simple scenario where a producer
>>>>>>> publishes some files and a consumer request for those files. I am using
>>>>>>> ndnpuchanks and ndncatchunks commands for publishing and requesting the
>>>>>>> files respectively.
>>>>>>>
>>>>>>> I want the consumer to send the next request once it has
>>>>>>> successfully received the previously requested files. Can someone give me
>>>>>>> an idea on how to do this?
>>>>>>>
>>>>>>> Thank you for your help in advance.
>>>>>>>
>>>>>>> Kind regards,
>>>>>>> Ritu
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20200923/8c99278f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: outd.pcap
Type: application/octet-stream
Size: 225280 bytes
Desc: not available
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20200923/8c99278f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump.d-eth0
Type: application/octet-stream
Size: 79225 bytes
Desc: not available
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20200923/8c99278f/attachment-0003.obj>


More information about the Mini-NDN mailing list