-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offline mode in server side SDKs #2024
Comments
This logic has been implemented already in the client side JS SDK but here we're specifying that we only want to add it to the server side SDKs. The question, I guess, is whether we want to implement this in more SDKs than server side SDKs. Would this functionality be useful for e.g. Kotlin, Swift, Flutter? Related issue #1655 |
Once question here is whether, for server side SDKs, they should be able to handle segmentation as well in offline mode. I would argue that they should be able to. This would mean that this change could simply be that the environment document should be able to be read from the file system, rather than only from the API. Thoughts @khvn26 @gagantrivedi @dabeeeenster ? |
Yep this seems like a simple approach that would work |
2 implementation approaches here: Flagsmith/flagsmith-python-client#50 I think the single client class is slightly neater, but does technically break certain software engineering rules about only having a single purpose. A lot of the arguments passed to the constructor become redundant when using offline mode. There is perhaps an argument to say, however, that the offline handler shouldn't be restricted to 'offline mode' and that it should be possible to use it instead of the default handler. In which case, the single client class is certainly the correct approach. |
How about making |
Python reference implementation is here: Flagsmith/flagsmith-python-client#50 |
@novakzaballa @gagantrivedi @zachaysan can you add the docs for the SDKs that you worked on for this. Reference PR for the docs is here. |
@matthewelwell Added the ruby ones in this PR: #3677 |
This is now complete in all repositories except Elixir. I have created a separate issue in the repository here. |
Each of the Flagsmith server side SDKs should offer a way to have them function in 'offline mode'. By providing a JSON document of flags / an environment, the SDK should behave exactly as it does in local evaluation mode, however, using the static JSON document that should be bundled in the SDK itself.
This will need to be implemented in all of our serverside SDKs.
To implement:
The text was updated successfully, but these errors were encountered: