I'm working on an application that sends data to browser clients which will execute some computation and send me back the result. I need a criterion to decide how much data I can send to the browsers. To do so I thought about inspecting the CPU of the clients and send the job according to the underlying capacity of the machine. The problem is that through the browser (JavaScript) it's impossible (as far as I know) to get the specs of the machine. The first question is: is there a way to inspect the specs of a machine through the browser?
Since I couldn't find a solution (i.e. there is no way a priori to know how much a browser can stand), I am trying to auto-benchmark my application by computing the throughput of the browser (i.e. I send "1 job per second" and see is the throughput is "1 result per second"). I could add more WebWorkers to the browser to parallelise the execution, but at some point, given the limitation of the hardware, adding more will not help. When I hit the upper bound (i.e. by adding more WebWorkers the throughput doesn't increase) I know I hit the limit of the machine. Do you guys know if there is a better way to do what I'm trying to do?
Thanks