3 ms·
> You have the assumption that "Talking to hardware" necessarily involves dealing directly with binary protocols. I wouldn't say that it necessarily involves d
by cbsmith 13y ago
> You have the assumption that "Talking to hardware" necessarily involves dealing directly with binary protocols.
I wouldn't say that it necessarily involves dealing directly with binary protocols, but the issue tends to come up. Particularly when talking with hardware that can't just easily be upgraded, you often find that even "text" based protocols might require some manipulation at the byte level in order to decode them successfully.
But really, the binary protocol aspect was just a really obvious and simple example of the larger "square peg, round hole" aspect of using JavaScript for the task. Maybe JavaScript makes working with hardware more accessible than other choices, but I doubt it.
> why wouldn't you do the binary protocol stuff in a C module and expose a nice easy api in the scripting language as is the usual practice?
I'd argue once you've done that, you're done. The hard part about the "internet of things" is that devices generally don't have a nice clean API's, and that's what needs to change.
Once you have a nice API, you can embed a JVM in their quite cheaply and then support almost any language web developers might want (including JavaScript), and quite cheaply and efficiently at that. Better still, just do a simple REST-ful interface and leave it to the developer to do whatever they want.
- TheZenPsycho 13y agoYou have a really incredibly weird definition of "quite cheaply" that I am not familiar with.
- cbsmith 13y agoWell, considering we're talking about a $90 product that already has an ARM Cortex-M processor in it, it seemed it'd be hard to argue with the "quite cheaply" argument: http://www.st.com/web/en/catalog/mmc/FM141/SC1169 http://www.st.com/web/en/catalog/mmc/FM141/SC1169 (particulalry since you can get free samples).
- TheZenPsycho 13y agoa $90 product that you want to ruin by putting the JVM on it.