Reliable UDP implementation

I need a UDP implementation that meets the following criteria:

  • Available for Linux and Mac (latest versions only)
  • Used with C ++
  • Order packages
  • Guaranteed package delivery
  • Non-connectivity (e.g. UDP)

NOTE. I do NOT want to use TCP for this. NOTE. It can be implemented by any socket API if it is available on two platforms and is available for C ++.

EDIT: I looked at UDT, RUDP, and SCTP. These seem to be the main rivals. Any thoughts?

EDIT: UDT seems to be what I'm looking for. Is the fact that it is implemented in user space above UDP cores would be a huge performance issue? Or will speed be faster than TCP / STCP?

EDIT (2/15/12): I came up with a solution that uses TCP and a central redirect server. The system allows one client to send data to the server through a constantly open TCP connection, which they transmit together with another other client through the server’s TCP connection to the second.

+4
source share
6 answers

I believe you want SCTP .

+2
source

This is an old question, but I saw that no one answered anything about UDT. I have some experience with it, so I can share it.

UDT works very well. You basically use it, like a UDP socket, and get everything you specified from it.

In terms of performance, I did not notice any problems. In fact, it has several algorithms to maximize throughput, and you can get pretty amazing results (I got> 90 MB / s on a 100 MB / s Ethernet LAN). It works great on slow / high latent links.

This is not ideal, of course, and some error scenarios are not handled as we would like, but for the most part, you just β€œplug it in” and you're good.

+2
source

Disclaimer: I work for a company that produces commercial UDP data transmission tools.

There are many UDP communication tools available, including free and commercial software. Which one you choose will depend on several factors in addition to those that you have already indicated:

  • What data do you transfer? Files created by the program data streams, short messages? Kilobytes, megabytes, gigabytes or terabytes? Most UDP solutions focus on files or large data streams. Few are also optimized for small or general messaging.

  • What is your network topology? Client-server, peer-to-peer, server-server? This will affect the firewall problems and may affect the cost of commercial solutions.

  • What network environment do you plan to implement? Some UDP-based transport protocols are only suitable for very fast networks or networks in which end users can configure the target speed. Others are optimized for low speed, high latency (e.g. satellite). Some work well in any environment.

  • How much money are you willing to spend? There are both open and commercial solutions. Prices among commercial solutions vary widely and may depend on some of the above factors.

  • How much support do you need? Some open source solutions have reliable communities around them, some of them are almost abandoned. Similarly, the level of support among commercial solutions is changing.

Obviously, I'm trying to find a fine line so you can think about without promoting my own company. I apologize to everyone if I went too far in either direction.

+1
source

You may be looking for RTI-DDS . There C ++ API and QoS guarantee delivery via UDP. Not sure about Mac support, but you can ask them on support@rti.com.

0
source

It sounds like you're asking for something like RUDP .

In any case, it is very difficult to implement. I don't know anything about what makes

I also wanted to emphasize the fact that if this is not done in the kernel, performance drops sharply. As a rule, such things as reassembling packages, etc., the application either requires much more buffering, or they are going to generate much more attempts if the data transfer speed is high enough (which can be quite a modest amount of traffic.)

0
source

This series of lessons may interest you.

Edit: The links for the next tutorial are at the bottom of the page, and the reliable UDP message is actually the third, but the first and second are good readings.

0
source

Source: https://habr.com/ru/post/1393283/


All Articles