-
Notifications
You must be signed in to change notification settings - Fork 5
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
initialize client with flags from server #489
Comments
Hi @nicksrandall thanks so much for submitting this. It's definitely on our radar and our product team is considering it. Are there any use cases you currently have that are blocked without this? |
It's a performance optimization. Without it our users pay a ~300ms penalty while they wait for the client to load flags. |
Hi @nicksrandall, for sure, definitely understand the need for the lowest latency possible. For DevCycle we'd expect on average a 50ms response time for the JS SDK, unless you were using EdgeDB, which might bring it up to about 100ms. Are you seeing 300ms response times in your testing of the SDK? |
Hey @nicksrandall, chiming in to let you know the team is still looking into this. As Cobi mentioned, we generally expect a lower than 300ms response time for the JS SDK. Are you consistently seeing ~300ms on your end? |
This would help with server-side rendered applications where the first load client-side is always going to return |
@rickyrattlesnake We do have this work in in our roadmap to do, although we do not have a timeline on when it might be completed. |
Hi @rickyrattlesnake @nicksrandall just wanted to let you know that an option to provide a config to the SDK has been added. It's called To make this process easier specifically in Next JS, we've also been working on a native Next JS SDK which is now available in beta: the SDK supports both the pages router and the new App Router, and makes it easy to render content with DevCycle variables on both the server and client. Hopefully these updates can address your needs, and apologies for the delay in getting this ready. If your usecase for SSR does not include Next JS, happy to share more details about how you can set things up in your chosen framework to bootstrap the config. If you get a chance to give these things a try, we'd love to hear any feedback or issues you encounter! |
Just another update to let you know that the Next.js has been fully released out of beta. |
@ajwootto I'm currently using Remix framework (and not Next.js). Can you give some guidance on what needs to be passed to bootstrapConfig? And how I can get that value from the server SDK? |
Hi @nicksrandall sorry to leave you waiting here, I was putting together a guide on how to do this and realized the experience isn't as smooth as it should be still. Working on a few SDK updates that should make it more painless to do bootstrapping in other frameworks, and I'll update here when those are complete. Thanks for your patience. |
@ajwootto any update here? |
Hi @nicksrandall thanks so much for your patience. We've added a new method to the Node.js SDK which can be used to obtain a boostrapping config to pass to the client. There's a new docs page for it describing the process, along with a small Remix example app showing all the pieces working together. Please give it a try with the latest version of the Node SDK and let me know if it works for you. As this is a new feature we'd love to hear any thoughts, feedback or issues you encounter! |
Hey @nicksrandall I'm going to close this now as we've implemented bootstrapping to address this need. Let me know if it ends up working for you and feel free to open again if there are any issues. |
It would be great if I could initialize the client client (haha don't know what else to call it) with flag values that I got from the server.
FWIW, the launch darkly sdk allows you to pass in an option called "bootstrap" which is a list of all flags.
The text was updated successfully, but these errors were encountered: