How PayPal migrated to Node.js
Shifting a large organization like PayPal to Node.js doesn’t happen overnight. Erik shares the challenges involved and the solutions that arose from it.
Recognize what are Node’s strengths and verify that its the right tool for the job at hand. Choosing Node may be a technical or business need. Node is a philosopy.
Erik had a lot more to add to each bullet point above.
Can you prove that customers benefit? This is key. Show the benefit to customers and you’ll have the support necessary to move foward.
Avoid things that are hard initially. Get some easy wins then build from that base.
Use tight constraints. Focus on what really needs to be solved.
Only fix what’s actually broken! For PayPal it was velocity and productivity.
People - Grow/train and support our peers. Product - Speed up the product lifecycle. Technology - create the best experiences.
They use Jenkins for CI so there was no need to reinvent this wheel just for Node. Also, PayPal has existing system monitoring, logging, etc. Again, they reused what already exists rather than trying to reinvent every wheel.
Erik made an important point that they were smart not to customize PayPal’s infrastructure for Node alone. He stated that Node was one of many technologies in PayPal’s stack, and they viewed the continuity of infrastructure as separate from the introduction of a new technology (i.e. Node). Not sure if I paraphrased this accurately…so watch the video when it’s released.
Adhere to Node’s approach: keep it modular! Make it easy to replace my module with someone else’s better written code/module.
The only thing that should differentiate public and private modules is access rights. Use the same quality for all code.
Understand the implications of your choices when using
~ etc. in package.js.
Code in patterns and don’t experiment in production code. Use side project / personal project to experiment, but keep production code clean and standards compliant.
Maintain conventions. Be consistent.
Q: I’m having trouble finding sources of truth on Node.
A: Erik said it’s a good idea to talk with people. Connect on Twitter, via email, in person or whatever. But talk to leaders in the community to learn about best practices.
Q: What tools can help them get to production level?
A: PayPal already had a pipeline to get code to production. For Node they use pm2, Jenkins, nginx. Also, don’t use npm install during deploy…you need to package the app and all dependencies. They use tap for testing. PayPal has proprietary system monitoring.
Q: What are the advantage of Kraken?
A: There is no need to make everyone learn idiosyncrasies of Express. Prevents misconfiguration.
We specialize in helping professional developers, like you, expand your skill set. Our courses are focused on enabling you to learn everything necessary to use a new technology in a live, production application.
All courses are made with love in
Palo Alto, CA.
Subscribe to our newsletter