MyVolumio Technical Overview

Technical Overview

MyVolumio, besides being quite a technical challenge, has been a great way to explore what current technology has to offer, and to meet great people to exchange visions and knowledge. The MyVolumio infrastructure is quite complex when compared to the bare Volumio OS which we’ve worked on right now, so choosing the right technology for every specific part of it has been an undertaking on its own.

What we wanted was use cutting edge techonology but not for the mere sake of it, but only if it proven to be the right choice.

This is the recipe we came up with:

FIREBASE: User management and real time database

Firebase is just awesome. Not much more to say. It’s an ecosystem that encompasses various tools for Mobile applications, but we found it just perfect for our use case.
First: by using it for our user management and authentication system we can safely ensure a very very high level of security (something we could have never do with an in-house developed system).

Firebase Authentication allowed us to develop a streamlined user experience without sacrificing security, and it allows us to have no limits on how many users our system can handle.

Then, the real-time database is something that just blew our minds.
Imagine that you add a new track on a playlist, and it gets automatically synced —within milliseconds— on all your devices. This is the realtime database.

Of course we needed to learn how to use it properly (you need more than one grain of salt, as it’s very powerful but also quite difficult to avoid huge mistakes), but it was just love at first sight.

SERVEO: State of the art secure remote connection

We tried many and many and many remote “tunnelling” solutions, and they all had issues.
For some you needed a PhD in Elon Muskiness just to use them, others will simply fail under misterious circumstances, others were simply
out of our budget.

Then we met Serveo, and there was light. Serveo just works, and it’s incredibly fast and reliable in connecting two devices on the internet. And the connection is encrypted end-to-end to ensure maximum security and privacy. Serveo proved (thanks to some optimizations that Trevor, Serveo’s founder, did specifically for MyVolumio) to be also super fast with minimal latencies, so once connected, you won’t really notice when you’re accessing your device remotely.

The biggest challenge here was to sustain the really high load when fetching multiple albumarts, while ensuring the connection remained stable and prevent lagging: after the aforementioned tuning, Serveo is simply unmatched in this aspect.

And the best thing of them all is that Trevor, the founder and developer of Serveo, is a super brilliant, skilled and nice guy, and we started a mutual (and very interesting) cooperation.

So Serveo and MyVolumio are a great fit, and they are growing together.

GO: When we need fast queries, like for streaming services

Developing the streaming services integrations has been probably the most complex task, since we needed to combine technical challenges with “legal binding obligations” to be able to offer them on Volumio, the first of which is not disclosing some informations about some inner workings.

This meant in the first place that we could not rely on Node.js, and that the code should have been closed (but without jeopardizing Volumio’s openness).

The technical challenge involved also making repeated queries to remote endpoints to fetch playback informations, and to do them fast.

Go was the natural choice: it’s damn fast in everything you throw at it and it can be complied to offer close-to-native performances. Did I already mention it’s one of the coolest languages you can learn?

DOCKER: Cloud containerazion

For MyVolumio to just run, we need several online services to work in harmony.

The choice was between having a huge, power and money hungry Server somewhere on the internet or embrace microservices. We did the latter.

Basically, a microservice is a program running on a server that just does one little thing. So you basically split your giant piece of infrastructure into small soldiers that do one thing only, but they do it right.

And this is all good, until you start growing: you need then a way to start two of those little soldiers at the same time, and maybe in two different geographical locations.

This is where Docker comes in: we basically can run as many little services as we want ( and only when we need them), where we want.

And the coolest thing is that this infrastructure can grow automatically to adapt to increased demand, or reduce itself in case MyVolumio sucks and
nobody uses it (this is called orchestration, nice isn’t it?).

PADDLE: Payment gateway

It’s quite common to let third-party services to handle payments. This is probably the most critical part of every service, and it’s better to leave it to the professionals.

I came to Paddle after having explored pretty much every other alternative, and I choose them for their flexibility: they offer every possible function starting from coupons, to flexible pricing and so on.

But the decisive choice was that they offer, together with the service, a dedicated customer support for the end user: so should you have any question to ask about billing, Paddle customer support will be there for you.

Again, our first concern is user experience, and knowing there will be an helpdesk to help with anything regarding such a critical component, was the dealbreaker for us.