Skip to content
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

Implement Real Time flags #18

Closed
matthewelwell opened this issue May 24, 2023 · 6 comments · Fixed by #21 or #28
Closed

Implement Real Time flags #18

matthewelwell opened this issue May 24, 2023 · 6 comments · Fixed by #21 or #28

Comments

@matthewelwell
Copy link
Contributor

As per the JS SDK here: https://github.com/Flagsmith/flagsmith-js-client/blob/d85456e9a2c047665a58a782bed921a5a631b138/flagsmith-core.ts#L373

@gazreese
Copy link
Collaborator

gazreese commented Jul 8, 2023

So it looks I'll be doing the following to achieve this:

  • customer sets a 'realtime' flag on the SDK on construction
  • if set I'll set up a websocket to listen for events from your event source, which seem to be just timestamps for the last updated flags
  • I'll expose either a Flow<List> or LiveData<List> for the customer to be able to receive flag updates in an Android-esque way

If any of the above doesn't sound right @matthewelwell please let me know

@matthewelwell
Copy link
Contributor Author

So it looks I'll be doing the following to achieve this:

  • customer sets a 'realtime' flag on the SDK on construction
  • if set I'll set up a websocket to listen for events from your event source, which seem to be just timestamps for the last updated flags
  • I'll expose either a Flow or LiveData for the customer to be able to receive flag updates in an Android-esque way

If any of the above doesn't sound right @matthewelwell please let me know

@gazreese yes, this all sounds correct.

I just want to clarify one thing, however, since the terminology can get confusing.

  • customer sets a 'realtime' flag on the SDK on construction

Do you mean here that we will add a new argument to the Flagsmith SDK constructor called realtime, or by 'flag' do you mean the flag entity in Flagsmith?

To keep parity with the JS client for now, my preference is for the former, but certainly in the future, being able to provide a list of flags that should be enabled for realtime would probably be useful. For now, handling that in the customer's own logic via the Flow<List> or LiveData<List> should suffice.

@gazreese
Copy link
Collaborator

Yes the former @matthewelwell 👍

@matthewelwell
Copy link
Contributor Author

Requirements have been added in a bit more detail to the parent issue here.

@flopshot
Copy link

flopshot commented Nov 16, 2023

Does this mean that the android SDK is in feature parity with JS sdk, as of 1.3.0?
My company is asking me to investigate Firebase alternatives for Android.
Specifically realtime publisher updates whenever the config changes remotely.
I'd like to know if this is something that can be used within the next week or so

@dabeeeenster
Copy link

There are affordances with the JS SDK that arent possible in the Android one, but we do have good support for all Flagsmith features within the Kotlin SDK yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants