3 ms·
I just wrote and open sourced pile of code with ZeroMQ (https://github.com/rantydave/messidge https://github.com/rantydave/messidge) and found it to be a mixed
by RantyDave 9y ago
I just wrote and open sourced pile of code with ZeroMQ (https://github.com/rantydave/messidge https://github.com/rantydave/messidge) and found it to be a mixed bag. In short:
* The encryption/authentication stuff is bordering on pointless - once a client has authenticated you cannot then be sure that a particular message is coming from that client. I binned it and used libnacl in a "by the book" implementation. It's not ideal.
* The routing, fanning etc. etc. stuff always made me uncomfortable - it's difficult to understand, introspect, debug, whatever.
* It's attitude to threading is idealist but a PITA - I got over it, eventually, by creating a sort of per-thread socket factory. Recent ZMQ's deal with both this and the above by introducing gloriously plain "server" and "client" sockets that are thread safe.
* The event monitoring sockets are cool but IMHO are a sign of things going pear shaped. In short, if you're monitoring connections then you're using messages to do a connection's job. I got this just, completely, wrong.
But: it works. It's reliable. It seems fast. In terms of basically doing what it promises, it delivers, and I think that counts for a lot.