> Small responses, think an easily parseable binary blob is best for > these devices. JSON is pretty far from that.
Actually _rewrite as a function plus subsequent _update solves this more or less effectively. Rewrite middleware can receive/reformat any data and then send json to proper _update, which saves result. Or save without using _update. Scheme isn’t blazingly fast, however it imposes surprisingly low penalties even on lean IoT devices. Invaluable advantage of this scheme is deployment speed. Sensors or other mesh endpoints may undergo firmware upgrade, which sometimes means changes in data format. Also you may want to add new types of sensors, and so on. Deploying updated middleware across all mesh Couch aggregators, without any need to stop services, in seconds, shouldn’t be undervalued. > Finally, request-response model ... isn't really suitable for IOT. For a given nw the choice between MQTT vs WS vs HTTP/2 vs HTTP vs HTTPS seem to depend mostly on the size of a packet transmitted and guarantees required. ermouth