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

Revise WebSocket protocol #7

Open
rgov opened this issue Jul 22, 2022 · 0 comments
Open

Revise WebSocket protocol #7

rgov opened this issue Jul 22, 2022 · 0 comments

Comments

@rgov
Copy link
Member

rgov commented Jul 22, 2022

Before we add any significant new features, it would be beneficial to revise the protocol for communication with the ICS to address some shortcomings. For example:

  • It both uses separate namespaces for port/stbd/pilot and separate events (COVP vs COVS vs COPL).
  • It uses a command name field within the event, which requires a second layer of dispatch on the server side.
  • It uses obscure abbreviated command codes like TS for zoomNearOneStop, and a generic value field, which make the API inscrutable.
  • It is unclear which commands require the active camera as a parameter because it is sent with every message. (Perhaps it is always required, but IMHO it should be explicit, not implicitly added at the "presentation layer" or whatever that would be called.)

Also, Socket.IO is not really needed because WebSockets are widely supported now, and its behaviors like HTTP long-polling fallback have been vexing in the past.

Currently, the ICS itself is not easily refactored to handle different message structures. In preparation for an improvement, however, we could have the Observer UI code call into a library that translates to the existing protocol, then we can migrate it piecemeal.

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

No branches or pull requests

1 participant