- ~2x performance improvment of base-64 encoding.
0.4.4 - 2016-08-04
- A utility macro,
with-timestamp
, which can be used to contain flake generation to a bounded time window. While unlikely,generate!
could repeatedly lose the race to generate a flake which could be undesirable-- wrappinggenerate!
withwith-timeout
addresses this issue.
- Replaced the use of
read-string
with Integer/parseInt in reading timestamps from disk. This is generally safer, asread-string
is essentiallyeval
.
0.4.3 - 2016-07-08
- The ordering of the base 62 alphabet used to generate base 62 numbers was misasligned such that IDs produced using this function could sort improperly. This is now fixed.
0.4.2 - 2016-06-21
- Replaced usage of
System/currentTimeMillis
with a custom epoch derived from the difference betweenSystem/currentTimeMillis
andSystem/nanonTime
. In order to protect against clock skew, a sampling of deltas between the two is taken and the average is used as the epoch for yielding new timestamps. - BREAKING: The persistent timer now uses the same epoch used to generate
timestamps. As a result the arity of
write-timestamp
was changed to include the epoch as the final argument.
- A potential race condition existed where, if two threads called
generate!
simultaneously, the fact that the timestamp comparison was done outside of the swap update function could result in duplicate IDs.
0.4.1 - 2016-06-03
- Catch java.io.IOException when reading the timer path--fixes an issue where non-existant paths threw uncaught exceptions.
0.4.0 - 2016-06-02
- Better hardware address discovery. Far more robust, filtering out
null
devices and picking the first seemingly valid hardware address.
- Removed random worker ID assignment, when no hardware address was found.
- BREAKING:
generate
is nowgenerate!
in addition, other functions removed. - BREAKING:
generate!
now returns a ByteBuffer--useflake->bigint
to maintain backwards compatibility. - BREAKING: Persistent timer moved to its own namespace,
flake.timer
.
0.3.2 - 2016-04-14
- Better network interface fallback--this involves filtering out loopback devices.
0.3.1 - 2015-06-29
- Support for creating the worker ID portion of IDs via
SecureRandom
when no hardware interfaces can be found.
0.3.0 - 2015-06-11
- An equality check that wasn't wrapped in the
clojure.test/is
macro. - The ordering of
write-timestamp
was reversed, resulting in an exception.
0.2.0 - 2014-08-23
- Persistent timer sleep duration.
0.1.0 - 2014-08-19
- Published project.