-
Notifications
You must be signed in to change notification settings - Fork 1
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
Save IP of autopower client in DB #26
Comments
The main reason was that saving the IP in the DB is redundant and could become outdated. We decided that getting the IP directly from the device in the UI would be a better choice as it's always up to date. |
It would be possible to retrieve the IP like in Lines 359 to 363 in 1911af7
Then save the IP e.g. in Line 338 in 1911af7
|
I'm not entirely sure what would happen to the gRPC connection if the client IP changes. Would it survive the change? Because if not, then I don't see why would need to collect the IP in a server request; we can just get it when the client registers, as it would need to re-register if the IP changes. ... unless, in some magical way I don't understand, the gRPC connection survives the client getting a new IP? |
I believe that currently a client side change would mean that a new connection gets established. |
Somewhat related: why do we send a request to the client in order to get the IP? Why not simply save the IP in the database when the client registers to the server? Sounds like it would be a lot simpler, no?
And if the IP changes, the client would anyway register again to the server I suppose, since changing IP address (almost always) implies we lost network connectivity. Or am I missing something?
Originally posted by @romain-jacob in #24 (comment)
The text was updated successfully, but these errors were encountered: