Presentation: Enterprise Node.JS Apps in 2018

Track: JavaScript and Beyond: The Future of the Frontend

Location: Windsor, 5th flr.

Duration: 10:35am - 11:25am

Day of week: Tuesday

Level: Intermediate

Share this on:

What You’ll Learn

  1. Learn about the challenges facing large-scale node.js deployments and how new tools and patterns can help you tackle them.
  2. Find out how async/await is modernizing error handling in node apps.
  3. Hear strategies for debugging production node.js applications.

Abstract

This talk is a candid and entertaining look at challenges facing node.js app developers in 2018. Reflecting on experiences building PayPal’s Send Money app we’ll look at how we respond to memory leaks, server crashes and bugs that only seem to reproduce on production. I’ll also address how to keep up with the ever-changing JavaScript ecosystem.

With those challenges as the backdrop this talk will focus on techniques and patterns we’ve grown to depend on including: Typed JavaScript, Node’s built-in inspector module, async/await, error handling best practices and building for change. We’re excited about how we’re using node at PayPal and hope you can learn from our experience and scale.

Question: 

What are you doing today?

Answer: 

My job now is helping various teams make sure they're doing things the best way possible. If they're using React and Webpack or another set of tools, making sure that it's set up and configured well, making sure that they aren't making any common mistakes that we can help them avoid. Then, on the Node side, making sure people are using the latest technologies. I've been instrumental in helping our teams get upgraded to Node 6 and then 8, and keeping current with those technologies, staying aware of changes in the ecosystem, like Babel or TypeScript, GraphQL and other tools that have allowed us to do more interesting things and trying to keep ahead of the curb. Then working on turning the big ship that is PayPal engineering in a better and smarter direction.

Question: 

You said Node is part of your front-end. What does that mean?

Answer: 

There's been a talk in the community for a while that Node is the back-end for the front-end. We have our back-end services teams and then we have our front-end teams. The front-end teams are using Node to prepare the data that comes from our services down to the customers. Our Node layer is an orchestration layer, and we massage that data and make it easy to consume by our clients.

Question: 

What's this talk about? Node for the front-end?

Answer: 

What I want to show in this talk is how we’ve managed to deal with the challenges of maintaining large-scale node.js apps over time. When we build out these apps it’s difficult to predict how the technology and product might change. What kind of bugs and challenges are cropping up that we didn’t predict and how we’re solving them.  For example just as FlowType was coming out we were dealing with a lot of server crashes. It’s helped us a lot. I'll also talk a few times about how we tried to move forward too quickly, and we burned ourselves. It's okay to slow down sometimes and say, what we have right now is working fine. Maybe we don't need to jump on the latest trend every week. I've got to try Gulp and then I've got to try WebPack or Broccoli, and then I'm going to try this one or try that. Maybe it's OK to say, we're going to try this for a year until it stops working for us.

Question: 

Are you talking about strategies within the JavaScript world for dealing with continuously evolving frameworks and change?

Answer: 

What I'm trying to do is show what technology choices we've made that I'm really excited about. One of the things that we've done lately is we started using async/await on the node side and I want to show how we're doing error handling with tha., I think it’s an elegant solution. JavaScript relies heavily on the community consensus, these are the “best practices”. But it seems like the best practices change every six months. I'll share what we feel are the best ways to program JavaScript primarily on the Node side but I'll throw a few highlights about how we builds UIs with React, Webpack, etc. and share some tips for preparing for when the change inevitably comes.

Question: 

Who is the persona that you're talking to?

Answer: 

Anyone who's working on JavaScript heavily I think will benefit from this talk. All the technologies that I'm talking about apply on the server as well as the client side, so there will be benefits on both ends. But I really love to talk to the Node engineers out there, people that are working in JavaScript shops that want to figure out, I'm sick of having to upgrade my stuff every 4 months. How do I decide when to slow down and when to speed up, and I hope there are lessons from PayPal, good and bad, that shed some light on the process.

Question: 

If a senior JavaScript engineer comes up to you and asks, What is the one thing that I should be focused on for 2018? How do you answer?

Answer: 

For us we're looking at moving to GraphQL for our client/server interaction. Many people are looking to empower front end developers to own what data they need and I think GraphQL is an important technology. Also for the client side, Service Workers and PWAs are really improving the web experience. So those are the two technologies that I'm really excited about right now.

Question: 

How do you see your Node architecture evolving with GraphQL?

Answer: 

We're shrinking the Node part down. We've got GraphQL. We're doing more work there so the UI engineers can focus more on building in their environment and less than having to update our node servers. Right now, the full stack engineers say they want to build some new component for the user interface, so they build the UI part, and they also have to go on the server and update the REST APIs and do all this. We're filling it with GraphQL. We can really shrink our Node servers down to do a very minimal amount of work while the front end is able to do more and more. So, it empowers front and developers to continue to focus there without having to switch contexts into the server aspect. In some ways it is shrinking what Node has to do for us, but I think it will make us deliver better apps faster.

Question: 

What other changes do you expect to come to JavaScript ecosystem?

Answer: 

I think artificial intelligence has basically not been fully embraced by the JavaScript community. I think in 2018-2019 we are going to start seeing more and more artificial intelligence and machine learning coming to JavaScript., and this is going to change a lot of our tools. One of the things I’ll briefly mention in my talk is abstract syntax trees. In the last couple of years ASTs have powered many of the popular tools in JS like Babel and ESLint. In the future I think we're going to see a lot of innovation come from artificial intelligence, machine learning, changing our build tools, change our IDEs and our developer experience all around. The last thing that I think is going to be huge is going to be augmented reality and virtual reality for the web. It's not going to be this year, give it 2-3 years, it's going to be amazing. There's haters out there but it's going to be a big deal.

Speaker: Jamund Ferguson

JS Architect @PayPal

Jamund Ferguson is a JavaScript architect at PayPal. He loves to look at how following patterns consistently can prevent bugs in applications. He’s previously contributed to the ESLint and StandardJS open-source projects and has as of late become a fan of FlowType and TypeScript. He is married with two kids and lives near Portland, OR.

Find Jamund Ferguson at

Last Year's Tracks

Monday, 5 March

Tuesday, 6 March

Wednesday, 7 March