Democracy.js Versions Save

Node.js unicast discovery, leader-citizen elections and pub/sub.

v3.1.3

5 years ago
  • FIXED Prevent edge case where multiple disconnect timeouts could be setup.

v3.1.2

5 years ago
  • FIXED Emit added event when node is revived.

v3.1.0

5 years ago
  • 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.

v3.0.0

5 years ago

Updates

  • 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.

Breaking Changes

  • Messages of greater than 508 bytes are now chunked by default (split into multiple messages and re-assembled on the other end). This setting can be changed with the new maxPacketSize option.
  • Default peer ID's now use shortid instead of uuid.

v2.1.1

5 years ago
  • Fixed a race condition that could cause pub/sub to get out of sync.

v2.1.0

6 years ago
  • FIXED Correctly update the peers list when nodes are added/removed.

v2.0.1

6 years ago
  • UPDATED Replaced forEach with for in publish to improve performance under high load.

v2.0.0

6 years ago

Updates

  • 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.

Breaking Changes

  • Custom events now just return the data that was sent rather than needing to access it in data.extra.
  • Support for Node.js older than 6.4.0 has been dropped.

v1.3.0

6 years ago
  • 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?).

v1.2.3

7 years ago
  • BUG Immediately send hello message without waiting for interval when new server is added.