Top Banner
Migrating a large codebase to Node & React Ryan Burgess @burgessdryan
51

Migrating a large codebase to Node & React

Jan 12, 2017

Download

Technology

Ryan Burgess
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Migrating a large codebase to Node & React

Migrating a large codebase to Node & ReactRyan Burgess@burgessdryan

Page 2: Migrating a large codebase to Node & React

What is your reaction to migrating to a new codebase?

Page 3: Migrating a large codebase to Node & React
Page 4: Migrating a large codebase to Node & React

Once the migration starts it can be daunting

Page 5: Migrating a large codebase to Node & React
Page 6: Migrating a large codebase to Node & React

It doesn’t need to be that frustrating

Page 7: Migrating a large codebase to Node & React

Who am I?

Page 8: Migrating a large codebase to Node & React

Software Engineer Manager at Netflix@burgessdryan

Page 9: Migrating a large codebase to Node & React
Page 10: Migrating a large codebase to Node & React
Page 11: Migrating a large codebase to Node & React

Why migrate to a new codebase? Why React & Node?

How did we tackle the migration at Netflix?

What lessons did we learn?

Page 12: Migrating a large codebase to Node & React

Why migrate to a new codebase?

Page 13: Migrating a large codebase to Node & React

The ability to innovate faster

Page 14: Migrating a large codebase to Node & React

Simplify & separate concerns

Page 15: Migrating a large codebase to Node & React

Developer productivity

Page 16: Migrating a large codebase to Node & React

Why Node.js?

Page 17: Migrating a large codebase to Node & React

Our UI team is familiar with JavaScript

Page 18: Migrating a large codebase to Node & React

Less context switching

Page 19: Migrating a large codebase to Node & React

Great tooling in the Node.js ecosystem

Page 20: Migrating a large codebase to Node & React

Allows for universal rendering of UI components

Page 21: Migrating a large codebase to Node & React

Makes development fasterand increases productivity

Page 22: Migrating a large codebase to Node & React

We use Restify at NetflixLightweight

Absolute control over interactions with HTTPAutomatic DTrace support

https://github.com/restify/node-restify

Page 23: Migrating a large codebase to Node & React

Why React.js?

Page 24: Migrating a large codebase to Node & React

Why not any of these other frameworks?

Page 25: Migrating a large codebase to Node & React

React supports universal rendering

Page 26: Migrating a large codebase to Node & React

Lightweight

Page 27: Migrating a large codebase to Node & React

Performance / Virtual DOM

Page 28: Migrating a large codebase to Node & React

Unified our markup with corresponding view logic

Page 29: Migrating a large codebase to Node & React
Page 30: Migrating a large codebase to Node & React

Developer happiness

Page 31: Migrating a large codebase to Node & React

A solid community

Page 32: Migrating a large codebase to Node & React

How we tackled the migration at Netflix

Page 33: Migrating a large codebase to Node & React

Decouple design changes from architecture changes

Page 34: Migrating a large codebase to Node & React

Don’t try to migrate all at once, tackle in sections

Page 35: Migrating a large codebase to Node & React

Allows for flexibility and ability to learn

Page 36: Migrating a large codebase to Node & React

Allowed us to pivot

Before leveraging React we used Dust.js

https://github.com/linkedin/dustjs

Page 37: Migrating a large codebase to Node & React

Plan to support two codebases

Page 38: Migrating a large codebase to Node & React

Leverage metrics• Atlas metrics• A/B test metrics

Page 39: Migrating a large codebase to Node & React

Atlas metrics

Page 40: Migrating a large codebase to Node & React

Atlas metrics

Page 41: Migrating a large codebase to Node & React

A/B test

vs

Page 42: Migrating a large codebase to Node & React

A/A test

vs

Page 43: Migrating a large codebase to Node & React

Metric cyclePush to production

Check metricsInvestigate / Iterate

Page 44: Migrating a large codebase to Node & React

What lessons didwe learn?

Page 45: Migrating a large codebase to Node & React

Estimating a migration is hard

Page 46: Migrating a large codebase to Node & React

Choose a technology that works for you and your team

Page 47: Migrating a large codebase to Node & React

Migrate in sections, not all at once

Page 48: Migrating a large codebase to Node & React

Design changes can impactyour metrics

Page 49: Migrating a large codebase to Node & React

Use metrics whenever possible

Page 50: Migrating a large codebase to Node & React
Page 51: Migrating a large codebase to Node & React

Thank you!@burgessdryan