Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
https://github.com/ff4j/ff4j/blob/v1/ff4j-core/src/main/java...
> The feature will be flipped after release date is reached.
Don't ever use this. This is a "time bomb". This is a very bad idea. It's basically like scheduling a time for your app to go down when you aren't paying attention.
You have to have a human in the loop. The right way to "schedule a release" is to have a human flip the flag at the appropriate time (preferably, ramp it up to 100% of users gradually) and then stay online for a little while to do an emergency ramp down if/when things go bad (that weren't caught by some automated system in the ramp up).
Uh this class is even worse, SDF is not a thread safe date formatter, so it never should be `final static`. `releaseDate` and `new Date()` will be ignorant of summer/winter time changes. For such scheduling one should use Quartz https://www.quartz-scheduler.org/
Sure. https://github.com/prefab-cloud/prefab-cloud-java/blob/main/... is consistent function that turns a string into a float in the range 0-1.
So if you hash "flagA-user1234" you'll get a number 0-1 and if you compare that to < .3 you'll know whether they should be "in the flag".
Relies on the uniformity of the hashing function.