[zeromq-dev] socket event monitoring problem when using an event loop

2015-07-01 Thread Chris Laws
I was recently working on getting the socket event monitor working in an async focused Python library, aiozmq, and I had great difficulty getting it working reliably. Hopefully this post might save someone some time if they are trying something similar in the future. tl;dr when using async

[zeromq-dev] socket event monitoring problem when using an event loop

2015-07-01 Thread Chris Laws
libzmq raises an error if you try anything other than an inproc:// transport. The socket event monitor emitter socket is created within within libzmq. Developers can specify the address string (the part after the inproc:// scheme) but not the transport.

[zeromq-dev] pyczmq is broken

2015-02-08 Thread Chris Laws
Just in-case you misread the title, this post is about pyczmq not pyzmq. This is just a FYI so that at least the list is aware. The last pyczmq commit was about 7 months ago. Obviously this is not impacting many people. pyczmq appears to be broken even though the Travis badge indicates a passing

Re: [zeromq-dev] random crashes on zmq_ctx_term() when there is a monitored socket

2014-11-16 Thread Chris Laws
To close the monitor socket you need to call the monitor function again but pass a NULL in the address field. The call looks something like this... rc = zmq_socket_monitor(sock_handle, c_addr, c_flags); Set c_addr to NULL and c_flags to 0. ___

[zeromq-dev] Just a neat data visualisation

2014-11-11 Thread Chris Laws
While search around for graph visualisers I encountered this novel data visualiser and plugged in zeromq to see a github account with lots more repo's than my user. Not sure about its usefulness and practicality but it's neat all the same: http://ghv.artzub.com/#repo=czmqclimit=100user=zeromq

[zeromq-dev] gossip protocol

2014-07-30 Thread Chris Laws
I'm trying to understand the operation of the gossip capability in CZMQ. I think I understand the way it distributes key/value pairs to peers that connected to it and that it connected to. However, I don't understand how a gossip node actually finds another node. The tests seem to hard code the

[zeromq-dev] Using saltstack to automate installation of a zeromq stack

2014-07-12 Thread Chris Laws
I use the following gist as part of a Saltstack setup to automate the install and update of a development machine's zeromq stack. I use it periodically to keep one or many machines up to date. I find Saltstack most useful to quickly configure a new machine into a functional state. I thought the

[zeromq-dev] ZMTP greeting

2014-07-08 Thread Chris Laws
I'm playing around with a ZMTP implementation and I notice that other ZMTP implementations seem to be setting the second last byte of the ZMTP signature to \x01 (the byte before the last \x7F). The various ZMTP specs (15, 23, 37) indicate that the 8 bytes between the \xFF and \x7F should be \x00

[zeromq-dev] ZMTP query

2014-07-02 Thread Chris Laws
I am playing around with ZMTP for 'reasons'. I have implemented my own ZMTP client and I observe that when I connect to a ROUTER socket (which is a simple CZMQ server) and progress through the greeting and NULL handshake, the router is sending my client an identity property which I am not

[zeromq-dev] ZRE spec query

2014-06-29 Thread Chris Laws
On the ZRE specification page http://rfc.zeromq.org/spec:20 in the Node Discovery and Presence section, should the following text: When a ZRE node receives a beacon from a known node, with a *non-zero* port number, it SHALL disconnect from this peer. actually be: When a ZRE node receives a

[zeromq-dev] ZRE interoperability

2014-06-29 Thread Chris Laws
Hi list, I've just spent some time trailing the interoperability of the C, Go and Python ZRE implementations. I encountered some issues with the Python version - which I later determined are due to it being a v1 implementation. I did not initially realize that there were 20/ZRE and 36/ZRE

[zeromq-dev] Using pyczmq for zcert/zauth only

2014-02-04 Thread Chris Laws
I think that the pyzmq master can meet your needs. I added pyzmq implementations for each of the hintjens security examples (iron house, woodhouse, etc) when I submitted the pyzmq.zauth into pyzmq. This change also included the ability to read and write CZMQ compatible zcert files. The tests

[zeromq-dev] Notification of peer disconnection for ZMQ_STREAM sockets.

2014-01-09 Thread Chris Laws
In CZMQ and PYZMQ you can use the socket event monitor interface to receive socket event notification of things such as connect, disconnect, accepted, etc. I use the zmonitor from CZMQ and zmq.utils.monitor.recv_monitor_message from pyzmq for receiving connection state information in applications

[zeromq-dev] service discovery - problem description (was: Re: Poll on sockets OR child process)

2013-12-26 Thread Chris Laws
I posted this info to the list a while ago and it seems appropriate to mention it again now. I'll need to confirm that I can release the code to show you the internals but here is the basic outline... I implemented a service discovery mechanism a while ago that might be useful as a model for this

[zeromq-dev] czmq runtime version detection

2013-12-16 Thread Chris Laws
Pyczmq may only be usable with recent versions of libzmq and czmq. Further investigation is necessary to confirm this but a version check at install time would be useful. If I am using Python and the FFI module I can obtain the zmq version, within the setup.py installer by calling the zmq_version

[zeromq-dev] A security authentication module for pyzmq

