Close

Client Server communication

A project log for Debug-Berry

Internet controlled raspberry-pi based Serial monitoring, Debugging, OTA, Input/Output, and troubleshooting microcontrollers

kaushlesh-c-kd9vfuKaushlesh C. ( KD9VFU ) 09/05/2023 at 00:180 Comments

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.

  1. 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.

2. WebSocket's:

3. HTTP/2 Server Push:

4. MQTT over WebSockets:

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.

Discussions