This fog computing recipe shows how several different types of systems can be brought together to work as one. In this recipe, we showed the device code that grabs a video stream from a different system, perform a compute on it, and then passes it along to another system. Our final system in this case is a web application.
For different systems to communicate, there needs to be centralized state management. In this recipe, we used Flask and Redis. Every machine on our cluster registers its state and capabilities every 10 minutes. This allows the other machines to utilize machines that are on a network, thereby not bottlenecking on one machine. When a new machine comes online, it simply registers its state with our state server; as long as it keeps broadcasting, it is available to use.