I tried posting on StackOverflow but it doesn't have pnpm tag & to create it requires 1500 reputation which I don't have yet.
Regarding this tweet https://twitter.com/wmhilton/status/980979097156440065 which quotes -
@pnpmjs Just found it that @glitch uses pnpm behind the scenes to make adding packages instant and have tremendous disk space savings!
I understand how it saves space on the HDD, but don't understand how it saves space on the server.
If its a single project it doesn't save any space if I replace pnpm with npm or yarn but for multiple projects like on HDD it works.
Does it save space because Glitch has multiple remixes/projects & it uses a complete OS like Ubuntu where its deployed which enables pnpm to install dependencies in only 1 location & reuse it from there?
@etamponi can answer this question with details (if that is public information) but physically the node_modules are linked from the same store.
@deadcoder0904 I'll try to explain how I understand it but I cannot be 100% because I did not work on it. I only helped with pnpm features that glitch needed to make it work.
Each remix in glitch is a container. The pnpm store server runs outside of the container but on the same physical disk. The application does not have access to the store location but the store server can create hard links or ref links from the global store to the container.
So yes, many projects on glitch share one store. That is what causes the disk space savings.
And the beauty of it is that apps cannot corrupt the shared store. They don't have access to it.
Most helpful comment
@deadcoder0904 I'll try to explain how I understand it but I cannot be 100% because I did not work on it. I only helped with pnpm features that glitch needed to make it work.
Each remix in glitch is a container. The pnpm store server runs outside of the container but on the same physical disk. The application does not have access to the store location but the store server can create hard links or ref links from the global store to the container.
So yes, many projects on glitch share one store. That is what causes the disk space savings.
And the beauty of it is that apps cannot corrupt the shared store. They don't have access to it.