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

Delegate Communcation Streams #1025

Open
joshmeranda opened this issue Feb 3, 2023 · 3 comments
Open

Delegate Communcation Streams #1025

joshmeranda opened this issue Feb 3, 2023 · 3 comments
Assignees

Comments

@joshmeranda
Copy link
Contributor

joshmeranda commented Feb 3, 2023

Add support for delegate stream communication. Currently only single messages and broadcasts are supported, but streams would be useful when the gateway needs to continuously check the agent for data with minimal network data.

For example, when monitoring the progress of a data import (as in #1014) we currently store the progress of targets on the agent and have to continuously poll the agent to keep the user up-to-date. But a stream would allow the agent to inform the gateway every time there is an update to the target status, which would remove the need for the gateway to check the agent for import status.

@joshmeranda joshmeranda self-assigned this Feb 3, 2023
@kralicky
Copy link
Member

kralicky commented Feb 4, 2023

Can you elaborate a bit on this part? maybe give an example scenario.

when the gateway needs to continuously check the agent for data with minimal network data.

@joshmeranda
Copy link
Contributor Author

Another benefit is avoiding spam gateway logs from the delegate server:

2023-05-04T15:00:13-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:14-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:15-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:15-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:16-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:16-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:17-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:17-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}
2023-05-04T15:00:18-04:00 DEBUG gateway.delegate gateway/delegate.go:91 delegating rpc request {"target": "2a4789ce-737d-4e0f-a92a-7fbc84f91a22", "request": "/remoteread.RemoteReadAgent/GetTargetStatus"}

@kralicky
Copy link
Member

kralicky commented May 4, 2023

Well, I suppose we could just remove that log statement 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants