8 ms·
FF4J – Feature Flags for Java
- joaonmatos 3y agoThe copy is in pretty rough shape. You should try to get a native English speaker to edit the contents for you.
- smrtinsert 3y agoThey could always use chatgpt to improve some of the diction, but it's perfectly readable.
- tantalor 3y agoYikes: > the behavior of a feature can be enslaved with your custom implementation https://github.com/ff4j/ff4j/wiki/Flipping-Strategies https://github.com/ff4j/ff4j/wiki/Flipping-Strategies
- baxuz 3y agoIf you're using numbers for the acronym, you could've gone with F3J.
- mgradowski 3y agoThe "4j" suffix literally means "for Java" and is commonly used to indicate that the project is a Java library, e.g. log4j, slf4j, &c.
- rc_mob 3y agobaxuz' joke still stands
- tyingq 3y agoYou certainly built in a lot of end-user choice for backend storage of the flags, ways to access and change them (jmx, cli, rest), and so on. I read some of the code, and there seems to be an opportunity. I don't see a lot of namespacing. So, for example, you might have a group of services that use the same backend to store flags. A pattern where you have a namespace (appname/service1, appname/service2) tied to get/set would relieve the end user from having to prepend prefixes on every call. I see something like that in your redis client...a default prefix. But then for some of the other backends, there's no similar concept.
- smrtinsert 3y agoThis is absolutely great and can hopefully help kill the need for overpriced 3rd party services.
- jdwyah 3y ago.03 the "overpricedness" of 3rd parties is starting to get better. I've started https://prefab.cloud/features/feature-flags/ https://prefab.cloud/features/feature-flags/ due to my frustrations with overpriced seat-based solutions. I'd be curious if you think this ~$1/pod pricing feels fair.
- dancemethis 3y agoThis is going to be very confusing, since FF4J already means the Japanese version of Final Fantasy IV on the SNES.
- layer8 3y agoI’m looking forward to the Java products that build in the wrong one by mistake.
- short_sells_poo 3y agoWhile the Venn diagram of anime nerds and programmers has an undeniable overlap, I don't think this should influence naming choices too much.
- sbergot 3y agoSomeone is going to build an SQL engine with zig and call it DBZ.
- layer8 3y agoThere’s already DB Zipper which uses *.dbz as a file extension.
- nullsense 3y agoFinal Fantasy IV Java Edition would be a pretty wild guess by anyone's standards. I certainly wouldn't have thought of it, and I'm an ex-java developer who speaks Japanese and was extremely fond of FF4.
- emaginniss 3y agoI know! I was so confused that I tried downloading it and playing and it wouldn't work. I've been in a spiral all day.
- groestl 3y agoAnybody who has looked at it in depth: does it support gradual rollout via consistent hashes?
- Pet_Ant 3y agoWhat does this mean? Is it setting the flags at runtime without a new build artifact (ie shame binary hash)?
- jdwyah 3y agoI believe he means doing a rollout to 30% of users and having that be consistent, so that the same 30% of users are always in the flag, not just 30% of evaluations. This is typically achieved by hashing the flag+userId, converting to an integer and dividing by Max.integer. I see https://github.com/ff4j/ff4j/blob/main/ff4j-core/src/main/java/org/ff4j/strategy/PonderationStrategy.java https://github.com/ff4j/ff4j/blob/main/ff4j-core/src/main/ja... which looks like a rollout for 30% of evaluations but I don't see what you're looking for. I may well be looking in the wrong spot.
- groestl 3y ago> I believe he means doing a rollout to 30% of users and having that be consistent Exactly. Also, not only shall the evaluation be consistent for a specific percentage and userId, but also, when increasing the percentage, an enabled feature shall never be retracted for a user which had the feature enabled before. userId could also be IPs, country codes, worker nodes etc etc.
- jdwyah 3y agoyeah, "an enabled feature shall never be retracted for a user which had the feature enabled before" is extra spicy and requires a different architecture entirely, since you fundamentally need to store the evaluation for each user and check before you return a value. Definitely something to use with caution in my experience, since the performance profile is very different.
- styren 3y agoWe've been using Togglz (https://www.togglz.org/ https://www.togglz.org/) and have had no issues so far. FF4J does seem to be a bit more feature rich though.
- campfireman 3y agoWe recently switched from ff4j to togglz and are very happy with the choice. ff4j's audit feature was buggy and caused our database to run full with entries: Togglz' simplicity is a feature I guess :) Added plus: Togglz is maintained by people from my corp.
- brightball 3y agoI've been interested in trying Unleash. Looks like a very polished, cross language option that appears to directly integrate with Gitlab too. https://www.getunleash.io/ https://www.getunleash.io/
- monknomo 3y agoI use unleash pretty heavily and it works well
- jdwyah 3y agoI just put together a comparison yesterday of some tools and I found unleash to be more unwieldy than I expected. I wanted to set the result to a specific value for a shared segment and couldn't do it. For some reason the overrides didn't let me use a segment. Was I doing it wrong?
- victor106 3y agodoes it support Spring?
- nprateem 3y agoHaving recently kind of abandoned golang for Java, I've got to say I love the richness of the Spring ecosystem.
- lbhdc 3y agoWhat made you switch?
- nprateem 3y agoI want to create a load of rapid prototypes. With Go it seemed I was wading through treacle just to create a DB-backed REST server that basically just permitted CRUD on the DB with some extra business logic. With Spring, you just declare a model object and it can infer a data repository with a ton of convention-named query methods, so the number you actually have to write is far fewer. Spring is used by so many people there are loads of good libraries. E.g. I'm just adding permissions, and without needing to hunt around for a compatible library or litter my code with conditionals, it's pretty easy to use Spring Security to configure sane permissions with annotations. With Lombok there's no need to write the garbage you used to have to (loads of getters, setters, etc.) so the code is quite clean. Annotations also simplify DTOs with mappers - in Go I had this triplicate of model struct, DTO and mapper. Maybe there was a library I could have used to help, but the faff around setting up the DB (e.g writing SQL, configuring an ORM), updating DTOs and mappers was just crippling my velocity. Plus, for hiring, there are tons of Java devs around the world, while for Go rates are much higher. So yeah, several factors.
- pcdoodle 3y agoConflicting name with one of my favorite games! Final Fantasy 4 J / Hard Type.
- andreabergia 3y agoWe use it in production at lastminute.com and are pretty happy with it :-)
- tantalor 3y agohttps://github.com/ff4j/ff4j/blob/v1/ff4j-core/src/main/java/org/ff4j/strategy/time/ReleaseDateFlipStrategy.java#L100 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).
- furstenheim 3y agoUnless you have a legal requirement starting on January the 1st 00:00
- r4um 3y agoAgreed. Problem isn’t timed rollout but lack of automated rollback. If you don’t have one don’t do this. The automated rollback should look for acceptable error rates, latency etc.
- agilob 3y agoUh 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/ https://www.quartz-scheduler.org/
- digging 3y agoHuh, I've been using this in production for years. Given my company's choices, I just assumed it was pretty well known & standard. Overall it's pretty nice, although I've run into a critical error a couple times which rendered a flag untouchable.
- wdb 3y agoWould be nice when it supports the OpenFeature spec
- Pet_Ant 3y ago...do we know that it doesn't?
- David_Axelrod 3y agoGrowthbook has a better UI and is more fully featured. They also have a java SDK https://docs.growthbook.io/lib/java https://docs.growthbook.io/lib/java
- elischleifer 3y agoFeels like after the log4j situation - the naming convention of XforJ would be a bad omen.
- dylan604 3y agomy thoughts exactly. i came here to see if this was another vuln being discovered in the wild specifically because of the name.
- the_doctah 3y agoThis is an old product, what is the point of randomly posting a GitHub repo on HackerNews?