One key thing for Debug-berry is the ability to stream terminal inputs & outputs to web brower. Streaming data from a client to a web server and then to a browser can be achieved through several mechanisms. Here's a brief overview of some popular methods:
TLDR: MQTT over WebSocket's will be best option.
- HTTP Long Polling:
- The client sends a request to the server.
- The server holds the request open until new data is available.
- Once the data is available, the server responds to the request.
- The client then immediately sends another request, and the process repeats.
- WebSockets provide a full-duplex communication channel over a single, long-lived connection.
- Once a WebSocket connection is established, data can be sent in both directions (from client to server and vice versa) as "frames" without the overhead of re-establishing a connection.
- It is ideal for real-time applications such as chat apps, online gaming, and live sports updates.
3. HTTP/2 Server Push:
- With HTTP/2, the server can send multiple responses for a single client request.
- This can be used to "push" resources to the client proactively, without the client explicitly asking for them.
- While not strictly for "streaming" in the traditional sense, it can be used to optimize the loading of web pages by preemptively sending resources the client will need.
4. MQTT over WebSockets:
- MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol for small sensors and mobile devices.
- While it's not strictly a web technology, it can be used over WebSockets to provide real-time updates in web applications.
Out of all these options, I want to pick something that is easy to implement, lightweight, and reliable. Also, ability to log the data will be important.