-
Notifications
You must be signed in to change notification settings - Fork 105
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
Implement socket options struct and builder for socket with options #116
Comments
Similar: #131 |
Was about to create new issue for ability to specify socket's identity - right now PeerIdentities are by uuid only. But I guess this falls under the builder issue. |
Yeah. I'm pretty sure it is. I'll try to work on it on a weekend if I have time.. |
This is related to #116. Currently it's only enables user to set custom peer-identity if needed and passes options all around. Later we can add other options to this struct. Some minor changes to ReadyCommand properties were required cause ZMQ_IDENTITY could be any byte vec and not guaranteed to be valid String
I've added a prototype implementation.. It looks a bit bulky in terms of small changes here and there however I don't know a better way of doing it right now.. |
Looks pretty functional to me, can perform userspace routing now - Thanks! |
@CorinJG cool. Merged it to master. Let me know if there are other minor changes that might help you. I don't have much time to work on library but I'm trying to help people with specific requests |
That's very kind of you, thanks a lot:) |
I could be wrong but I can't see that TCP Nagle is disabled anywhere in the lib (eg. simply at socket creation via set_nodelay) - |
@CorinJG it seems you are right. However I think this should be tracked as a separate issue. |
@Alexei-Kornienko Yes that's sensible, looks like it's part of the ZeroMQ protocol so shouldn't be a socket option. |
@Alexei-Kornienko as #133 added only the peer identity, no other options are implemented at the moment? We are interested in replacing our dependency on the from-source FFI version (which we currently need to vendor for cross-compilation), but would need send/receive timeouts ( |
@domenicquirl I'm afraid they're not supported - like several other options. |
@poyea do you have an estimate of how much effort it would be to add timeouts / where they would need to be handled (besides adding the option itself)? Could I help with a limited part of my work-time without being familiar with the codebase? |
It's hard to tell, but I'd say maybe a medium-sized change for |
Following up on this after looking through the stack over the week-end. I am still unsure where the correct place to put a timeout would be here, in particular due to the buffering that happens as part of All of this somewhat makes sense for an For receiving, the SUB socket only awaits its queue. Could a timeout be added for this operation, i.e. is the queue cancel-safe? That would already help out a lot - the main problem for us is still that we cannot have the task that receives updates block unboundedly. A |
Currently socket doesn't provide any means to customize it's behaviour. Some options are required by ZMQ spec (for example high water mark for message buffers) other would be nice to have (for example number of retries on reconnect before returning an error)
The text was updated successfully, but these errors were encountered: