Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why copy message between helics applications? #38

Open
jaredd opened this issue Jun 23, 2020 · 3 comments
Open

Why copy message between helics applications? #38

jaredd opened this issue Jun 23, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@jaredd
Copy link

jaredd commented Jun 23, 2020

I have been reviewing HELICS as a potential enabler for some large scale ns-3 sims. Going through the sample applications I noticed that the HelicsApplication seemingly copies the message from the source application to the sink application (from the NS-3 perspective) while also sending the same message as a packet through the simulation. Did I misread the code? Is this intentional? If the simulation loses the packet (due to a lossy medium) does the Helics message map grow without bound?

@nightlark
Copy link
Member

nightlark commented Jun 23, 2020

I think moving the received HELICS message from the source app to the sink app is intentional, with just the message data getting sent using an ns-3 packet (I seem to recall some discussion about this; the other approach is serializing the entire HELICS message struct and sending it as an ns-3 packet, which would make the simulated ns-3 packets larger).

I checked out the code, pretty sure you're right about the losing packets case -- it looks like the moved HELICS message will never get removed because the packet with the matching tag never arrives.

A co-worker suggested that https://www.nsnam.org/docs/tutorial/html/tracing.html could be used to get a callback on dropped packets (PhyRxDrop) that could be used to remove the dropped message from the sink app. I'm not sure when I'll have time to work on this, but if you fix it (or have other improvements) I'll get the PRs merged.

@nightlark nightlark added the bug Something isn't working label Jun 23, 2020
@jaredd
Copy link
Author

jaredd commented Jun 24, 2020

There are a number of places that can drop a message depending on the underlying link. Just look through the wifi mac stuff. I wouldn't count on the PhyRxDrop (for which Phy?) to cover your bases. You guys already have a tag, why not incorporate the helics-specific metadata in that tag?

I can also imagine the case of a broadcast / multicast packet that get to only certain nodes and not others. This odd side-channel I imagine has many unintended affects. That tag would be replicated to all receivers too.

@nightlark
Copy link
Member

It looks like adding the information to a tag would work. I don't see any reason why it couldn't be changed -- it might have been from looking at outdated ns-3.10 docs that mention a 20 byte size limit for packet tags that led to using this side-channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants