Skip to content

Websocket ingress identification in Dashboard #1342

@tkurki

Description

@tkurki

For ws connections that send data to the server the dashboard shows delta statistics, just like for connections configured explicitly at the server. One fundamental difference is that the server's connections have an explicit id, while ws connections are now identified by either

  • clientId originally provided by ws client in access request (security on), essentially a random string, prefixed with ws.
  • just the string wsws on a server with security off - and with a single line showing total for all ws clients that produce data
  • probably not used much, but the username of an authenticated ws connection, not originated from an access request, prefixed with ws.

This is pretty confusing and not very useful: the user sees just random uuids from for example SensESP sensors.

Instead we could show a separate line for each ws connection that is producing data. If the connection is authenticated with a token originating from an access request we either show the description included in the original access request inline / on hover and / or provide a link to the device in the Devices page.

https://github.com/SignalK/SensESP/blob/0b6b067c498e4389bd0db82308c7b080d6c19f83/src/net/ws_client.cpp#L365-L372

Current deltastatistics implementation never evicts anything. If we do this a ws connection's statistics should be removed on disconnect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions