Have you ever waited five or more minutes for 1Gb of NPM packages to download just to write three lines of code?
We have. It doesn’t scale.
We built a freemium serverless platform and we wanted to let our users use NPM. We wanted to allow them to use any NPM package, with zero cold start while keeping sane download and deployment times while minding our storage.
Now here’s the engineering challenge: The naive ‘npm install’ approach has several disadvantages. It’s slow, which prolongs deployment time. It keeps the same package over and over again for different users which increases storage usage. It would force us to either have a long cold start if we choose to copy the node_modules when the container starts, or keep dedicated user containers online, which costs a lot.
In this talk, Schachar Levin unveils the solution we implemented to face this challenge and support complex NPM dependencies trees allowing multiple versions support, deduplicating packages, minimizing storage and download time, while making node able to import packages in a new and efficient way.
For more engineering updates and insights:
Follow us on Twitter → / wixeng
Subscribe our monthly newsletter → https://www.wix.engineering/subscribe
Visit our blog → https://www.wix.engineering/blog
Follow our Medium publication → / wix
Listen to our podcast → https://www.wix.engineering/podcast
Смотрите видео How to Instantaneously Install NPM Packages While Supporting Multi-version and Avoiding Duplications онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Wix Engineering Tech Talks 13 Август 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 55 раз и оно понравилось 1 людям.