top | item 18355345

Carlo – Web rendering surface for Node applications

177 points| styfle | 7 years ago |github.com | reply

92 comments

order
[+] yathern|7 years ago|reply
Very interesting. If I understand correctly - this essentially solves the problem of each Electron application having to package the entirety of chromium with it.

However it comes at the cost of assuming the user already has chrome installed - as well as a more separate model between browser (UX) code and application logic.

I see this as being extremely useful for community tools that currently run on Electron (like iNav https://github.com/iNavFlight/inav/wiki). I'm hesitant to think it will be very viable for commercial products - but my instincts are wrong most of the time.

Ideally carlo would also be able to create a build target that bundles chromium with it, so that there is support for users without Chrome - and carlo will act more like Electron in that case.

[+] willchen|7 years ago|reply
I think the problem with bundling chromium is that it wouldn't be evergreen, which means it doesn't have the latest security fixes, etc .
[+] z3t4|7 years ago|reply
Also IE, Firefox and Opera can run "chromeless" - so this, or a similar API (using websockets), can work in other browsers too.
[+] tokyodude|7 years ago|reply
This seems like exactly what I as an app developer do NOT want. Basically this is my app that may break every 2 to 6 weeks as the Chrome team changes stuff outside my control. With Electron I ship on a version of Chromium I know my code runs on. With Cario today it works, tomorrow they deprecate an API, push an update to Chrome and my app breaks. I'd prefer to get a new version of Electron behind the scenes so I can fix any things that come up and then later push a new version.
[+] btown|7 years ago|reply
What kinds of Chrome APIs are you using? Anything related to web styling and DOM should be stable.
[+] franga2000|7 years ago|reply
> Basically this is my app that may break every 2 to 6 weeks as the Chrome team changes stuff outside my control. Welcome to the glorious life of a web developer :). It's not actually that bad (APIs generally don't disappear over night), but the principle is still true.
[+] mohsen1|7 years ago|reply
This is something Electron itself can probably do and I can see why some people might be interested in shipping their Electron apps without Chromium.

There is also Quark[1] and and Electrino[2] that do this with branding APIs.

[1] https://github.com/jscherer92/Quark

[2] https://github.com/pojala/electrino

[+] flanbiscuit|7 years ago|reply
I'm glad to see Quark picking up where Electrino left off, I'm very interested in those projects. However both of them are not production ready or even close to production. Plus now you're dealing with the same issues you get on web where you're coding for multiple browsers. However, if you're going to be using electron or similar then you're already used to that
[+] FreeFull|7 years ago|reply
As a side note, blurring sensitive information in a screenshot is a bad idea. It's possible to recover what the blurred text was using brute-force guess, blur and compare, or a smarter method.
[+] aylmao|7 years ago|reply
Pretty cool and interesting idea, and I guess the usability is banking the fact that Chrome is the most popular browser and probably installed on most user's computers.

Idea for another project: a wrapper around the system's bulit-in web-view that automatically polyfills the different engines to somewhat the same capabilities.

[+] WorldMaker|7 years ago|reply
> Idea for another project: a wrapper around the system's bulit-in web-view that automatically polyfills the different engines to somewhat the same capabilities.

I feel like PWA standards are so close now. The web platform needs some version of a few Node libraries better standardized (file access, process management, are a couple to mind), and maybe some better cross-platform ideas for FFI/native code-interop/shell calls. Overall, though, PWA capability is ahead of what a lot of people expect.

The biggest hurdle of course remains Apple's support for PWAs is quite lacking.

