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

SPIKE: Re-address stateful routing for selecting QA server #600

Open
theNerd247 opened this issue Nov 29, 2023 · 0 comments
Open

SPIKE: Re-address stateful routing for selecting QA server #600

theNerd247 opened this issue Nov 29, 2023 · 0 comments
Labels
question Further information is requested

Comments

@theNerd247
Copy link
Contributor

Problem Statement
#251 was solved using #264 wherein the routing system provided by nextjs made it difficult to pass query parameters around. The solution to work around this (the marshaling of query parameters) involves using localstorage to statefully route the user to the correct page. This may be the cause of issues such as #548 (and potentially other undiscovered issues). Further, having statefull
routing makes it difficult to know which server is being used during debugging - this approach to routing is not intuitive and another developer needed clarification. I personally ran into this issue even when I had set an environment variable to force the app to use a particular server.

Proposed Solution
Implement the logic of the router to be stateless. The benefits are two fold:

  • better cross-browser support (we don't need to depend on different ways browsers implement their caching)
  • more intuitive routing (user's have a straight forward way to know which server is being pointed towards)
  • easier debugging

Details
I suggest the following investigations/ideas:

  • the use cases behind switching servers (e.g. do we need to switch between qa and production servers at runtime or can we implement this as environment variables or initialization config?)
  • investigate the nextjs routing problem (outlined in fix typo #258)
  • use a different mechanism other than query parameters?
@theNerd247 theNerd247 added the question Further information is requested label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant