A side comment: I spotted a new term here.. "Rewrite middleware"
that coupled with the functionality "Deploying updated middleware" .. is a pointer to the beauty of the mysterious CouchDB design documents. CouchDB allows for the deployment of advanced "middleware" including API modifications, data formatting in and out of the DB. Deployment of software written in JS for CouchDB is as easy and robust as replicating data. Johs > On 14 Jul 2019, at 03:46, ermouth <ermo...@gmail.com> wrote: > >> 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