> Measuring a sensor is so complicated
Well, you need something to ingest & query the data. InfluxDB or Prometheus is a good choice.
You need something compatible to display it. Grafana is perfect for that.
Docker is a pretty simple and decently-lightweight choice to standardize how this installs and runs.
And letting it run on a Pi makes it cheap and accessible.
What exactly is the problem with this setup? Not enough NIH?
> Measuring a sensor is so complicated...
I get the sarcasm, but sometimes it is useful to exercise "big boy" tools for projects that don't need it.What better way is there to learn/explore these things than with a very simple project that does something remotely interesting or useful?
I read that as "big boy stools".
Edit: current real-life example: I am currently developing a core tool for helping business users of a big industrial group. Client is amazed I was able to quickly develop a custom tool to answer their business needs. Code repo: 3 files: one HTML page, one vanilla JS file (less than a thousand lines), one lib to open XLSX files in JS.
That said, sometimes you need/want to pick up some skills. I think it's good to do these on tractable problems that one can imagine scaling up smoothly, like this one. It's better than overly simple "hello world" and also better than trying to learn from a project where the technology is appropriately scaled and it would take weeks just to figure out what's going on.
https://github.com/mschaef/metlog
There are reasons I made the choices I did, and I think they still make sense, but there's been enough of various sorts of implementation pain that I am absolutely sympathetic to the idea that this person used some off the shelf software.
You should probably be more aware of your target's constraints and goals before you start questioning the means they used to achieve them.
https://github.com/mschaef/metlog
This was mainly an exploratory thing to learn some new technologies, but the gist is that it's a Clojure/Clojurescript application with HSQLDB on the back end. It runs reliably and has for years, but the more 'roll your own' experience means continually finding out that there's some other bit of missing functionality you either need to implement or live without.
A couple specific observations on various elements of the tech stack:
* HSQLDB - Nice little database, well documented, and has served its purpose well. Just now getting to the point where query lengths on long running time series are a performance issue. I think my mitigation strategy will be to do more in memory.
* core.async - I use this in the front end to manage sourcing data from the server and getting it into the graphing components. Three or four different approaches later, I'm still not sure I fully get how or why this should be used.
* Reagent - Definitely the right choice. About the perfect level of abstraction. Wish I'd spent a bit more time reading the docs ahead of time, though.
* Clojure - This has been a great choice, but to be honest, there's not much code on the server side, so it's not at all heavily used.
* ClojureScript - Also a good choice (Figwheelr helps), but it's fundamentally a different language with different core data structures sitting in a land that's solidly entrenched in JavaScript. That impedence mismatch is a continual low grade annoyance.
* HTML Canvas - Easy to use, but lots of tricky little edge cases to worry about. (The latest being how to find a way to get non-blurry pixel accurate display on a Retina laptop.)
The general idea was that in steady-state operation, the only thing that should really be seen is the data of interest.
Honestly, the thing that's been the most time-consuming is getting data transported efficiently and quickly to the front end for rendering. The rendering itself hasn't been a huge deal, and is essentially the one part of the system where I haven't thought seriously about replacing it with something 'real'.
(The stripchart plot code itself is here, and I haven't touched it in three years. https://github.com/mschaef/metlog/blob/master/metlog-vault/s... )