The iPads that display information in the Magic Mirror are displaying information through their web browsers. The browsers are loading up webpages that respond in real-time to events sent from the Photons. Since the Photons cannot connect directly to the iPads, events are routed through an intermediary system built on our web server. PHP, JS/jQuery, and Server Sent Events (SSE) are the core technologies used. When an event is fired from a photon, the following sequence is executed:
1 - A Photon pings the command file on our web server using a GET request. Data is passed via URL parameters. This is our makeshift API.
2 - The command file interprets the Photon's request and records the passed data to a static text file. This is our makeshift database.3 - A special data stream script is set up to watch the data file. If it notices any changes, it will broadcast the new data out to any listening web clients.
4 - The iPads receive the data and respond by updating what they show on their screens.
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .