Node.js unicast discovery, leader-citizen elections and pub/sub.
FIXED
Prevent edge case where multiple disconnect timeouts could be setup.FIXED
Emit added
event when node is revived.FIXED
If extended network issues arise and multiple packets get lost, all servers in the pool could end up losing references to each other and never regain them. This now keeps the peers for an hour after disconnecting and keeps pinging them until they come back.ADDED
MTU size on different systems can cause large messages to silently fail. We now auto chunk these and re-assemble them on the receiving end. The new maxPacketSize
option controls the chunk size and defaults to 508 bytes.maxPacketSize
option.shortid
instead of uuid
.FIXED
Correctly update the peers list when nodes are added/removed.UPDATED
Replaced forEach
with for
in publish
to improve performance under high load.ADDED
Basic pub/sub is now possible with democracy! This uses the same send
system as with custom events, but new subscribe
and publish
methods have been added as well as a channels
property on init (see README for docs and examples).UPDATED
Refactored all of the code to use ES6.UPDATED
Added ESLint configuration.data.extra
.UPDATED
Added the option to specify an id
for each node rather than letting it be generated automatically.UPDATED
Renamed follower
to citizen
(this was obvious, huh?).BUG
Immediately send hello
message without waiting for interval when new server is added.