Nanomsg multicast bandwidth issue

泪湿孤枕 提交于 2020-01-16 09:08:16

问题


Can I have pure multicasting in pub/sub protocol of the nanomsg. As there can be N subscribers interested in a particular data for a single publisher, the same subscribed data is flowing in N different streams.If my bandwidth for a single stream is 10MB then the total bandwidth required for N streams is 10*N,thus there is a increase in the bandwidth .Can we reduce this bandwidth as we do in the multicasting?? Can anyone help me regarding this issue??


回答1:


As far as I understand the PUB/SUB pattern, the data will be sent to all subscribers one by one. If a subscriber is not ready to take it, the data is dropped. I believe that the data in PUB/SUB is sent sequentially.

However, you can have better control how data is sent if you use PUSH/PULL pattern. You can have N PULLers and one PUSHer. The PUSHer will send the data to all PULLers one by one. The difference is that you can control timing and you can wait for slower PULLers.

If you do not like multiple transmissions the only other mechanism which I can think of is a shared memory. One sender and multiple takers. That scenario applies only for a single computer though.

So, the answer is No. You cannot have pure multi-casting in nanomsg pub/sub protocol. If you need a pure multicast you have to look at the other protocols. Maybe incoming nng could provide it over UDP.

If multicast is a must you have to check other protocols see for example NACK-Oriented Reliable Multicast (NORM).



来源:https://stackoverflow.com/questions/47305239/nanomsg-multicast-bandwidth-issue

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