News for hackers. Stuff that matters.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @02:58AM (#13984014)
It would be nice to have a third option when building binaries: some kind of tar/jar/zip archive with all the dependencies inside. It would give the pros of static and shared libraries without everything else containers imply. The OS could the be smart enough to only load identical libraries once.
Re:Containers vs. Zones vs. Jails vs. VMs by ori_b on Wednesday March 29, 2017 @03:05AM (#13984042)
That's equivalent to static linking, but with extra runtime overhead. You can already efficiently ship updates to binaries with something like bsdiff or cougrette, so the only reason to bundle shared libraries in an archive is for LGPL license compliance, or for poorly thought out code that wants to dlopen() itself.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @01:58PM (#13988887)
Upgrading a library that has been statically linked isn't as nice as a shared lib + afaik the OS doesn't reuse memory for static libs.
Re:Containers vs. Zones vs. Jails vs. VMs by justincormack on Wednesday March 29, 2017 @03:37AM (#13984168)
A container image is a tarball of the dependencies.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @01:58PM (#13988892)
Yes, but containers also provide more stuff that I might not want to deal with.
Re:Containers vs. Zones vs. Jails vs. VMs by ianburrell on Wednesday March 29, 2017 @02:33PM (#13989210)
The OS can be smart enough to load identical libraries once. But it requires them to be the same file. This can be achieved with Docker image layers and sharing the same base layer between images. It could also be achieved with content-addressable store that deduplicated files across different images. This would be helped by container packaging system that used the same files across images.

Page sharing can also depend on the storage driver; overlayfs support page cache sharing and brtfs does not.

Re:Containers vs. Zones vs. Jails vs. VMs by Longhanks on Wednesday March 29, 2017 @03:04AM (#13984036)
That's basically what OS X does with bundles.
Re:Containers vs. Zones vs. Jails vs. VMs by dkersten on Wednesday March 29, 2017 @03:11AM (#13984068)
jars already support this.
Re:Containers vs. Zones vs. Jails vs. VMs by amenghra on Wednesday March 29, 2017 @02:00PM (#13988907)
yes, I think we should have the same capabilities in a language agnostic way.

Signed jars are a little painful to use (you can't easily bundle them), but that's a minor issue.