Reliable udp broadcast libraries?

别说谁变了你拦得住时间么 提交于 2019-12-04 04:57:45

问题


Are there any libraries which put a reliability layer on top of UDP broadcast?

I need to broadcast large amounts of data to a large number of machines as quickly as possible, and generally it seems like such a problem must have already been solved many times over, but I wasn't able to find anything except for the Spread toolkit, which has a somewhat viral license (you have to mention it in all materials advertising the end product, which I'm not sure our customer will be willing to do).

I was already going to write such a thing myself (because it would be extremely fun to do!) but decided to ask first.

I looked also at UDT (http://udt.sourceforge.net) but it does not seem to provide a broadcast operation.

PS I'm looking at something as lightweight as a library - no infrastructure changes.


回答1:


How about UDP multicast? Have a look at the PGM protocol for which there are several commercial and open source implementations.

Disclaimer: I'm the author of OpenPGM, an open source implementation of said protocol.




回答2:


Though some research has been done on reliable UDP multicasting, I haven't yet used anything like that. You should take into consideration that this might not be as trivial as it first sounds.

If you don't have a list of nodes in the target network you have no idea when and to whom to resend, even if active nodes receiving your messages can acknowledge them. Sending to a large number of nodes, expecting acks from all of them might also cause congestion problems in the network.

I'd suggest to rethink the network architecture of your application, e.g. using some kind of centralized solution, where you submit updates to a server, and it sends this message to all connected clients. Or, if the original sender node's address is known a priori, then just let clients connect to it, and let the sender push updates via these connections.




回答3:


Have a look around the IETF site for RFCs on Reliable Multicast. There is an entire working group on this. Several protocols have been developed for different purposes. Also have a look around Oracle/Sun for the Java Reliable Multicast Service project (JRMS). It was a research project of Sun, never supported, but it did contain Java bindings for the TRAM and LRMS protocols.



来源:https://stackoverflow.com/questions/4991659/reliable-udp-broadcast-libraries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!