There are three main reasons for this design.
1. Allows us to independently control how often each data source is updated.
2. The latest data is already available when the consolidator tries to get it. If the gathering scripts and consolidator script were in one big script it would take longer to generate each message. The image above shows how long it takes to get our bus data. By having the data gatherer separate in this case we save upto 2.5 secs everytime we load the message.
3. If a data gathering script fails, the consolidator does not fail and text is still generated. This is a high level overview of what we did and why, but ultimately this part of the project would work with any code that outputs text whenever run.
If you want to see our actual code, check out the repo on github: https://github.com/rgho/infoTickerServerPHP