[ndnSIM] [EXT] Neural networks in ndnSIM
ygor.amaral at gmail.com
Tue May 11 11:47:28 PDT 2021
Perhaps the use of sockets can be a more efficient approach to
inter-process communication than files.
When your strategy is initialized, the strategy runs the python application
and establishes the socket with it.
Whenever your strategy is to decide the next hop, it will send via socket
the status information to the neural network (python application) and
receive via socket the decision.
Remember that each node will have its own instance of the NFD forwarder. Do
you want to use a neural network for each node or a single one instance of
the neural network for all nodes? This is an important detail.
On Sat, May 8, 2021 at 4:53 PM Eric Binnendyk via ndnSIM <
ndnsim at lists.cs.ucla.edu> wrote:
> Hi Junxiao,
> Thanks so much for the reply. It really clears up some questions I had
> about how to use ndnSIM. I'll probably implement it the asynchronous way
> and have the C++ and Python code communicate using files.
> On Sat, May 8, 2021 at 7:24 AM Junxiao Shi <shijunxiao at email.arizona.edu>
>> Hi Eric
>>> I'm trying to implement a neural network to do forwarding in ndnSIM. I
>>> know this is possible to do in ndnSIM because these papers do it:
>>> Does anyone have any recommendations on how to implement a neural
>>> network? If possible, I would like to do it in Python even though most of
>>> the ndnSIM code is in C++. Is it possible to use the Python bindings to
>>> write a forwarding strategy in Python, so that I can use a neural network
>>> library like keras?
>> Forwarding strategy is normally a C++ class that is called synchronously.
>> C++ code can invoke Python synchronously.
>> Implementing part of the forwarding strategy logic in Python wouldn't be
>> easy or performant, but I don't see major roadblock.
>> It would not be a "binding" though, because a "binding" typically refers
>> to calling C++ code from Python, not the other way around.
>> Another possibility is performing machine learning asynchronously.
>> In this approach, the forwarding strategy (C++) and the neural network
>> (Python) share a common data structure, but do not interact with each other
>> on a per packet basis.
>> The forwarding strategy makes immediate decisions based on what's already
>> in the data structure, and stores the outcome (e.g. satisfy ratio and RTT)
>> into the data structure.
>> The neural network periodically reads from the date structure, does its
>> magic, and writes to the data structure to influence future forwarding
>> Yours, Junxiao
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM