Photino: A lighter Electron
tryphotino.io
tryphotino.io
As far as I understood it, Tauri is a safer Electron, not a lighter one.
Tauri even themselves are building their own embedded browser (based on Servo) because they too realize that using "whatever the OS happens to have" is fundamentally not Workable as a platform. This idea Just Does Not Work for production apps with Real amounts of users
This, but unironically.
Why not ship an app as a VM? Firecracker is super fast. The only thing really stopping is is that we don't have VM friendly APIs that let VM guests act like desktop apps. (Well, nested virtualization should be more supported.)
Also, we're already in a world in which we ship apps as basically containers. Is that all that different?
What should be the interface between an app and its host OS (and other apps)? At one extreme, we have "thick", "batteries included" interfaces like old win32, with tons of convenience APIs and OS-provided in-process code, and at the other extreme, we have VM-style "thin" interfaces with only the most essential OS services provided and apps (well, VM guests) expected to bring their own batteries --- things like a virtio framebuffer.
Whether an app interfere is implemented as a VM hypercall virtio thing, IPC, or in-process client library is an implementation detail. What matters is the thickness of the API surface.
We're in the middle of a secular trend from thick interface surfaces to thin ones. I don't see that as a bad thing. Thin, arms-length interfaces maximally decouple app and OS development. They encourage cooperation over explicit, stable, and versioned interfaces. They simplify the entire industry.
The technological environment that generated the old thick interfaces doesn't exist anymore. Freed of its constraints, we can do better now.
Second, the “success” of Electron is like the “success” of online advertising. Nobody really likes it and it’s basically a local optimum in a deep pit that it’s unfortunate we’re stuck in. It’s just that economic pressures have pushed the market to this being something people tolerate rather than actively desire.
But my main point is that memory requires power so adding memory to a machine shortens battery life (or increases weight due to larger battery).
So far AFAIK no laptop maker has made a laptop that can power off half the RAM to decrease demand on the battery when only half the RAM is needed.
(Also, I do not like apps built on Electron and do not use any.)
Tell me, how would you fix this bug?
Let me turn the question around for you: why do you think shipping Electron will save you? Sure, maybe WebKit has a broken video decoder this year. What will you do next time when it’s the GPU driver? You already know what the answer is: you diagnose it as far as you can, report it upstream, and communicate the best you can with your users. You seem to have the mindset that every bug exists to be fixed, and that’s not true at all. They are all a tradeoff. It’s easy to go “oh if we bundle everything ourself we can shift more control to ourselves to fix bugs because more of the components are ours”. First of all, you actually have to do that: turns out plenty of companies operating at scale are unable to do that (have you looked at how often Discord updates their dependencies?). And even when you’re committing to doing this and follow up, you have to understand that you’re unconditionally shipping a worse experience to all your users in the hopes of solving saving some time for some small fraction of them. This isn’t something that I am completely against (for example, I advocate for shipping debug symbols to users-but that’s another long argument) but you also have to look back at yourself and go “ok we’re shipping 98% of the same code across platforms and supporting macOS Mojave takes an extra 2 engineer-days a year, maybe this is an OK state of things” rather than being absolutist about something you’re not achieving anyway.
All of the videos will be pink, not just the macOS ones on an older Safari.
At worst someone could dig into the Webkit (Chome?) distro and fix it and they can release a custom build for the short term before it gets incorporated, fixing "everyone".
Sharing centrally managed dependencies made some sense in the days of infrequently-updated boxed software, but now? Brute force has made the size advantage of sharing irrelevant. (People complain about Electron memory use, but still use it.) Security advantages? App makers are perfectly capable of shipping their own security updates now that we have cloud auto-updating whenever we want it.
I just don't think that there's still a real technical case for Debian-style dependency sharing in general purpose operating systems and that we can save ourselves a lot of time and pain by getting out of our 1990s shared library mindset.
and it's taken a lot of time and a lot of retirements to change this mentality.
A large third-party dependency chain is, in my opinion, the most problematic security risk in modern software. Secondly, automatic updates are how we got cloud-strike.
I’m not advocating Debian style dependency sharing, but I am advocating for tight control and auditing over your dependency chain (which will mean building more in house). And allowing IT departments to control update rollouts.
Not every program is backed by a company that provides continuous updates.
And what happens if the updates stop? Yeah right you have a giant pile of half-broken, bug-ridden and outdated random libraries.
I use some small Win32 and GTK+ utilities that weren't touched in years and they all just work, are nicely integrated into the system theme (even dark mode works without me lifting a finger) and use fresh and up-to-date dependencies courtesy of the OS.
Don't get me wrong, I applaud the efforts of the Photino devs, the Tauri devs, and the Wails devs. They're all very cool projects. But if you need to build something non-trivial with them, you're going to have a bad time. The resource usage and large binary size that comes with Electron is the price you pay for having a cross-platform app that doesn't break in weird and unexpected ways. I never see any kinds of warnings or caveats on these framework websites explaining the drawbacks of using the OS webview. Which means every time one of these comes out, I have to explain to the people that I work with why we can't just ditch Electron.
Slack is by far the slowest and buggiest web app I've had the misfortune of being stuck with. And bundling it with chromium is an even worse idea given that the only way of getting half way decent performance with slack is opening the web version in Firefox (and specifically not Chrome).
And yes, I've heard MS Teams is even slower, but I've never had to use it
It would be worse. They could have said Microsoft Teams.
> And yes, I've heard MS Teams is even slower, but I've never had to use it
Oh, dear.
Aren't there still differences between Chromium and Webkit.
And what if a breaking change in the WebView2 is deployed per update?
Isn't that the advantage of Electron that you have total control over used render engine version?
And yes, I know this is why people don't like talking to physicists. Good luck with the project anyway :)
I will probably be switching to Electron unless the project gets any sort of meaningful update. The releases on their GitHub are still v2, while the packages available on NuGet are v3. There hasn't been any code changes in the past couple of months. For the Blazor integration, it's actually broken completely for Linux (and maybe macOS).
Overall it does save on build sizes and RAM a bit, but I'm not sure about the long term viability.
I appreciate that Photino at least is lighter in terms of install footprint and RAM use, but it is still as CPU hungry.
So, I just don't get the Electron hate. It's just another GUI toolkit. That it's based on web stuff inside is an implementation detail. Electron wasn't the first GUI toolkit and it won't be the last. IME, speed, memory use, and so on are all adequate.
My only real gripe is that it's cumbersome to theme the things and that you have to jump through a million hoops to inject your own JS as a user. .(GTK4 is also trending theme-hostile though, so this gripe isn't specific to Electron.)
It'd also be nice to use web technologies with a language other than JavaScript. I'm sure the WASM people will come up with adequate multi-language interop eventually.
Now it's a good thing that there is an architectural boundary between the frontend and backend. God knows not every desktop app is good about that. But the problem in web dev is that it is a complex architectural boundary that has its own footguns. Suddenly you have to do everything concurrently and securely. And on the backend, you can no longer just serialize to a file in a known directory. You have to learn securely connect to a database, be competent in a query language, and be able to manage all the infrastructure or sysadmin work that comes with databases. Oh, and you can no longer just distribute your application as a binary or with an installer. Now you have to be a master of all the sysadmin and process work that comes with deploys and cloud infrastructure. Debugging is no longer just gdb and depends on competent logging, you're likely to have to finagle calls to several REST APIs (all with slightly different auth) instead of just linking in a library, you have a hell of a lot more things to mock when you're testing...
The list of added complexity goes on and on and on, and all of this is on top of whatever complexity is inherent in the problem domain to begin with. Web dev adds just adds a ton of complexity.
Is using web APIs for things like networking and storage really more burdensome than using the corresponding POSIX APIs? It's the same stuff with a different spelling.
>Is using web APIs for things like networking and storage really more burdensome than using the corresponding POSIX APIs?
Yes. Absolutely it is. If nothing else, you don't have an auth step. Not to mention the infrastructural and management overhead of web APIs. I don't have to worry about the care and feeding of a customer's hard drive the same way I do my service's database. Or pay Amazon for the privilege of using something more convenient.
Yea, it's not native, but its more the native dev experience, and its actually quite portable.
>Photino uses the OS’s built-in Chromium or WebKit-based browser control for Windows, macOS and Linux.
So, same difference. Native and lighter than light my arse, pardon my French.
It's still using a browser under the hood to render UI.