Reputation: 17718
This question is a bit more unclear than I would normally ask here, but I'm looking for strategies I can look into to solve my problem.
So, we have a set of internal tools that I'm moving and implementing in a webapp on our intranet. Stuff like calculators, production recipes generators, measurement analysis, etc. The web app has worked perfectly for this. The only thing an employee needs to access it is a webbrowser.
My next target are software tools interfacing with hardware. Stuff like measurement tools and machinery control. The current strategy has been to develop a standalone Python/QT application that dumps the measurements on the cloud, and/or provides the control UI. But I want to move some of these to the web app as well.
Thankfully it seems like there is some experimental support for Serial communication through WASM, at least in Chrome based browsers, which is fine for us. It's just for internal use and almost everyone already has at least Edge installed.
However, not all devices communicate through serial. For example the measurement equipment often use NI-VISA through USB. So I'll most certainly still have the need for a local process running on the PC itself.
So, the strategy I'm thinking off is having a local app that acts as a hardware driver and provides an API that the WASM application running in the browser can access directly, without going through a central server. The webapp frontend then has access to this API and is able to interface with the hardware.
The reason I want to move these to the webapp is because I'm then able to better integrate these tools together. For example, the production recipes generators are able to push instructions directly to the machines without the user having to copy paste anything. Measurement and analysis can happen on the same UI.
So have any of you ever interfaced with hardware from WASM? Or with a local process? Or will this be impossible thanks to WASM's sandboxing?
Upvotes: 0
Views: 1344
Reputation: 1579
In the WebExtensions there is a native messaging concept that does nearly what you want:
Content Script <----> Extension <--native messaging--> Native App
For communicating with an installed extension see this question.
Upvotes: 0