tompave / fun_with_flags

Feature Flags/Toggles for Elixir
https://hexdocs.pm/fun_with_flags/FunWithFlags.html
MIT License
1.08k stars 79 forks source link

[Feature Request]: Client SDKs for other languages #183

Closed kasvith closed 1 month ago

kasvith commented 2 months ago

It would be really nice to have SDKs to access feature flags from other languages like Javascript.

So fun_with_flags can be used with React and other frameworks where its necessary expanding the usage of this library

tompave commented 1 month ago

Hey there, thank you for the suggestion.

If you're suggesting to provide libraries for other languages (e.g. JavaScript, Go or Python) to access the flags in the datastores, then I don't think that it's something that I would manage as part of the project. You're welcome to work on them as third party libraries though.

I must caution you that trying to access a package's internal data (by that I mean the FWF flag data stored in Postgres, MySQL or Redis) is inadvisable. Those are internal details, and they can change in the future. They're not part of the package's contract. And even if you decided to do that, in order to make sense of the data you'd have to reimplement FWF's business logic in the new language.

On the other hand, if you're thinking of making FWF expose an API over the network, say, a JSON endpoint over HTTP, with a client to query the endpoint, then that's more reasonable. I still wouldn't add it as part of this package, but rather as a separate extension. For example, it could be similar to FWF.UI and work as a Plug. I have no plans to work on it at the moment, but anyone is welcome to give it a go.