-
Notifications
You must be signed in to change notification settings - Fork 67
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
Think about fragmentation #225
Comments
UDP will not be transparently merged back together if it is broken up, at most usual it's dropped. Fragmentation needs to be handled in this library, and it needs to be able to scale it down as MTU can occasionally be lower than expected... |
Look into using raptorq. I've been using it in my PhD work in a network simulator I'm writing, and I'm very happy with how it performs. The algorithm is defined by RFC 6330; skim the first few sections to get an idea of what it provides. Why use it
Why not to use it
Tips & tricksWhen you're setting up communications, create a pair of channels, one over TCP and one over UDP. The TCP channel will let you communicate the tuning parameters (ObjectTransmissionInformation) to all clients securely. This is useful if you want to be able to adapt to changing network conditions (new players joining or leaving, or the network getting bad over time) by changing the tuning parameters. This approach is also how you get low-latency reliability, but that is something that should be discussed in a different issue. |
Currently, we fragment our packets, however, there has been some problems with this. I am not sure about the exact problems because it was discussed a while ago. However, our current implementation is not completely finished yet. We do fragment big packets, but we do not acknowledge individual fragments yet. So if you just send big chunks it might happen that individual parts would not arrive at the destination, which would result in the case that a packet will never be returned back to the user, because the fragmentation is not completed. The IP-layer, however, should provide fragmentation it'self already. And it will resent a whole packet if one fragment is not received.
The problem we are facing is that we keep packets under the MTU-size, but next don't offer any reliability guarantee on top of it. And thus it would be better if we just removed the fragmentation and let the IP-layer handle it. Or we should implement acknowledgment for each fragment so that we do add value to our fragmentation.
The text was updated successfully, but these errors were encountered: