...modifying the html example that comes with the download... and it produced about every 17 milliseconds an event...
var ts = Date.now();
function setTextColor(picker) {
var newTs = Date.now();
console.log(newTs - ts); ts = newTs;
document.getElementsByTagName('body'
)[0].style.color = '#' + picker.toString();
}
Instead of talking to the console, it would be talking to Espruino... like in you mock... A socket connection can keep up with more than what AJAX can... but still is a challenge, because it has the unpredictable network delays... The best I got out of an real world app was about what you are looking at: 250ms from one Wifi LAN connected device/browser to another one via an app server/jetty of a different Wifi LAN, and the Wifi LANs connected through the Internet. The app was controlling a pointer in an html page on a mobile device / phone / tablet / desktop / smart tv by an html page on an other mobile device / phone / tablet. It was at a time when Bayeux Protocol, CometD, and Long Polling were the only things that worked cross platforms (cross platform in regard of Browser and underlaying OS). Server side there were not many options yet, but jetty was pretty good at it.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
...modifying the html example that comes with the download... and it produced about every 17 milliseconds an event...
Instead of talking to the console, it would be talking to Espruino... like in you mock... A socket connection can keep up with more than what AJAX can... but still is a challenge, because it has the unpredictable network delays... The best I got out of an real world app was about what you are looking at: 250ms from one Wifi LAN connected device/browser to another one via an app server/jetty of a different Wifi LAN, and the Wifi LANs connected through the Internet. The app was controlling a pointer in an html page on a mobile device / phone / tablet / desktop / smart tv by an html page on an other mobile device / phone / tablet. It was at a time when Bayeux Protocol, CometD, and Long Polling were the only things that worked cross platforms (cross platform in regard of Browser and underlaying OS). Server side there were not many options yet, but jetty was pretty good at it.