https://www.growthbook.io/ logo
f

faint-portugal-8257

04/28/2022, 2:01 AM
If I'm using the JS React Library, and a backend library like Kotlin or Python, is there a way to sync the browser plugin's variant selection tool to the backend growthbook sdk as well
Is there a best practice for syncing growthbook variants between JS and Server SDKs?
We're currently assuming that if the session IDs are shared and therefore equal, the hashing to determine variants will end up producing equal variant assignments.
f

fresh-football-47124

04/28/2022, 2:07 AM
hi
👋 1
yes, the hashing algorithm is the same across all our SDKs
f

faint-portugal-8257

04/28/2022, 2:09 AM
Hello! Excellent, that makes sense. Should we expect identifier to act as a seed then, and get identical intial variant assignments in browser and server side?
f

fresh-football-47124

04/28/2022, 2:10 AM
most dont bother syncing and just do the variation assignment again. The experiment report will take care of dupes
yes, it uses deterministic hashing
🙌 1
f

faint-portugal-8257

04/28/2022, 2:12 AM
Great! Any insight into how the browser extension works? Obviously out of the box I wouldn't expect it to also be able to toggle the server's feature flag assignments. But is there a way to force a variant on the server?
f

fresh-football-47124

04/28/2022, 2:14 AM
The chrome extension only works with front-end SDKs right now. What server language are you using? Some of the server SDKs have other ways to force feature values
f

faint-portugal-8257

04/28/2022, 2:14 AM
We've repurposed the Koltin Android library for use in a Spring Boot app
f

fresh-football-47124

04/28/2022, 2:18 AM
There's a setForcedVariations method that takes a HashMap for the Kotlin SDK
f

faint-portugal-8257

04/28/2022, 2:19 AM
Excellent, I see it in there. Thanks for the help! Will build out something to allow easy switching on our side.