It's amazing to see the language embraced that much for server side apps.
It's amazing to see the language embraced that much for server side apps.
What are the benefits of one over another?
Something like grokking this concept for once and all :D
If you use dynamically linked binaries, you rely on the system to have the version of the library you need, and hope that your reliance on those libraries does not break other applications which may rely on different versions of those libs.
Static == everything you need bundled up Dynamic == relies on libraries present on the host to provide aspects of functionality
Of course, even static binaries rely on some basic level of compatibility; typically system-level things that don't change much.
Dynamically-linked binaries have the potential to create a massive dependency graph that can hard or even impossible (for a given o/s installation) to traverse.
* single binary that you can scp (or use transfer.sh haha) into the production machine and run; no runtime environments, package installation etc.
* two different applications can depend on different versions of a library without any intermediate package manager or virtual environment
* guaranteed execution: related to the first point, but I see enough merit in this to make it a separate point
Cons:
* If there's a security issue in a commonly used library (database/sql, for example), you'll need to patch every application that uses it. With dynamic dependencies, you just patch the library.