Introduction
I own an Internet-enabled digital scale for weighing myself and measuring my impedance.Architecture
Functional Requirements (FR):- I wish to store a backup of my scale measurements, for my own purposes
- however, scale measurements must continue to be reported to the official website
- needs to use Java (because that's what I do)
- the scale receiver uses a simple unencrypted proprietary protocol
- the program receiving data from the scale receiver can handle raw sockets (related to previous point)
- must scale easily
- must not cost any money (until a certain threshold of users is reached, obviously)
- must provide decent monitoring
- needs to have an extremely low amount of maintenance
- must be able to easily create/upgrade/extend the part that uses those measurements for stuff, without disrupting the core functionality of receiving measurements
- needs to have the Cool Tech Factor™
- Google App Engine (NFR 1, 4, 5, 6, 7, 8 but fails 2 and 3, definitely allows for NFR 9)
- a simple socket server, receives measurements, sends them on to Google App Engine and the original website (NFR 2, 3, 5, 7, might fail 4 and 8, but perhaps not if we keep the amount of actual work done by the simple socket server to a minimum, definitely fails NFR 9)
Implementation
The "Daemon3" sends the results to the Google App Engine2, using a Java library1 to make a HTTP POST request.Example of Use
In the upper-right corner of my blog, my current weight is visible. It is a first example of what is possible.I am planning on providing, on my blog, a complete graph of my weight over time. Stay tuned.
For the "Daemon" in the picture, that is the socketproxy server I made first. See [3].
References
- [1] Apache HTTP Components
- https://hc.apache.org/
- [2] Google App Engine
- https://developers.google.com/appengine
- [3] SocketProxy Server
- http://randomthoughtsonjavaprogramming.blogspot.nl/2014/03/socketproxyserver.html