ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need some advice with regard to a networking program of mine. I wanted to know how we can ensure reliability when sending multicast traffic to a group of computers. Since I'm sending UDP traffic as multicast, how can I ensure that each computer belonging to that group received it? I can add reliability by adding sequence numbers to the UDP packets. but that will only work for unicast UDP connections. What about UDP multicast traffic?
Any help will be much appreciated..
Thanking you in advance..
What do you need to do if you detect a reliability problem? If your program is somehow able to detect that some clients are not receiving the multicast packets, it seems to me that there is nothing you can actually do to improve the situation.
There are multiple ways of making sure that your data is received correctly. One way is to transmit the source to the destination site multiple times with the receiver picking up additional pieces of the file during each pass. That way when (not if) you drop a packet, your chance of obtaining the dropped packet increases with each iteration of the transmission loop. This technique is called no-code carouseling and can result in rather large transmission times when sending data over lossy networks.
The only other way of making sure that any UDP traffic really gets to a destination is to use some sort of FEC encoding/decoding algorithms along with the carouseling. FEC encoding/decoding causes your data to be transmitted in such a manner that the receiving site has a chance to "reconstruct" the original data based upon which pieces of the data that it has already received. Various FEC techniques exist - some open source, but mostly they are licensed products.
Usage of any of the algorithms depend upon what you are actually trying to protect. It is much easier to protect the transference of a file type object rather than something such as a real-time A/V stream. When protecting a file type object, you pre-encode the file, then transmit the encoded file to the receivers who then decode the file back into the original source version.
Take a look at the open-source Reed-Solomon implementations. Some Reed-Solomon codes are pretty good at protecting against loss, some are not so good. Again, it really depends on the application.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.