2013-12-08 Thread Chris Laws
I was wanting to use ZMQ's security features in my pyzmq applications. As far as I can tell the security API in pyzmq is pretty low level (sockopts and write your own ZAP handler). Hopefully I have not overlooked an existing module that already does what I want. Anyway, I am familiar with czmq

[zeromq-dev] rfc22

2013-12-07 Thread Chris Laws
My zeromq-buildbot project just entered the zeromq organization. I needed to make some minor updates after I transferred it, such as references to the new project github location and also a reference to RFC22 for contributing. I made the updates but in doing so I realize that I am not properly

[zeromq-dev] rfc22

2013-12-07 Thread Chris Laws
Thanks for the reply Pieter, that's the information I was after. I have created a new team to maintain the buildbot project and have added you to it. Thanks, Chris ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org

[zeromq-dev] zeromq-buildbot

2013-12-06 Thread Chris Laws
Hi, Pieter, I have no problem moving the zeromq-buildbot over to the zeromq organization - though I have no idea how I would go about doing that. Any pointers? I know the pyczmq project recently did that so I'll search back through the archives to see if anything relevant was mentioned. It looks

[zeromq-dev] zeromq-buildbot

2013-12-06 Thread Chris Laws
So a quick Google search produced the instructions for transferring zeromq-buildbot over to the zeromq organisation. I have followed that so it should now be there waiting to be accepted I guess. Regards, Chris ___ zeromq-dev mailing list

[zeromq-dev] zeromq-buildbot

2013-12-06 Thread Chris Laws
Scratch that last post, zeromq-buildbot is now part of the zeromq organisation. I thought that someone might need to accept it into the oraganization, but no. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org

[zeromq-dev] Adding Continuous Integration to Pyczmq

2013-11-27 Thread Chris Laws
Without continuous build and test the pyczmq project can be broken until someone trying to install and run the tests discovers the issue. This is not ideal. Pyczmq was out of sync with czmq today after an update was pushed to czmq. This meant it was effectively broken were someone to download and

[zeromq-dev] RFC: zbeacon for dhcp-style discovery

2013-11-27 Thread Chris Laws
I have implemented a service discovery mechanism that might work for you. This approach lets my system applications find and make available any number of services. It is influenced by zbeacon and czmq in general. While I serialise the UDP packet content using msgpack it could equally be simple

[zeromq-dev] DSCP/Diffserv

2013-11-24 Thread Chris Laws
I have submitted a change into libzmq that allows sockets to set (and get) the Type-of-Service fields within the IP header. These fields seem to be called many names, Diffserv, Differential Services Code Point, DSCP, ECN, etc. Basically, this will allows ZMQ socket users to set a field within the

[zeromq-dev] DSCP/Diffserv

2013-11-23 Thread Chris Laws
DSCP is often used to provide QoS within a network. [ http://en.wikipedia.org/wiki/Differentiated_services_code_point] It looks like there are some references to DSCP settings in libzmq (openpgm specifically) pgm sockets. I am interested in setting DSCP on TCP sockets used on bandwidth limited

[zeromq-dev] cancel czmq timers by id

2013-11-20 Thread Chris Laws
Many of my system's (CZMQ based) applications are long running, though some applications within my system come and go. Many applications do various timer based work when certain applications are present and should not be doing these timer actions when certain applications are not present.

[zeromq-dev] ZMQ_STREAM identity problem

2013-10-30 Thread Chris Laws
I am not using a ROUTER socket. In my silly example I am using two ZMQ_STREAM sockets connected together as client and server. I understand I can use a ROUTER in raw mode when considering the a server scenario but in this instance I am more interested in the client scenario. My simple example

[zeromq-dev] CZMQ socket event monitor

2013-10-27 Thread Chris Laws
A while back I saw mention of someone wanting access to the underlying socket events. I understand that ZMQ does not attempt to promote accessing these events, in preference for building reliability measure such as heartbeating into the system architecture. However, I find that I need access to

[zeromq-dev] problem with czmq zloop timer

2013-09-10 Thread Chris Laws
Hi list, I am developing applications using the czmq zmq binding. My application uses multiple timers to perform various time dependant actions. I am encountering issues when cancelling timers. My application is encapsulated within a struct that contains state, sockets, etc which I think is a

[zeromq-dev] non-clean exit - Context was terminated

2013-09-01 Thread Chris Laws
After more investigation it appears that the problem I am seeing is associated with the thread code sitting blocked in recv until the main thread performs the context shutdown. When the thread begins shutting down it goes through the termination sequence of events, one of which is to set the

[zeromq-dev] non-clean exit - Context was terminated

2013-08-30 Thread Chris Laws
I am learning zeromq and have built a small-ish application using czmq that generally works well. However, when I shut it down using Ctrl+C, it prints Context was terminated to standard out. I presume this indicates a non-clean exit and I would like to fix this. I have read the guide section

[zeromq-dev] problem using last endpoint sockopt in pyzmq

2013-01-12 Thread Chris Laws
Hi, I am trying to use a wildcard port in an effort to let the OS assign an ephemeral port. I then try to ascertain the actual endpoint by using the LAST_ENDPOINT socket option so that I can inform other apps of the real endpoint. This is along the lines of the suggestion here: