eduvpn / eduvpn-common

Code to be shared between eduVPN clients
MIT License
5 stars 3 forks source link

V2: Should discovery have a `local` argument to force the cache? #19

Open jwijenbergh opened 1 year ago

jwijenbergh commented 1 year ago

Problem:

getting disco servers/organizations can be slow due to the discovery server or the users network being slow. Even though we have a timeout and a cookie, it might be nice to introduce a local/cache argument to the functions

If non-zero/true this means that only the cached copy is returned. Clients can thus first call the functions with true and then asynchronously call it with false to get the most up to date copy.

This is right now the most problematic on startup where clients have no discovery cache filled

rozmansi commented 1 year ago

The discovery cache is initially prefilled at compile time, right? So, even on initial startup eduvpn-common should have discovery cached.

jwijenbergh commented 1 year ago

The discovery cache is initially prefilled at compile time, right? So, even on initial startup eduvpn-common should have discovery cached.

This is true but it still tries to get it from the network (if they should be updated as deemed by the common lib). If you have a slow connection it only falls back to the cache after the HTTP timeout, which may be a problem?

jwijenbergh commented 3 months ago

Didn't get a lot of +1s from the team

jwijenbergh commented 3 weeks ago

discussed with roop