We work on a Django app for researchers that manages research data. Upstream of the app itself there are bas scripts that move data around until the app can reach it. (Different deployments of the app use different kinds of upstream scripts).
Now, those scripts produce status information like "Instrument X is down" which users would want to know about. In fact, we'd like to have a status box on the front page showing several of these statuses (so on a good day, you see a row of green lights).
I'm just not sure what the "right" approach would be:
- Scripts write an HTML file which the Django app includes with an iframe
- Scripts write to some other file, which the Django app parses and renders
- Scripts call some web address (eg, example.com/app/status?source=instrumentx&status=down)
Possible downsides, respectively:
- HTML logic gets spread into scripts. Also writing HTML might be hard from a script.
- Having to define and maintain this interface
- As for 2, also potential security issues.
Basically the key issue here is that although the app itself is fairly well defined, it is used in a few different disciplines, and therefore the potential range of "status" information is quite broad and not really explored yet. Hence, well-defined interfaces will likely be inadequate.