[+] dangoor|7 years ago|reply
There are a few wrappers around system web views in various languages (I've seen Python and Go, at least). The problem is Windows... Apparently only crufty old IE is available as a system default embeddable webview on Windows. Had it been a modern Edge, this would be a viable approach!
[+] mikewhy|7 years ago|reply
I've wanted this for some time. Combined with Go for the native layer so all that's distributed is a single binary and a webapp bundle.
[+] xyclos|7 years ago|reply
You have to install a separate completely unrelated (from the users' perspective) application to run an application written with this? that seems bad.
[+] tonyedgecombe|7 years ago|reply
Once you have decided to write your desktop app in JavaScript/HTML/CSS it's probably the least bad option.
[+] evilduck|7 years ago|reply
.Net Framework? JRE? Flash?
[+] flanbiscuit|7 years ago|reply
Puppeteer actually installs chrome for you (seems to be a minimal version of chrome), puppeteer-core is the one that uses a chrome installation you provide. I wonder if Carlo would install Chrome for you if it was missing
[+] pier25|7 years ago|reply
Bad for general use, but it could work for internal projects.
[+] Lerc|7 years ago|reply
I'm curious as to whether this could be generalised to any browser if there was a small server that accepted websocket connections and for each one, opened up a listening port on the server side.

If the socket was exposed as an environment variable WEBSESSION=/tmp/websession_socket.16417

Then applications could connect to the socket at WEBSESSION and feed data to the browser (to display in an iframe).

Mostly I say this because I've made one of these but haven't been using it.

[+] russellbeattie|7 years ago|reply
This seems useful for prototyping and quick GUIs. Usually for one-off apps I end up creating a local http server on some port then pop up the browser to view it. Before I know it, I end up serving a few different ports and losing tabs... Being able to pack each script up complete with GUI - without a lot of effort or huge dependencies - seems like it might be convenient.
[+] nancyp|7 years ago|reply
Looks like this was an alternate to the chrome apps which they removed from other os-es than ChromeOS

The advantage is size reduction, which is pretty much less of an issue since our disks are only getting bigger. But this will lock in vendors to use Chrome which Electron could provide an alternate.

[+] jamesgeck0|7 years ago|reply
> But this will lock in vendors to use Chrome which Electron could provide an alternate.

Maybe not. If Firefox's and Chrome's headless communication protocols converge sufficiently, it may become possible for Carlo to support them interchangeably.

[+] arusahni|7 years ago|reply
At first glance, this looks like it establishes a shared runtime for all Carlo apps. I'll be interested to see how well it supplants Electron once it matures.
[+] pier25|7 years ago|reply
TL;DR: this is like Electron, but instead of bundling Chrome it uses the local Chrome installation.

pkg is recommended for bundling the Node app so I imagine the bundle includes V8 and Node.

https://github.com/zeit/pkg

[+] _verandaguy|7 years ago|reply
Is it fair to assume then that this would result in:

- Smaller disk footprint per app; and

- Drastically smaller memory footprint per running process?

[+] kyberias|7 years ago|reply
If it requires Chrome, why not simply develop a Chrome app?

"A Google Chrome App is a web application that runs on the Google Chrome web browser. Chrome apps can be obtained from the Chrome Web Store where apps, extensions, and themes can be installed or bought."

[+] jamesgeck0|7 years ago|reply
What is the size of the executable that pkg produces for a Carlo example app?
[+] asadlionpk|7 years ago|reply
linux: 39MB macOS: 39MB Windows: 27MB

I wonder if this can be further reduced.

[+] nwienert|7 years ago|reply
Would be nice to just see this as an opt-in add-on for Electron where it uses Puppeteer in the same way.
[+] aaorris|7 years ago|reply
Biggest detraction here for me is the Apache license, compared to an MIT license in Electron.
[+] willscott|7 years ago|reply
Hunh? Apache is a more permissive license than MIT. why is Google waiving it's claim to patents on this project a problem for you?
[+] browsercoin|7 years ago|reply
so basically an officially sanctioned nw.js
[+] snacktaster|7 years ago|reply
anything that requires chrome to function is essentially spyware. so..

no thanks

[+] sctb|7 years ago|reply
We've already asked you to improve your comments, so we'll ask again. Can you please post civilly and substantively or not at all?
[+] oculusthrift|7 years ago|reply
ew. I was with you until you said it requires chrome.
[+] yathern|7 years ago|reply
That's the whole point of it. Not the caveat really, but the primary feature! Whereas Electron will package chrome in every binary, this uses what you already have installed.

Obviously not great for many product types. You wouldn't want to build a product off of this, knowing that a user might not have Chrome. But for internal enterprise stuff, or community-built tooling - I can imagine this is quite useful, and downloading a 3MB binary is a whole lot better than downloading a 300MB for the same program.

I would love to see this work alongside Electron, where you can provide two download buttons for your app. One if a user has chrome already (3MB) and another if they don't (300MB).

Of course the API and model differences between the two would be hard to solve, and require another level of abstraction.

[+] jrockway|7 years ago|reply
I think it's designed to be a more matinable version of Electron, which bundles Chrome with every app that uses it. I have at least 3 or 4 copies of Chromium sitting around on my desktop at home because I use a few Electron apps.

One time, there was some BeagleBone tutorial that recommended using a Windows version of dd that is implemented as an Electron app. It was 200MB. For dd. Not great. At least this uses the Chrome you already have installed.