Suppose your next big challenge is giving some important prospect customer a feeling of how the big data coming from his products will translate into a modern and responsive UI on the Web. This is what’s happening daily to many of us working in the embedded electronics systems design industry, and after a few iteration using several different strategies (drawing with LibreOffice included) we now find Node-RED as a Docker container as the definitive recipe for success.
Node-RED as a messaging + logics + UI solution for the Web solves a lot of architectural problems in elegant ways, but I agree it may not be the best solution for the real product based on the actual requirements, environment, scaling needs and many other factors. It gives however big advantages in the prototyping stage and has no rivals for showing some amazing user story, simulating situations and producing interfaces.
Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways (IBM Emerging Technologies).
Node-RED tranforms messages and creates output from an information flow. The output can be more messages or Web pages. An important part of Node-RED from this point of view is the availablity of libraries for rendering charts, gauges, graphical switches and other UI building blocks. Simple but effective, extensible to almost anything and closely integrated in the graphical editor.
When building a prototype of a dynamic Web site that will (when coming to a real product) show views of information collected from devices located anywhere and connected to the Internet (do Internet of Things, Big Data Analytics and Predictive Maintanance sound familiar?) the ability to simulate some interesting behaviour of the devices originating data is almost as much important as the rendering is. Node-RED excels in this and gives full power to the developer to change and add features in minutes while keeping consistent and attractive, responsive Web views.
do Internet of Things, Big Data Analytics and Predictive Maintanance sound familiar?
The typical workflow for developing a prototype that will be used as a demo or for getting screenshots to be included in a quotation is:
The error to be avoided here is to let the client believe that this presentation of a Web product will magically evolve to the real one by cycling again with similar efforts. Robustness, resilience, scaling, continuity, security, cloning (DevOps stuff) is something very serious that must be built on top of all the demo oriented features, again based on Node-RED if this is the right tool.
Robustness, resilience, scaling, continuity, security, cloning is something very serious.
Here comes Docker as the way for starting and porting a consistent self-enclosed Node-RED prototype between hosts. Again no details given here, so many developers today use Docker and the related services like docker-compose, Consul and Registrator for microservices orchestration.
The idea is to prepare a simple recipe for starting at least one Node-RED service paired to one messaging broker for an easy and fast simulation of messages flowing between devices, adding more microservices while evolving to more complex situations. Everything enclosed and self described as a set of Docker containers to be started based on a docker-compose recipe. Simple, extensible and easy to be scaled on a developer host.
So here is my proposed solution that fits the mentioned requirements, as usual based on works and comments found googling around and documented as a Github project. Feel free to post comments or open issues and contribute to the recipe!