Open mzzsfy opened 9 months ago
Another option is to use server-sent events.
Another option is to use server-sent events.
good idea,use server-sent events changes much less than long polling
The server does not have multiple sets of time.Tick
Statsviz uses a single timer. How would that change with any other solution? Unless I'm missing something you will still send stats at a given frequency, and you need a timer for that?
Can't you circumvent CDN restrictions by using a proxy?
Another option is to use server-sent events.
Server side events are a solution but they're one way only iirc, which would work with the current feature set but would prevent potential features we have in mind.
Statsviz uses a single timer. How would that change with any other solution? Unless I'm missing something you will still send stats at a given frequency, and you need a timer for that?
When I open multiple pages, the custom indicator is called multiple times per second, which causes errors in some of my statistics. Using other solutions has nothing to do with this. Maybe I should open a separate issue.
Can't you circumvent CDN restrictions by using a proxy?
I don't have that access.
Server side events are a solution but they're one way only iirc, which would work with the current feature set but would prevent potential features we have in mind.
Can you give an example? If the client needs to send data, it can be solved through a new request.
If the client needs to send data, it can be solved through a new request.
That's what I think, too.
My main reason for wanting that improvement is to avoid dependency on github.com/gorilla/websocket
.
Can you give an example? If the client needs to send data, it can be solved through a new request
I'm thinking if the browser needs to send data to statsviz. For now it doesn't need to but SSE are a one way street (app->browser)
the custom indicator is called multiple times per second
What custom indicator?
What custom indicator?
userPlots statsviz.TimeSeries.GetValue is called multiple times per second
What custom indicator?
userPlots statsviz.TimeSeries.GetValue is called multiple times per second
Uhm ok that's not normal. Could you please open an issue for this? And post a simple reproducer if you can?
userPlots statsviz.TimeSeries.GetValue is called multiple times per second
Uhm ok that's not normal. Could you please open an issue for this? And post a simple reproducer if you can?
Open 2 web pages and you can see the phenomenon . I'll create a new issue
If you use long polling, you will have the following advantages: better compatibility The server does not have multiple sets of time.Tick Have smaller dependencies