From Java to Node – the PayPal story

One of the most prominent companies that use Node.js is PayPal, they were one of the first majors to give Node a chance, to take a risk on it and make a difference. In the beginning, node was just another language among many others, but it stood out, it grew through the people who used it and at PayPal it saw true proeminence.

Sneaking in

Node was a language to play with, to explore, nothing big, nothing important. A few companies started using it for different prototypes, PayPal started on the same path. People wanted to play with it so they got it through the door, slowly building different prototypes on it. The prototypes were fun, but more importantly, they were practical. Through some experimentation they found that they could copy a lot of code from their existent Java Stack to the Node Stack and back.

Reasons for the change

Node solved a problem for PayPal, it allowed them to do more, faster. Their existent model couldn’t catch up with existent trends, starting with the introduction of full stack developers. The biggest problem at PayPal was the barrier between the server and the browser. Node was a great solution from the beginning because it allowed them to write applications in JavaScript both for the browser and the server.  The prototype experience with Node should great promise, so naturally the next step was production.

Getting Node into production

Replacing Java on such a large scale was a risk, but past experiences gave them a lot of confidence – one of these experience proved that Node is faster and more efficient than Java. PayPal had a team of 5 engineers working on the PayPal wallet app using Java when Bill Scott, the senior director of user interface design, assigned a two person team to work on the same project using Node. In two months the two person team caught up with the five person team. That’s fast! Scott’s conclusion was “You can do more work in a shorter amount of time with half the people,” and he was right. The results spoke for themselves. The node app was written in 33 % fewer lines of code and with 40% less files.

This app was built in Kraken.js on express, using the templating engine Dust and the Java software used an internal framework that was mostly based on Spring.  The first production tests showed great promise and also brought peace of mind, as the node app responded to requests about 45% faster than the Java app, a very visible difference for the user.

This was the beginning that eventually led to a transition to Node of PaPal’s consumer facing apps.

The data was there, the performance was there and Node took over Java in PayPal.