How should this be implemented?
- User has a USB device (“doorbell”) attached to their machine.
- User goes to the client’s web page and clicks a link.
- A notification appears “Please press the doorbell.”
- User presses doorbell, website is notified.
The “doorbell” is actually a complex device with its own SDK, and it’s sending back a big blob of data. The device manufacturer provides SDKs for both Windows and OSX. I can write native code for either platform to interact with the device at the OS level.
Plan A
LocalWatchdogprocess runs on the user’s machine.- Browser plugin catches the webpage event
- Browser plugin does something (using NPAPI?) to signal
LocalWatchdog LocalWatchdogpops the notification & gets the doorbell-press eventLocalWatchdogdoes something to tell the plugin that the doorbell has been pressed.- The plugin tells the website.
Plan B
- The website downloads a Java applet which runs locally on the user’s machine.
- The applet pops the notification.
- The applet does something to catch the doorbell-press event.
- The applet tells the website the doorbell has been pressed.
Other plans welcomed, but in any case, what are the somethings?
- Any language is acceptable.
- Non-trivial installation process is acceptable.
- Must run on OSX and Windows. If I have to write it twice, I will.
- Must run with Chrome, Firefox, and IE. If I have to write it three times, I will.
If you have a local process, I’d say: