Readit News logoReadit News
Posted by u/eternityforest 2 years ago
Ask HN: Why is there no major push towards Android for Servers and Desktops?
Servers are dominated by Linux. But Linux DevOps is hard work. Any update of anything is liable to break complex applications.

Meanwhile, over on Android, we are running dozens of apps of varying quality, all updating all the time, and phones have very high reliability anyway.

On Android you don't need all kinds of containerization nonsense with 100MB packages for even the tiniest things.

Nor do you get a nightmare of broken dependencies. The OS gives you one consistent API level, and it's consistent on any device.

Permissions and security are pretty much solved, or as close solved as they can possibly get right now, you can't stop people from giving location access to everything and still claim people own their devices.

On servers, we have a nightmare tangle of Microservices and crap.

On Android, we have a really nice design pattern where the OS pretty much provides everything, and stuff you might want to swap out can be done with a service provider app of some type.

It's not hard to imagine extending that model to cover things like databases. Why should we have a 50 step process to install every app, when the app can just say "Hey, I need to make a database, I can use postgres or SQLite, put my stuff in whatever provider is configured, and don't ask for a password, I already have the permission."?

It's just... so much more sane and structured. There's already lots of Linux userland on Android projects, no real blocking issue there in being able to migrate legacy stuff.

There's performance issues with complexity, except.... not really. Apps use things far slower than Dart and Kotlin and Android API calls all the time. And Android is efficient enough to run on a phone at just a few watts, while still rendering modern websites, so it seems like they're doing something right.

What gives? Why are we not managing our web apps by uploading a single APK file and a settings.ini with the permissions we want to give it? Why is the Steam Deck Linux based while Android hardly has any decent games?

wasmitnetzen · 2 years ago
That sounds like shoehorning Android into a place it does not fit in. It is essentially a single-process OS, only the running app gets all the resources it needs. It is an UI-focused OS, nobody is using Android without an UI. It is a single-user OS. It does not provide a consistent computational capacity since things get put to sleep as fast as possible.

None of those things you'd want in a server OS.

pjmlp · 2 years ago
Actually it supports multiple user accounts with ability to switch among them, each application runs under its own process account, it has multiple ways to execute background processes, it uses OS IPC among several kinds of workflows, since Treble each device driver runs in its own process, it is possible to request a wake lock, Android Things was a headless version of it,....

Looking at Inferno and replacing Limbo with Java/Kotlin, it could be made to work.

How much it would add over any UNIX clone + Java/Kotlin? Maybe a safer userspace.

Would it be worth the trouble? Probably not.

Dalewyn · 2 years ago
>It is essentially a single-process OS, only the running app gets all the resources it needs.

Does the vast majority of people do more than one thing on their computer at a time?

As far as I'm concerned, Android not taking the desktop by storm (and ushering in the Year of the Linux Desktop) is because Google seemingly just isn't interested.

Windows is at its most vulnerable state in its entire history, and it's steadily losing ground to MacOS as things stand. Google and Android could absolutely wipe the desktop market if they could be convinced.

wwosik · 2 years ago
> Does the vast majority of people do more than one thing on their computer at a time?

Absolutely. Just looking at my wife, an office worker. Even when not working with whichever of 5 huge Excel files she has open, she is talking on Teams while working in a permanently open Outlook. Add a variety of internal sites which she constantly peruses. She just cannot have each single application taking the whole screen at a time.

CogitoCogito · 2 years ago
This is the quote from the post you're responding to:

> That sounds like shoehorning Android into a place it does not fit in. It is essentially a single-process OS, only the running app gets all the resources it needs...None of those things you'd want in a server OS.

That is obviously referring to _servers_.

> Does the vast majority of people do more than one thing on their computer at a time?

The vast majority of people are not running servers. In fact, I'd assume the majority of people do their computing on either iOS or Android.

Really the question of why "there no major push towards Android for Servers and Desktops?" is mixing two very different issues that should be discussed separately.

hbossy · 2 years ago
>Does the vast majority of people do more than one thing on their computer at a time?

Yes? A browser, chat client, and music player in addition to whatever program they use to do their job.

johnea · 2 years ago
Because it's a Goggle surveillance abomination?

I mean, you're serveer isn't walking into retail stores, so why would Goggle want to track that?

The primary purpose of android is a user data harvesting platform. I'm already dismissing large numbers of modern cars because of this.

Nighthorse · 2 years ago
I did see a job posting recently for some company running "headless Android" and I was super confused. Like trying to hammer a screw.
viraptor · 2 years ago
You should check the app sizes on Android - I've got very few under 100MB and that's exactly because they ship all the needed dependencies with them. That's how you avoid the issues during upgrades both on the phones and servers.

The phone apps don't use the exact same system for it, but essentially they're fully isolated in a similar way containers would be. The only difference is what is provided by the system and what by the app.

Flatpak can also shift the GUI into the base layer, so for example on Fedora Silverlight you can have a barebones system which uses a shared gui layer for most installed apps. (CoreOS is a similar idea, but for the server side)

> It's not hard to imagine extending that model to cover things like databases

Databases are not interchangeable beyond trivial examples. But a plugin system like that exists - odbc.

> when the app can just say "Hey, I need to make a database, I can use ...

This can be already solved with either full system configuration (Nixos) or containers (docker-compose does pretty much that). Those are sane and structured as well and they're available now.

If you want to go one layer higher (lower?), you can build a similar environment with AWS cloudformation - they can provide you with app containers or isolated functions, ready databases, all the connections in between.

> Apps use things far slower than Dart and Kotlin and Android API calls all the time.

Yes, but on the phone your app may just take slightly longer. On the server side a common case taking longer means everyone else waiting a bit longer and the whole thing translates to more money spent on infra. Those are different failure cases / requirements.

> Why are we not managing our web apps by uploading a single APK file and a settings.ini with the permissions we want to give it?

Many of us are doing basically that. The APKs are container images / static binaries / other kind of packages though. My whole server is one Nixos configuration file for many services and packages for example. Some older systems won't change overnight, but for new stuff you have all the possibilities you want, available right now.

Probably the closest to "just put some blocks together" you can get now are the iot fleet management services OSes like balena and others.

KronisLV · 2 years ago
> This can be already solved with either full system configuration (Nixos) or containers (docker-compose does pretty much that). Those are sane and structured as well and they're available now.

Honestly, this seems like the "right" answer here. While I haven't used NixOS, I've actually described OCI containers a bit like installing apps on Android in the past - each has all of the dependencies bundled, a common API to interact with all of them, things like port configuration or just setting environment variables as well as storage with a unified mechanism, including even resource limits!

Docker, Docker Compose, Docker Swarm, Hashicorp Nomad and Kubernetes (including K0s, K3s etc.), as well as more recent efforts like Podman all feel like a step in this direction, depending on what your exact needs are and how much complexity you can deal with.

> Probably the closest to "just put some blocks together" you can get now are the iot fleet management services OSes like balena and others.

I already run almost all of my own software in containers and so far it's amazing - I don't even care too much whether the node itself is running Ubuntu, CentOS/Rocky Linux, or even something like Alpine Linux on the server directly (which some might actually consider, because of the simplicity and lightweight nature).

Throw in Ansible or something like that for making sure that the configuration is similar across all of the nodes (or groups of nodes) that you want and there's surprisingly little to worry about in the long term.

Edit: though maybe I'm only able to say this because building OCI containers (say, with Docker) is actually easy, to the point where I build everything apart from databases myself, like dev images for Java/.NET/Node/Python/Ruby/PHP and the resulting software etc.

piva00 · 2 years ago
> or even something like Alpine Linux on the server directly (which some might actually consider, because of the simplicity and lightweight nature).

You are going to eventually run into the same issue most people trying to use Alpine Linux just because of simplicity and being lightweight run: musl is not a completely ABI-compatible seamless replacement to glibc and might cause issue with statically linked binaries, and other annoying issues you won't foresee.

Had this "pleasure" in the past in one of my infrastructure-heavy positions.

obarthelemy · 2 years ago
I'm very puzzled by the lack of Android desktops. Most users (not high-end users) would rather use the same OS and apps on all their devices, and Android is perfectly OK for content consumption, Office-type work, social and comms, light games...

There were a few very early attempts at Android laptops, but as for tablets (only worse), w/o any support from Google (Playstore category, guidelines...) those floundered.

I blame mostly ChromeOS, preferred by Google because it fixed the NIH issue and because why build one good ecosystem when you can build an OK one AND a bad one ? I'm still making "Android desktops" from TV boxes for the elderly around me. Android's support for standard webcams and other USB devices is a boon. It only really needs an LTS version, and some devices/apps guidelines and vetting. Not sexy enough for Googleheads, I guess ?

farseer · 2 years ago
You maybe on to something here but do remember that ChromeOS was released by Google in addition to Android to cater for the laptop and low end desktop market.
GianFabien · 2 years ago
From what I read somewhere, recent versions of ChromeOS allow you to run Android Apps. My Chromebook is too ancient to test.
jemmyw · 2 years ago
Yes, not even that recent it's been a feature for years
ActorNightly · 2 years ago
Your assumptions about Linux are either all made up, or are based in working with some VERY incompetent people.

Most of what you refer to is Android is the UI stuff built on top of a slimmed down Linux Kernel.

eternityforest · 2 years ago
I've used Linux exclusively on desktop for about 10 years, and used it on lots of embedded controllers.

When you use Linux the "classic" way, where you let the package manager do shared dependencies, large and complex suff often breaks. You can't install half the software out there because it was made for a different version of some library than the one the system has.

On servers, it seems the main way around that is just to build against old stable OS versions.

When you use it with flatpaks or snaps, stuff sometimes breaks too, or is missing features, or has performance trouble.

I don't know anyone who uses Linux on the desktop and has everything just work with zero tinkering and maintenance, unless they are just using simple unixy software.

When you have 10-50 large apps with 100 dependencies each, every year you will probably have a few that break.

ActorNightly · 2 years ago
I feel like you need to take another look at Linux. None of these problems are really a thing in modern deployments. The whole point of containers is that you really just install a core CentOS, and then roll up all dependencies within the image definitions.
jsmith99 · 2 years ago
It sounds like you are talking about snap or flatpak. These are extremely unpopular on HN.
3np · 2 years ago
I don't see flatpak getting the flak that snaps do. Personally I fall in the camp of "snaps bad; flatpak all right". There's no shortage of posts and comments expanding on this stance.
dathinab · 2 years ago
> These are extremely unpopular on HN.

idk.

HN just mainly complains about some implementation details.

Like flathub applications often not being sandboxed, yet.

Or Canonical forcing certain update strategies and similar on snap users.

ramshanker · 2 years ago
Yes. I am in the support-snap-flatpack camp, and was really surprised by HN hatred towards it.
sofixa · 2 years ago
Well they are new and different, what more can you expect from the crowd here?

(Only slightly joking).

They have their issues, that's for sure (e.g. flatpack's broken for a long time sandboxing model, snap doing weird things with mounts, the backend being closed source) but honestly they solve so many issues with desktop/client facing software they're a no brainer.

realusername · 2 years ago
I really don't want Android on my server, very hard to audit, made with manufacturers in mind and not device owners, it's not fit for the purpose.

I'd like the opposite actually, a push to standardize Android into a proper Linux distribution and not the Frankenstein that it became.

nullcipher · 2 years ago
Your comment on complex deployment reminded me of https://git.cloudron.io/cloudron/box#cloudron - "Web applications like email, contacts, blog, chat are the backbone of the modern internet. Yet, we live in a world where hosting these essential applications is a complex task."

What you are saying is so true. I don't understand why no standardization work is being done to make server deployments simpler with high reliability. We have some takes like cloudron, sandstorm, yunohost but nothing is "mainstream".

krageon · 2 years ago
No matter what OS underlies it the problems are not simple. No matter how simple the easy case is made, the complex case will stay garbage. When faced with a choice, a sysadmin that might be woken up at 5AM will pick something a bit harder to set up that's at least still recognisable and debuggable at 5AM. So we have linux, something infinitely more accessible and introspective than android.
nullcipher · 2 years ago
I mean automtated driving cars is not simple either. It's not stopping people from trying.
pjc50 · 2 years ago
Isn't that what people use cloud/k8s/docker for?

Edit: thinking about it, running something as a Cloudflare worker is basically this. You even get a K/V store. It's just that there isn't an "app store" for these for individuals .. for essentially market reasons (in almost all cases, you're better off using someone else's service than spinning up your own)

nullcipher · 2 years ago
OP is talking about having a mechanism / Operating system for servers to easily deploy and manage. Atleast, that's what I understood from the original post. How does k8s help me deploy say a blog ? It's just too technical and geeky. If this was "Android", I just download some blog app, click and install. Don't have to worry about updates either.