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
UDP support #807
Comments
Mato has kindly said we could use our standard file header. He's already in AUTHORS. |
Have there been any updates on this, specifically unicast UDP support? |
I am also interested in unicast UDP support. Is anyone working on this capability? |
I have to add a "me too!" to this issue. I have a need to pub/sub messages where an undelivered message will be out of date and superseded by the next message. Any attempt at adding reliability will result in unnecessary and undesired latency. This is especially true for low-bandwidth and sometimes flaky radio networks. Of course, other networks and scenarios will call for normal zeromq "tcp://" sockets. So I would really like to be able to have an zeromq api that handles both "tcp:" and "udp:" sockets similarly. Is this still an open issue because a properly "tuned epgm" usage provides the same functionality? |
I'd love a UDP transport... without the epgm reliability layer, and for On Tue, Oct 27, 2015 at 11:21 PM, Phil notifications@github.com wrote:
|
bump |
I'm closing this issue because, guess what... @somdoron built UDP support into the new RADIO / DISH socket types. Go ahead, play with it, see what it feels like... :) |
Great ! Is there any available documentation for it yet ? |
@Bitiquinho, et. al. - PR #1737 is a good place to look at as well, since it is recent and outlines how the support was added. UDP support works with the Radio/Dish socket types; it is similar to Pub/Sub but with thread-safety. Support for the UDP transport via Radio/Dish was also subsequently added into CZMQ. Hope that helps. |
@hitstergtd, that helps a lot. Thank you ! |
@Bitiquinho I just sent a pull request with docs: |
@somdoron Really nice ! Thanks a lot ! |
@somdoron,
Hope that is OK. |
Great, which page is that? Im trying to find how to update the zeromq.org
|
It is: You will need to register as a user with wikidot.com first, but that's a painless process, and then it is just a matter of opening the aforementioned page and clicking Edit at the bottom. I have also noticed that other parts of the site need to be updated as well with regard to stuff in 4.2/master but have not managed to make a list of them as of yet. I will get to that sometime next week. |
I think there is a way to automatic generate the zeromq.org docs from
|
I think that is just for the API and the ZGuide, which both can be updated in GitHub and I think PH triggered a site update manually for them. That process probably needs to be handed over too. The ZeroMQ.org site itself is based on WikiDot. |
not the wiki, its made by hand.
|
Hello, |
error: ‘ZMQ_RADIO’ was not declared in this scope |
Have you built libzmq with draft options enabled?
./configure --enable-drafts
…On Wed, Oct 10, 2018 at 10:47 AM Ziad kassam ***@***.***> wrote:
error: ‘ZMQ_RADIO’ was not declared in this scope
zmq::socket_t socket (context, ZMQ_RADIO);
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#807 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNYGvkkhJWSuXSNYZSSpD7yAWwVfHI4ks5ujcIjgaJpZM4BXbVs>
.
|
Yes, but is it right like that: server.cpp: client.cpp: |
Maybe try defining ZMQ_BUILD_DRAFT_API before including zmq.h
More details here:
#2811
…On Wed, Oct 10, 2018 at 10:59 AM Ziad kassam ***@***.***> wrote:
Yes, but is it right like that:
server.cpp:
zmq::context_t context (1);
zmq::socket_t socket (context, ZMQ_DISH);
socket.bind ("udp://*:5557");
client.cpp:
zmq::context_t context (1);
zmq::socket_t socket (context, ZMQ_RADIO);
std::cout << "Connecting to hello world server..." << std::endl;
socket.connect ("udp://localhost:5557");
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#807 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNYGuBv7RLvfuDFt3L67ibiMjMwkRc4ks5ujcUDgaJpZM4BXbVs>
.
|
How can I do this? |
I put this at the beginning of the code:
#define ZMQ_SERVER 12 |
#define ZMQ_BUILD_DRAFT_API
before you include zmq.h in your own code.
…On Wed, Oct 10, 2018 at 11:16 AM Ziad kassam ***@***.***> wrote:
I put this at the beginning of the code:
#ifdef ZMQ_BUILD_DRAFT_API
//DRAFT Socket types.
#define ZMQ_SERVER 12
#define ZMQ_CLIENT 13
#define ZMQ_RADIO 14
#define ZMQ_DISH 15
#define ZMQ_GATHER 16
#define ZMQ_SCATTER 17
#define ZMQ_DGRAM 18
#endif
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#807 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNYGh28BTLV8ckb_9jUlDBx48_rBKesks5ujckFgaJpZM4BXbVs>
.
|
still the error |
#define ZMQ_BUILD_DRAFT_API int main ()
|
I put this part: //DRAFT Socket types. Compiled normally, but the following error appears: |
You have lost me now, I am not sure where you "put" that code?
All I can say is :
1. make sure you have configured (then compiled) libzmq with --enable-drafts
2. When you compile your code give g++ the option -DZMQ_BUILD_DRAFT_API=1
If that doesn't work then try using pkg-config as bluca suggest in the
issue I linked earlier.
…On Wed, Oct 10, 2018 at 11:38 AM Ziad kassam ***@***.***> wrote:
I put this part:
#ifdef ZMQ_BUILD_DRAFT_API
//DRAFT Socket types.
#define ZMQ_SERVER 12
#define ZMQ_CLIENT 13
#define ZMQ_RADIO 14
#define ZMQ_DISH 15
#define ZMQ_GATHER 16
#define ZMQ_SCATTER 17
#define ZMQ_DGRAM 18
#endif
Compiled normally, but the following error appears:
terminate called after throwing an instance of 'zmq::error_t'
what(): Invalid argument
Aborted (core dumped)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#807 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALNYGlf4_VJd51BOO1_obDfqYGehdHDfks5ujc4cgaJpZM4BXbVs>
.
|
|
If that doesn't work then try using pkg-config as bluca suggest in the |
Run the following in the libzmq lib (assuming you already run
Do one of the following, depending on your build system
|
still not working: error: ‘ZMQ_DISH’ was not declared in this scope |
But when I put on top of the code server.cpp and client.cpp, the compile works correctly, but I receive the error: |
Moving the issue from JIRA:
https://zeromq.jira.com/browse/LIBZMQ-589
The problem: In an environment when messages have a very short time-of-usefulness, it is sometimes necessary to sacrifice reliability for absolutely minimum latency. It's okay if messages are occasionally dropped or occasionally arrive too late, but this percentage should be kept as low as possible, and as close to i.i.d. as possible.
With a protocol like TCP, a dropped packet requires retransmission after a delay. Not only the dropped packet but all later packets are therefore delayed. In the messaging world, this means the dropping of one message could negatively affect the latency of later, unrelated messages, and the distribution of delayed messages is not i.i.d. This is undesirable in latency-critical applications.
While NACK-based protocols like PGM may provide somewhat better behavior in this regard, they still use bandwidth to attempt to restore lost messages without regard to whether or not those messages are still useful. A completely unreliable messaging transport is therefore desirable.
Another advantage of UDP transport is the ability to operate over one-way physical links, such as radio links where the transmitters on one end are much more powerful than the transmitters on the other end.
The UDP transport layer should minimally support IPv4 and IPv6 UDP unicast. IPv4 and IPv6 multicast, as well as IPv4 broadcast and subnet broadcast support, are desirable.
Some work was done on a UDP transport for the Crossroads IO library forked from 0MQ some time ago. I believe this code is a good place to start, although it will require some adaptations to reverse Crossroads-specific changes and implement 0MQ-specific changes since the fork.
I've pushed the changes:
https://github.com/LindleyF/libzmq
Note that this just builds---I doubt very much that it works yet.
Here are the changes so far:
LindleyF@c5f576e
I wasn't sure what to do about the copyright notice so I left the Crossroads text mostly in place, with a note that I modified it for 0MQ.
The text was updated successfully, but these errors were encountered: