From the Trenches: Making an IoT Platform Work with ESP8266 and CC3200
blog.cesanta.com
blog.cesanta.com
The full docs are https://www.cesanta.com/developer/smartjs (linked from the github repo).
TL;DR: two pieces: multiplatform firmware focusing very small embedded devices + hosted services that help you build your IoT solution.
---
The Smart.js firmware implements a bunch of networking protocols and a JavaScript interpreter that fits in <1KB of ram.
> Is it a web server/protocol ? Is it some other kind of control layer We do provide a JSON+WebSocket based protocol and some tooling around it that help you build applications. It's designed to play nicely with devices that are not always online (e.g. power saving) and that might often change network.
However Smart.js it's not only that. You can use plain HTTP and plain WebSockets and (soon) MQTT and connect your device with whatever is the rest of your stack.
> What data does it deal with, etc. We also offer a hosted service that can collect metrics, store logs, do pubsub messaging and perform unattended OTA updates of your firmware.
The protocols: HTTP, WebSockets, MQTT are pretty standard now. What is their relationship with Smart.js? Why e.g. are Arduino libs not used?
For high-level system design, Node-Red seems to gain traction, what is the difference between Node-Red and Smart.js ?
- V7: a small portable JS VM (https://github.com/cesanta/v7) - mongoose: a portable async multiprotocol networking library (https://github.com/cesanta/mongoose)
Both of those projects are independent and have some traction on their own; but you're right that we should make it more explicit. Mongoose is out there since 2004 and is a quite popular embedded http server. We added many other protocols to it, including also COAP and DNS.
Arduino libs are not used because they are not async and not portable.
Honestly I don't know about node-red, sounds interesting; however node's V8 VM is too heavyweight for the smallest devices we aim to support. Smart.js does expose a nodejs-compatible core API wherever possible, so it might be possible to port node-red to it.