USNavalResearchLaboratory / norm

NACK-Oriented Reliable Multicast (NORM) implementation & tools (RFCs 5740, 5401)
https://www.nrl.navy.mil/Our-Work/Areas-of-Research/Information-Technology/NCS/NORM/
Other
96 stars 33 forks source link

Question:how to get the status of each sender session? #65

Closed honglei closed 1 year ago

honglei commented 2 years ago
  1. the real send rate, function getTxRate return is always too high or too low; norm_rate
  2. how much bytes sended of an object(especially for a large file);
  3. the numbers of parity symbol segments (packets)/source symbol segments/resend segments in an interval, the interval values can be settled by API. Each interval emits an event? used to calculate packet loss ratio?
bebopagogo commented 2 years ago

The getTxRate() returns the current "snapshot" rate the underlying session is using at the moment the call is invoked. With congestion control, that will vary dynamically. The NORM code does maintain some statistics including an averaged transmission rate. That information is output into the text logging that can be enabled, I plan to provide a TLV-style API to request those statistics from the underlying code and provide controls to set the averaging intervals, etc but have not done that yet.

There are some ways to use the existing API calls (I need to check if all of those are exposed in the Python binding) for the receiver to get what portion of an object (e.g., file) has been received. Similarly the information for getting the current transmit "index" for a transmit object could be provided. But I don't have that feature yet.

There are existing packet loss tracking in the code that is also showed in the logging output and would also be accessible in the API to fetch those stats from the underlying NormSession.

I should probably have a development roadmap file that outlines these objectives and gives the intended order to work those. My current, unfortunately very limited, time spent on NORM has been with the NormSocket API extension to provide a simpler API for some typical NORM uses cases (and provide Python and Java bindings for that extension when it is complete). But I am willing to list out the things that need to be tackled and accept suggestions from the users on how those should be prioritized.

honglei commented 2 years ago

I wrote an application for testing pynorm, https://github.com/honglei/fastapi-norm, the python binding is modified to be more pythonic, pls check if the modifications are correct and match your will. If all things are ok, I'll try to commit a pull request.