Florian Wesch

The info-beamer hosted architecture

Posted Feb 16 2016 by Florian Wesch

<p>info-beamer hosted is designed to be as reliable as possible. This blog post describes the info-beamer hosted architecture and how it archives this goal.</p><h2 class="doc-header" id="motivation">Motivation</h2> <p>When you use a digital signage service it is important that it is as reliable as possible. It shouldn't go down if a server breaks or if your internet connection is temporarily unavailable. <a href="/product/info-beamer-hosted">info-beamer hosted</a> solves these problems for you so you don't have to.</p><p>When designing such a system it's important to get it right from the beginning. Looking back the design decisions made worked out pretty well and the system has been very reliable so far.</p><p>Early on I decided that I wanted to separate the more critical operations part from everything else. So your devices work and can reboot/start even if the info-beamer.com website should be down for whatever reason.</p><h3 class="doc-header" id="thehostedsystemarchitecture">The hosted system architecture</h3> <p><img class="blog-image" loading="lazy" src="https://cdn.infobeamer.com/s/5c843e/img/hosted-architecture.png" title="info-beamer hosted architecture" /></p><p>In the left column you see the info-beamer.com web server. It's responsible for handling all of the configuration requests. Changes to your devices or setups are all done using this web server by visiting the <a href="/dashboard">info-beamer hosted dashboard</a>.</p><p>In the right column you see everything that is required to keep your devices running. All assets (like videos, images and fonts) as well as the <a href="/doc/info-beamer">code that runs your visualization</a> are stored on (currently) <a href="https://aws.amazon.com/s3/" rel="external,noopener">Amazon S3</a>. The Amazon SLA guarantees an availability or 99.99% which translates to a maximum of 52 minutes of downtime per year. The same storage service is used to hold updates to the info-beamer hosted operating system.</p><p>The info-beamer web server itself is entirely optional while your devices are running: Your devices can boot and fetch assets that have changed since the device was last online without ever contacting the info-beamer web server. Everything required is stored on S3.</p><h3 class="doc-header" id="updatingarunningvisualization">Updating a running visualization</h3> <p>The web server is only required when you try to make changes to your setups. Hitting the <strong><nobr>Save</nobr></strong> button in one of your <a href="/setups">setups</a> triggers a fairly complicated chain of actions:</p><ul class="circle"> <li>All required assets and package files are gathered</li> <li>New JSON configuration files are created for all configured nodes in a setup and combined into a single zip file. This zip file is then uploaded to the asset storage (S3).</li> <li>A new sync file is created for each device using this setup. This file specifies what files are required to display your visualization on a device and where to fetch those files if they are not yet available on the device. The sync file is then uploaded to the asset storage as well.</li> </ul> <p>Now all affected devices have to be notified of the configuration changes. Normally each of them has a long running <a href="https://en.wikipedia.org/wiki/WebSocket" rel="external,noopener">websocket</a> connection to the info-beamer.com web server. A device will be notified instantly about configuration changes if this connection is available. If the websocket service is not available or unreachable for any reason each device will instead check every two minutes to see if the configuration was changed.</p><p>Once a device knows that something was changed, it will download the new sync file and compare the currently running visualization and all its files with the updated version. It will then download all additionally required files (like a new images) from the asset storage.</p><p>The asset storage is structured in a way that makes it very simple for your devices to determine if an asset must be downloaded or if it is already available on your device. Unless your devices runs out of cache space it will <strong><nobr>never download the same file twice</nobr></strong>. Even if you delete an asset from your account and reupload is later with a different file name to use it again.</p><p>Once all required files have been downloaded they will be made available to the running visualization and you'll see the changes you made to the configuration.</p><p>All these steps only take a few seconds. Configuration changes are almost instantly visible on your devices. All while making sure that your devices still work if the info-beamer web server is temporarily down.</p><p>Of course all communication between info-beamer components is using encryption. No data is transfered in plain text ever when using info-beamer hosted. It is 2016 after all and there is no excuse for still using plain text transfers.</p><h3 class="doc-header" id="offlinemode">Offline mode</h3> <p>If a device doesn't have a working internet connection when starting it, it will just run the previously configured setup.</p><p>In the background it will try to reestablish an internet connection by trying to (for example) reestablish an unavailable WiFi connection or repeatedly asking for a network address using <a href="https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol" rel="external,noopener">DHCP</a>. Once an internet connection is established it will try to contact the asset storage to see if a new sync file is available. If that's the case it will update its currently running visualization as described above.</p><p>Meanwhile it will also try to contact the info-beamer web server to create the websocket connection so future configuration changes are triggered instantly and device information (like the current device output) is available on the device detail page.</p><p>A properly build visualization therefore still works if you don't have a reliable internet connection. info-beamer hosted will try it's best to make that possible.</p><h3 class="doc-header" id="useinfobeamerhostedasyourdigitalsignageplatform">Use info-beamer hosted as your digital signage platform</h3> <p>The previous blog post described why the <a href="building-a-reliable-raspberry-pi-distribution">info-beamer hosted operation system is very reliable</a>. This blog post hopefully provides some insight into the design and thought process that went into the development of the info-beamer hosted website and related services. Both of those parts working together creates the best Raspberry PI based digital signage service available today.</p><p>The Raspberry PI is an awesome platform for setting up a digital signage service. But creating a reliable one isn't that easy. So before you start building your own service (maybe using the <a href="/product/info-beamer-pi">info-beamer pi software</a>) consider using the <a href="/product/info-beamer-hosted">info-beamer hosted platform</a> as your foundation. It solves a lot of hard problems so you don't have to!</p><p>If you have any questions don't hesitate to <a href="/doc/about">get in contact</a>. I'm pretty sure <a href="/product/info-beamer-hosted">info-beamer hosted</a> can be your reliable digital signage system.</p>

Read more...


info-beamer.com offers the most advanced digital signage platform for the Raspberry Pi. Fully hosted, programmable and easy to use. Learn more...


Get started for free!

Trying out the best digital signage solution for the Raspberry Pi is totally free: Use one device and 1GB of storage completely free of charge. No credit card required.


Follow @infobeamer on twitter to get notified of new blog posts and other related info-beamer news. It's very low traffic so just give it a try.

You can also subscribe to the RSS Feed RSS feed.


Share this post:

Share using Twitter


Questions or comments?
Get in contact!