Our company has been using Balena + Balena Cloud for a while now but we’ve hit a bit of a brick wall with the product. We use Balena to deploy graphical interfaces to NUC’s with touch screens (and sometimes with custom hardware attached). We run a server that serves our content and then another container service that runs Electron in X11 showing that content to the user. Our graphical interfaces are now getting pretty hungry, and we’re finding that they can no longer run efficiently inside a container. I know this has come up at least once on Balena forums, but I just wanted to get the latest on how people solve this problem? It became very stark when I ran the exact same app on a bare-bones Ubuntu with an X11 serving Chromium in kiosk mode vs a Balena image equivalent. The latter wouldn’t even give me a frame per second for one particularly hungry web app. The former was smooth as butter.
I appreciate this may be out of Balena’s remit, but I find the Balena Cloud so useful, and have no problem deploying servers and file serving into Docker containers… But not being able to serve over an X11 server that is closer to the hardware is essentially forcing us to migrate to our own custom setup. So this is my last ditch attempt to work out if we’re over-reacting:
Are we able to perhaps run our devices on a regular Linux distro and then VM the BalenaOS inside that? We really only need the functionality of a Chromium view that’s close to the hardware; everything else can be served from a Balena container (i.e our apps can be served to the Chromium browser from containers, and so therefore easily updated remotely)…
Are we misunderstanding what/who Balena is “for”?
It’s a real shame because I do really like Balena Cloud and the containerised approach - it just seems to fall short when it comes to graphical interfaces. If I’m trying to fit a square peg in a round hole, then I fear that we may end up having to write something ourselves.
We’ve been mostly using standard wizard-like interfaces on touch screens. Apps rendered in Electron which have things like questionnaires, some PI data capture etc. Sometimes we attach vending or printing hardware which we communicate over Serial to control. But recently we’ve needed to make more graphics intensive experiences. The specific app I’ve been using as a benchmark is a simple pinball game, using MatterJS and PixiJS to render onto Canvas.
Regardless of the app we’re using, I should re-iterate that I’ve deployed the exact same app on a bare-bones Ubuntu installation onto the exact same machine, using chromium in kiosk mode, and it has worked fine with a good frame rate. Deploying it onto a balenaOS machine (same NUC specs), with X11 Electron (using chromium under the hood) and also deploying using the balena-io-experimental/browser with the ENABLE_GPU=1 flag set, they both perform terribly (balena-io-experimental/browser very marginally better). By “terribly” I mean the frame rate is under 1 frame per second; so it is unplayable.
So although I’m sure the app could be optimised, the differences in performance hint at a much wider issue.
Below is the docker-compose we normally use for our setups:
Note that we run Electron as a separate service, and serve the app from the “app” service.
Below was the very bare-bones docker-compose that I used to test the balena-io-experimental/browser setup. Here I just dropped in the app build folder and served from the same service:
You mention what hardware we’d like to use: I guess anything that helps to make graphical, canvas-rendered games workable in a balenaOS setup. We run it on NUCs with 16GB of RAM, attached to touch screen displays.
Let me know if there is any other information you need.
@mpous I’m guessing this is perhaps not something we can fix within Balena Cloud? We pay a subscription currently and will be deciding soon whether to cancel that in favour of building something custom if we can’t make this work - so do let me know if you think this is fixable.
FYI Our company is using a separate account to this personal one.
@mpous Is Zendesk a better place to get technical support? Should I just do that and reference this thread (it will be from a different, paid account).
@mpous Yes it does. I just didn’t want to expose our organisation account on a public forum. I will go ahead and do that and will report back here for the public if a solution is found that may help others.