migrating a large codebase to node & react

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

Upload: ryan-burgess

Post on 12-Jan-2017

265 views

Category:

Technology


4 download

TRANSCRIPT

Migrating a large codebase to Node & ReactRyan Burgess@burgessdryan

What is your reaction to migrating to a new codebase?

Once the migration starts it can be daunting

It doesn’t need to be that frustrating

Who am I?

Software Engineer Manager at Netflix@burgessdryan

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

How did we tackle the migration at Netflix?

What lessons did we learn?

Why migrate to a new codebase?

The ability to innovate faster

Simplify & separate concerns

Developer productivity

Why Node.js?

Our UI team is familiar with JavaScript

Less context switching

Great tooling in the Node.js ecosystem

Allows for universal rendering of UI components

Makes development fasterand increases productivity

We use Restify at NetflixLightweight

Absolute control over interactions with HTTPAutomatic DTrace support

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

Why React.js?

Why not any of these other frameworks?

React supports universal rendering

Lightweight

Performance / Virtual DOM

Unified our markup with corresponding view logic

Developer happiness

A solid community

How we tackled the migration at Netflix

Decouple design changes from architecture changes

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

Allows for flexibility and ability to learn

Allowed us to pivot

Before leveraging React we used Dust.js

https://github.com/linkedin/dustjs

Plan to support two codebases

Leverage metrics• Atlas metrics• A/B test metrics

Atlas metrics

Atlas metrics

A/B test

vs

A/A test

vs

Metric cyclePush to production

Check metricsInvestigate / Iterate

What lessons didwe learn?

Estimating a migration is hard

Choose a technology that works for you and your team

Migrate in sections, not all at once

Design changes can impactyour metrics

Use metrics whenever possible

Thank you!@burgessdryan