View previous topic :: View next topic |
Author |
Message |
WWWW Tux's lil' helper
Joined: 30 Nov 2014 Posts: 143
|
Posted: Thu Apr 09, 2015 11:47 am Post subject: docker vs shared libs vs static libs |
|
|
hello,
There's a slashdot article about M$$$ copying the linux docker solution for themselves.
But there's an interesting comment that says that shared libraries are outdated.
That got me thinking about the nature of Gentoo, linux and programs on OS in general.
From some time now I've seen the static USE flag being included in about every package in Gentoo repositories.
This is interesting because nowhere in the handbook mentions whether use static or not, or when use it. There are also no comprehensive explanation why use one over the other.
One thing that shared library ads are immense complexity during package resolution with emerge and any linux package management.
Many times systems or programs get broken because of a single shared library.
The complexity is not only during dependency resolution but all the way to GCC compile time.
What the poster argues that shared libraries was a solution when hard drive space was expensive and the sole solution of shared libraries was to save SPACE and MONEY.
Now that ram and hard drive are mad cheap does it make sense keep using shared libraries?
Shared libraries issues becomes hard to deal with the multitude of packages and their complexity i.e.: blender, opencl, python slots, etc.
Different libraries will always exist due to human nature and a project life cycle.
Somebody in China starts a project with X version of compiler, abi etc. The whole code and the coders are familiarize with the one started with the project. So the efforts are spend on the functionality of the program. But at the same time, frameworks, compilers, abis release new versions. However for a project their focus is on functionality and there's less time having to learn how to change or implement their solutions using the new tools. Then somebody else in Antartida at later time starts a project with the new tools, hence the cycle continues.
Without going too far, when a program is finish with X version of GUI while the GUI is at several versions new.
So, basically it's impossible for the whole world to be in sync with all the new versions of everything.
Now enter docker. So far docker is mainly used in virtualization solutions but I haven't seen or heard as a user desktop solution. I haven't seen any distro that only uses docker.
Another place where I see something similar to docker is in the Android platforms. Android doesn't have shared libraries.
Are shared libraries really obsolete with modern hardware?
What about in terms of performance? Is the static/container solution better, faster, etc, than shared libraries?
Anyways, this got me thinking about shared libraries and its place in modern times, specifically for a desktop user. Shared libraries does look like a more elegant and lean solution though.
thanks. |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Thu Apr 09, 2015 8:12 pm Post subject: |
|
|
I don't think shared libs is outdated. From my own experience, static libs are nice and the easy way out when making a program, but it is also ends up wasting disk space at the same time. It is nice you don't have to worry about version changes breaking the api/abi of a particular library, but you also end up having several different copies of the same library for each program too. Just because storage prices been dropping does not mean that you should go ahead and use up more space for the no good reason besides laziness. |
|
Back to top |
|
|
Akkara Bodhisattva
Joined: 28 Mar 2006 Posts: 6702 Location: &akkara
|
Posted: Thu Apr 09, 2015 9:53 pm Post subject: |
|
|
Static libraries do a lot more than waste disk space.
They also waste CPU cache, causing things to run slower and use more power.
This is not a big deal when the library in question is something like min max and abs (tho all those are usually done in-line anyway).
It is a much bigger deal when the library is something like Qt or gtk. _________________ Many think that Dilbert is a comic. Unfortunately it is a documentary. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|