axon
axon copied to clipboard
Fix unixsockets
- reconnect now works properly with unixsockets
- the callback function passed to
socket.listen()will return theEADDRINUSEif the attempt to connect does not result inECONNREFUSED - provide a callback to
fs.link()when recycling the stale socket file (see 1)
haha ugh.. and the maintenance begins, I still sort of feel like unix domain sockets is a big meh, it's easy to do ephemeral stuff over tcp
maybe we should revert that support
i looked into this lib because of unix-sockets in the first place, because i needed to do stuff on foreign system
i dont see why you wouldnt support them since its not so much weight, but its your call and im not the guy who stands behind the lib and ensures everything is ok :D
i just feel like they're really minimal win, there's almost never a valid reason for using them instead of regular old tcp, not that they're bad either but it is more stuff that needs testing/maintenance/docs
hm maybe put it into another module which can be used to wrap axon?
var u = require('axon-unix')
var a = require('axon')
var s = a.socket('req')
var c = a.socket('rep')
u(s).bind('/path/to/socket')
u(c).connect('/path/to/socket')
Yeah, they are not horrible but I feel like the whole unlinking and what not will stir up all kinds of non-issues that will still need to be looked into.
Since were trimming down for 2.0, we should back out unix sockets there probably. Thoughts?
better no unix-sockets than a half-implemented thing (imho)
im down for removing them
Err... don't remove that, pleeeease. I was about to suggest using unix sockets instead of tcp for pm2, and it'd kinda sad if it'll be removed. :P
In theory, with unix sockets it's easier to manage permissions, since socket is just a file. With tcp you need to set up an authentication and all that crap.
Please don't remove unix sockets, better performance then tcp. 33% better ?http://stackoverflow.com/questions/257433/postgresql-unix-domain-sockets-vs-tcp-sockets/257479#257479 #150 seems to fix reconnect issue.