Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WebUI: Use websockets instead of http polling/API #52

Open
kripton opened this issue Jul 17, 2022 · 3 comments
Open

WebUI: Use websockets instead of http polling/API #52

kripton opened this issue Jul 17, 2022 · 3 comments
Labels
enhancement New feature or request javascript Pull requests that update Javascript code

Comments

@kripton
Copy link
Member

kripton commented Jul 17, 2022

Currently the Web UI uses HTTP call to the device's API to get/update information like device status, buffer content (Console page), log entries, wireless status counters. Usually, a one second update polling interval is being used which makes the Console seem laggy when the values update often or fade. Websockets provide a nice way to make the Web UI more responsive and faster. Some "live audio mixers" that can be controlled via web browser from a tablet or similar uss websockets for control and signal level display (Soundcraft's Ui series).
The client/browser part should not be a problem (and a fallback to polling could be done if the user-agent doesn't support websockets). On the server side (lwIP stack and its http server) impementation will be quite some effort.

@kripton kripton added enhancement New feature or request javascript Pull requests that update Javascript code labels Jul 17, 2022
@peternewman
Copy link
Member

It would be nice to keep a basic JSON API too if possible if it doesn't add too much codespace, as that's much easier for people just hacking around with the board wanting random integration. Although I appreciate it's probably not the best way to e.g. send DMX data to it.

@kripton
Copy link
Member Author

kripton commented Aug 17, 2022

Yes, the JSON API is meant to stay, even if websockets are implemented for exactly the reasons you mentioned :)
The "CGI" approach offered by lwIP's web server is a bit awkward and bloats the code a bit but I agree that using curl or wget for simple commands is a big advantage.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

2 participants