Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Breaking the frontend monolith - #frontendconn...

Nick Balestra
September 23, 2017

Breaking the frontend monolith - #frontendconnect17

While breaking the monolith into micro-services is a common approach for the backend, most frontends are still running as a monolithic application. Therefore building, deploying and consuming frontend components across a diversity of teams and web applications can be a daunting task, especially at scale. To address this issue, at OpenTable we enable fast-moving teams to easily build and deploy front-end components using OpenComponents, an open-source, battle tested, front-end microservice architecture for painless component delivery.
During this session I’ll explain how OpenComponents works, how do we use it at OpenTable and how we allows teams to build frontend components with different client-side technologies that seamless work together.

Nick Balestra

September 23, 2017
Tweet

More Decks by Nick Balestra

Other Decks in Technology

Transcript

  1. Cześć! Software engineer @OpenTable, DX Team Co-author of create-cycle-app &

    redux-cycles Love OSS/JS/Node OpenComponents core team Follow me: @nickbalestra
  2. Breaking the frontend monolith A story about refactoring, decentralized FE

    architectures, and fast moving teams. @nickbalestra A story about refactoring, decentralized FE architectures, and fast moving teams.
  3. Firstly, a bit of background • OpenTable, founded in 1998

    - PCLN (NASDAQ) • We find a table for 23+ million diners/month
  4. Firstly, a bit of background • OpenTable, founded in 1998

    - PCLN (NASDAQ) • We find a table for 23+ million diners/month • 300+ engineers
  5. Firstly, a bit of background • OpenTable, founded in 1998

    - PCLN (NASDAQ) • We find a table for 23+ million diners/month • 300+ engineers • Europe, North and South America, Asia
  6. Firstly, a bit of background • OpenTable, founded in 1998

    - PCLN (NASDAQ) • We find a table for 23+ million diners/month • 300+ engineers • Europe, North and South America, Asia • Millions requests/minute
  7. Firstly, a bit of background • OpenTable, founded in 1998

    - PCLN (NASDAQ) • We find a table for 23+ million diners/month • 300+ engineers • Europe, North and South America, Asia • Millions requests/minute • Full-stack culture
  8. Once upon a time... < Start /> < Restaurant />

    < Search /> microsite microsite microsite
  9. Restaurant Profile Search Results Start Front-door routing microsite: "start" metro:

    "San Francisco" www.opentable.com/san-francisco-restaurants
  10. Restaurant Profile Search Results Start https://start-123/?domain=com&metro=4 Front-door routing microsite: "start"

    metro: "San Francisco" < Restaurant /> < Search /> < Start /> www.opentable.com/san-francisco-restaurants
  11. Restaurant Profile Search Results Start https://start-123/?domain=com&metro=4 Front-door routing microsite: "start"

    metro: "San Francisco" < Restaurant /> < Search /> < Start /> www.opentable.com/san-francisco-restaurants microsite
  12. v0 architecture Restaurant Profile Search Results Start https://start-123/?domain=com&metro=4 https://components-123/header {

    "html": "<div class=\"header\">Hello World</div>", "type":"html" } www.opentable.com/san-francisco-restaurants
  13. v0 architecture Restaurant Profile Search Results Start https://start-123/?domain=com&metro=4 https://components-123/header {

    "html": "<div class=\"header\">Hello World</div>", "type":"html" } https://components-123/header?userType=admin&... www.opentable.com/san-francisco-restaurants
  14. v0 architecture Restaurant Profile Search Results Start < Page />

    https://start-123/?domain=com&metro=4 https://components-123/header { "html": "<div class=\"header\">Hello World</div>", "type":"html" } https://components-123/header?userType=admin&... www.opentable.com/san-francisco-restaurants
  15. TLDR; • #1 - Microsites architecture • #2 - Sharing

    the common parts • #3 - Serverless architecture for micro frontends
  16. TLDR; • #1 - Microsites architecture • #2 - Sharing

    the common parts • #3 - Serverless architecture for micro frontends • #4 - Component stack abstraction
  17. TLDR; • #1 - Microsites architecture • #2 - Sharing

    the common parts • #3 - Serverless architecture for micro frontends • #4 - Component stack abstraction
  18. Server-side rendering const Client = require('oc-client'); const client = new

    Client({ registries: ['https://registry.com/'], components: ['header'] }); client.renderComponent('header', (err, componentHTML) => {
 console.log(componentHTML) // rendered html
 });
  19. Who's using OC? OpenComponents are great! It has helped us

    break our monolithic architecture into smaller components and achieve improved speed of delivery, team autonomy and ownership of different parts of the website. Independent ownership and releases of components have sped up our feature delivery drastically.
  20. Who's using OC? OpenComponents are great! It has helped us

    break our monolithic architecture into smaller components and achieve improved speed of delivery, team autonomy and ownership of different parts of the website. Independent ownership and releases of components have sped up our feature delivery drastically. We have been using OpenComponents for bringing in flexibility of having a common layouts for different front-end blocks. Whether it's Header, or different related content widgets. We are actually in process of adding new OCs/enhancements every month. Its comes with joy of independent deployments, continuous delivery and integration, and of-course all the added benefits of Node.Js!