Skip to content

Releases: goldfire/democracy.js

v4.0.0

18 Oct 00:48
Compare
Choose a tag to compare

Updates

  • FIXED In the rare case that weights of two peers are the same, there is now a tie-breaker that uses the ID value.
  • FIXED The for loop to count voters for peer removal was invalid, which could cause unpredictable results and state issues.

Breaking Changes

  • Default peer ID's now use nanoid instead of shortid.
  • Dropped support for Node.js <16.

v3.1.3

08 Apr 18:13
Compare
Choose a tag to compare
  • FIXED Prevent edge case where multiple disconnect timeouts could be setup.

v3.1.2

26 Mar 15:21
Compare
Choose a tag to compare
  • FIXED Emit added event when node is revived.

v3.1.0

17 Feb 16:05
Compare
Choose a tag to compare
  • 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

03 Dec 20:09
Compare
Choose a tag to compare

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

28 Sep 16:11
Compare
Choose a tag to compare
  • Fixed a race condition that could cause pub/sub to get out of sync.

v2.1.0

08 Apr 05:51
Compare
Choose a tag to compare
  • FIXED Correctly update the peers list when nodes are added/removed.

v2.0.1

02 Mar 15:07
Compare
Choose a tag to compare
  • UPDATED Replaced forEach with for in publish to improve performance under high load.

v2.0.0

14 Feb 16:47
Compare
Choose a tag to compare

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

19 Sep 15:10
Compare
Choose a tag to compare
  • 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?).