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

Junxiao Shi shijunxiao at email.arizona.edu
Sat Sep 19 04:00:39 PDT 2020


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/20200919/23957822/attachment.html>


More information about the Mini-NDN mailing list