I am currently checking the possibilities of developing creative, electronic musical instruments where (starting with two) people can interact remoteley. No audiostream, sound is generated locally in a Teensy synthesizer, only small amounts of metadata has to be transferred.
My first attempts to connect two ESP32 talking to each other has been successful. I checked the roundtrip latencies (sending one character) and was wondering:
In my local WiFi I get 10-20ms, rarely 60-80ms
Connected to my smartphone or at another place I get 80-100, sometimes 160ms - this would be fine - but rarely (maybe every 5s or so on average) there are single peaks of 600ms up to 2000 or even 5000ms. This would be really disturbing the experience.
As I am new to ESP32 and husarnet I don’t know if in my program there is something causing this - but in theory in this case this should happen in the local WiFi, too, shouldn’t it?
Is this simply the limit of “the internet” and do I have to deal with it, or am I missing something?
Thanks for any insights.
Edit: Possibly I get a lot of jitter in the latency from the WiFi. I will check next ethernet (wired LAN) to get an impression of this factor.