SlideShare a Scribd company logo
13 Feb 2020
Eugene Fidelin
Node.js BFFs
our way to better/micro
frontends
Micro frontends
mFs - an architectural style where independently
deliverable frontend applications are composed
into a greater whole
Micro frontends
Cam Jakson, ThoughtWorks
How to compose mFs
Without container app
• HTTP server routing to redirect multiple frontends
With container app
• Server-side template composition
• Client-side integration via iframes
• Client-side integration via JavaScript
• Client-side integration via Web Components
Micro frontends and BFFs
BFF – a pattern where each frontend application
has a corresponding backend whose purpose is
solely to serve the needs of that frontend
• authentication/authorization
• a/b experiments setup
• data fetching and aggregation
• server-side rendering
Micro frontends and BFFs
Cam Jakson, ThoughtWorks
Where we were 2 years ago
� Huge monolithic frontends tightly coupled with backend services
� No clear ownership of the frontend codebase
� Business logic in the view layer
� No support for multiple tenants and languages
� Fragile builds because of huge amount of e2e tests
� Very long time to market
� Very old JavaScript stack
� Minimal developer happiness
Where we are now
✅ > 20 small BFFs tailored to a specific step(s) of a user journey
✅ Each BFF is owned by a specific team
✅ Backend APIs don’t leak business logic to BFFs
✅ Support for multiple tenants and languages
✅ Stable builds due to more unit and integration tests and less e2e tests.
✅ Short time to market
✅ Modern JS and frameworks on the server and client
✅ Higher developer happiness and productivity 
Architectural changes
Zoom into BFF
Developer experience
• BFFs can easily run locally, no hard dependencies on other services
• Able to use APIs from any environment: int, demo, dev-tenant or local
• Frontend developers write both server and client
• Swagger is the contract between BFFs and APIs
• Plenty of ready-to-use internal libraries and components
• Styling is provided by Design System
Code share and reuse
• Design System
• common styles, fonts and images
• React components
• atoms and molecules (Buttons, Dialogs, …)
• organisms (Header & Footer)
• Server instrastructure code
• middlewares
• API clients
• HTML rendering
• metrics, logging and tracing
Testing strategy
Jest, react-test-renderer
Mocha, Chai, Sinon
Jest snapshots
Cypress.io (wip)
Seleniume2e
Mock API
QATestLab
Stage of the
Docker build
Build and deploy
• Shared build config (Webpack, Babel, eslint, …)
• Automated dependecy updates
• Automated builds for master and PR
• Shared multi-stage Docker build
• Feature switches and a/b switches
• Canary releases
• One-click production rollback
Scale and performance
• Frontend app uses only its own BFF (1 exception)
• CDN to serve static resources
• SSR only for bots and app shell
• Run calls to BE APIs in parallel
• Smart load balancing of BE API calls
• Keep BFFs small
• Scale by increasing number of instances
Alerting & Monitoring
Server:
• Access and error logs in Kibana
• Metrics in Graphana
• Node.js event loop and garbage collector
• Response status and latency
• Tracing in Jaeger
• Profile and monitor distributed platform
Client:
• Error logs in Sentry
How we make decisions
ADRs – capture an important architectural decisions made along with its
context and consequences.
TechRadar – list of technologies we observe: currently used, tested,
under research or put on hold. The list has four major categories:
Techniques, Tools, Platforms, Language & frameworks.
Frontend guild – supports close collaboration and knowledge sharing
among all frontend developers.
 Pros
+huge improvement on time-to-
market for product features
+smaller, more isolated and
maintainable codebases
+more scalable organisation with
decoupled, autonomous teams
+the ability to update or rewrite
parts of the frontend in a more
incremental fashion
−duplication of dependencies and
increasing the number of bytes
the users must download
−team autonomy can lead to
platform fragmentation and
inconsistent codebases
−struggle to keep all frontends
up-to-date
−CI/CD pipeline performance
becomes a bottleneck
 Cons
Usefull links
• Micro Frontends (Cam Jackson)
• Pattern: Backends For Frontends (Sam Newman)
• Micro-frontend Architecture in Action with six ways (Phodal Huang)
• Micro-frontends resources (Luca Mezzalira)
Thank you!
Eugene Fidelin
linkedin.com/in/eugef
medium.com/@EugeneFidelin

More Related Content

What's hot

Front end architecture
Front end architectureFront end architecture
Front end architecture
Remus Langu
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Introduction to Testcontainers
Introduction to TestcontainersIntroduction to Testcontainers
Introduction to Testcontainers
VMware Tanzu
 
Micro Frontends Architecture - Jitendra kumawat (Guavus)
Micro Frontends Architecture - Jitendra kumawat (Guavus)Micro Frontends Architecture - Jitendra kumawat (Guavus)
Micro Frontends Architecture - Jitendra kumawat (Guavus)
Tech Triveni
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
Žilvinas Kuusas
 
Universal React apps in Next.js
Universal React apps in Next.jsUniversal React apps in Next.js
Universal React apps in Next.js
🐕 Łukasz Ostrowski
 
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Codemotion
 
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and MicroservicesCase Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
Kai Wähner
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Jayant Surana
 
Front end architecture patterns
Front end architecture patternsFront end architecture patterns
Front end architecture patterns
Oleksandr Tryshchenko
 
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJSMicro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
KNOWARTH - Software Development Company
 
Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?
Lohika_Odessa_TechTalks
 
How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elements
MarcellKiss7
 
Angular
AngularAngular
Angular
sridhiya
 
Serverless computing
Serverless computingServerless computing
Serverless computing
Om Vikram Thapa
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
Talentica Software
 
Javascript
JavascriptJavascript
Javascript
Mallikarjuna G D
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro Frontend
Yugo Sakamoto
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
Paul Mooney
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith Architecture
MohamedElGohary71
 

What's hot (20)

Front end architecture
Front end architectureFront end architecture
Front end architecture
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Introduction to Testcontainers
Introduction to TestcontainersIntroduction to Testcontainers
Introduction to Testcontainers
 
Micro Frontends Architecture - Jitendra kumawat (Guavus)
Micro Frontends Architecture - Jitendra kumawat (Guavus)Micro Frontends Architecture - Jitendra kumawat (Guavus)
Micro Frontends Architecture - Jitendra kumawat (Guavus)
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Universal React apps in Next.js
Universal React apps in Next.jsUniversal React apps in Next.js
Universal React apps in Next.js
 
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
 
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and MicroservicesCase Study: How to move from a Monolith to Cloud, Containers and Microservices
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
 
Front end architecture patterns
Front end architecture patternsFront end architecture patterns
Front end architecture patterns
 
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJSMicro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
 
Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?Micro-frontends – is it a new normal?
Micro-frontends – is it a new normal?
 
How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elements
 
Angular
AngularAngular
Angular
 
Serverless computing
Serverless computingServerless computing
Serverless computing
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
 
Javascript
JavascriptJavascript
Javascript
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro Frontend
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Micro services vs Monolith Architecture
Micro services vs Monolith ArchitectureMicro services vs Monolith Architecture
Micro services vs Monolith Architecture
 

Similar to Node.js BFFs: our way to better/micro frontends

Node.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontendsNode.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontends
Eugene Fidelin
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
iMOBDEV Technologies Pvt. Ltd.
 
Prominent Back-end frameworks to consider in 2022!
Prominent Back-end frameworks to consider in 2022!Prominent Back-end frameworks to consider in 2022!
Prominent Back-end frameworks to consider in 2022!
Shelly Megan
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
IT Arena
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum SlidesAbhishek Gupta
 
Kunal bhatia resume mass
Kunal bhatia   resume massKunal bhatia   resume mass
Kunal bhatia resume mass
Kunal Bhatia, MBA Candidate, BSc.
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao Behara
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao Behara
 
Case Study: USDA Maximizing Collaboration with NetBeans and Codebeamer
Case Study: USDA Maximizing Collaboration with NetBeans and CodebeamerCase Study: USDA Maximizing Collaboration with NetBeans and Codebeamer
Case Study: USDA Maximizing Collaboration with NetBeans and Codebeamer
tabithascatena
 
Itp web application development
Itp web application developmentItp web application development
Itp web application developmentShibu S R
 

Similar to Node.js BFFs: our way to better/micro frontends (20)

Node.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontendsNode.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontends
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
Manikanta_Chimata
Manikanta_ChimataManikanta_Chimata
Manikanta_Chimata
 
Chalam_JAVA_Portal
Chalam_JAVA_PortalChalam_JAVA_Portal
Chalam_JAVA_Portal
 
Prominent Back-end frameworks to consider in 2022!
Prominent Back-end frameworks to consider in 2022!Prominent Back-end frameworks to consider in 2022!
Prominent Back-end frameworks to consider in 2022!
 
Resume
ResumeResume
Resume
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Arun Kumar(7.8Yrs).DOC
Arun Kumar(7.8Yrs).DOCArun Kumar(7.8Yrs).DOC
Arun Kumar(7.8Yrs).DOC
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
 
Kunal bhatia resume mass
Kunal bhatia   resume massKunal bhatia   resume mass
Kunal bhatia resume mass
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_Webservice
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_Webservice
 
Devendra_SrJavaJ2eeDeveloper
Devendra_SrJavaJ2eeDeveloperDevendra_SrJavaJ2eeDeveloper
Devendra_SrJavaJ2eeDeveloper
 
Case Study: USDA Maximizing Collaboration with NetBeans and Codebeamer
Case Study: USDA Maximizing Collaboration with NetBeans and CodebeamerCase Study: USDA Maximizing Collaboration with NetBeans and Codebeamer
Case Study: USDA Maximizing Collaboration with NetBeans and Codebeamer
 
Venkata
VenkataVenkata
Venkata
 
Itp web application development
Itp web application developmentItp web application development
Itp web application development
 
Resume_Venugopal
Resume_VenugopalResume_Venugopal
Resume_Venugopal
 
Sai_Resume
Sai_ResumeSai_Resume
Sai_Resume
 
Saravanan_Sundaresan_ESB_ATG
Saravanan_Sundaresan_ESB_ATGSaravanan_Sundaresan_ESB_ATG
Saravanan_Sundaresan_ESB_ATG
 

More from Eugene Fidelin

Testing: Do More With Less
Testing: Do More With LessTesting: Do More With Less
Testing: Do More With Less
Eugene Fidelin
 
Housekeeping the platform at scale
Housekeeping the platform at scaleHousekeeping the platform at scale
Housekeeping the platform at scale
Eugene Fidelin
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
Eugene Fidelin
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
Eugene Fidelin
 
Безопасность Drupal сайтов
Безопасность Drupal сайтовБезопасность Drupal сайтов
Безопасность Drupal сайтов
Eugene Fidelin
 
Разработка и deploy Drupal сайтов с помощью Features.
Разработка и deploy Drupal сайтов с помощью Features.Разработка и deploy Drupal сайтов с помощью Features.
Разработка и deploy Drupal сайтов с помощью Features.
Eugene Fidelin
 
Работа с Views в Drupal 7
Работа с Views в Drupal 7Работа с Views в Drupal 7
Работа с Views в Drupal 7
Eugene Fidelin
 
Работа с полями (fields) в Drupal 7
Работа с полями (fields) в Drupal 7Работа с полями (fields) в Drupal 7
Работа с полями (fields) в Drupal 7
Eugene Fidelin
 
Работа с материалами (nodes) в Drupal 7
Работа с материалами (nodes) в Drupal 7Работа с материалами (nodes) в Drupal 7
Работа с материалами (nodes) в Drupal 7
Eugene Fidelin
 
Работа с БД в Drupal 7
Работа с БД в Drupal 7Работа с БД в Drupal 7
Работа с БД в Drupal 7
Eugene Fidelin
 
Фичи н-н-нада? Или почему стоит использовать модуль Features.
Фичи н-н-нада? Или почему стоит использовать модуль Features.Фичи н-н-нада? Или почему стоит использовать модуль Features.
Фичи н-н-нада? Или почему стоит использовать модуль Features.
Eugene Fidelin
 

More from Eugene Fidelin (11)

Testing: Do More With Less
Testing: Do More With LessTesting: Do More With Less
Testing: Do More With Less
 
Housekeeping the platform at scale
Housekeeping the platform at scaleHousekeeping the platform at scale
Housekeeping the platform at scale
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
 
Безопасность Drupal сайтов
Безопасность Drupal сайтовБезопасность Drupal сайтов
Безопасность Drupal сайтов
 
Разработка и deploy Drupal сайтов с помощью Features.
Разработка и deploy Drupal сайтов с помощью Features.Разработка и deploy Drupal сайтов с помощью Features.
Разработка и deploy Drupal сайтов с помощью Features.
 
Работа с Views в Drupal 7
Работа с Views в Drupal 7Работа с Views в Drupal 7
Работа с Views в Drupal 7
 
Работа с полями (fields) в Drupal 7
Работа с полями (fields) в Drupal 7Работа с полями (fields) в Drupal 7
Работа с полями (fields) в Drupal 7
 
Работа с материалами (nodes) в Drupal 7
Работа с материалами (nodes) в Drupal 7Работа с материалами (nodes) в Drupal 7
Работа с материалами (nodes) в Drupal 7
 
Работа с БД в Drupal 7
Работа с БД в Drupal 7Работа с БД в Drupal 7
Работа с БД в Drupal 7
 
Фичи н-н-нада? Или почему стоит использовать модуль Features.
Фичи н-н-нада? Или почему стоит использовать модуль Features.Фичи н-н-нада? Или почему стоит использовать модуль Features.
Фичи н-н-нада? Или почему стоит использовать модуль Features.
 

Recently uploaded

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Node.js BFFs: our way to better/micro frontends

  • 1. 13 Feb 2020 Eugene Fidelin Node.js BFFs our way to better/micro frontends
  • 2. Micro frontends mFs - an architectural style where independently deliverable frontend applications are composed into a greater whole
  • 4. How to compose mFs Without container app • HTTP server routing to redirect multiple frontends With container app • Server-side template composition • Client-side integration via iframes • Client-side integration via JavaScript • Client-side integration via Web Components
  • 5. Micro frontends and BFFs BFF – a pattern where each frontend application has a corresponding backend whose purpose is solely to serve the needs of that frontend • authentication/authorization • a/b experiments setup • data fetching and aggregation • server-side rendering
  • 6. Micro frontends and BFFs Cam Jakson, ThoughtWorks
  • 7. Where we were 2 years ago � Huge monolithic frontends tightly coupled with backend services � No clear ownership of the frontend codebase � Business logic in the view layer � No support for multiple tenants and languages � Fragile builds because of huge amount of e2e tests � Very long time to market � Very old JavaScript stack � Minimal developer happiness
  • 8. Where we are now ✅ > 20 small BFFs tailored to a specific step(s) of a user journey ✅ Each BFF is owned by a specific team ✅ Backend APIs don’t leak business logic to BFFs ✅ Support for multiple tenants and languages ✅ Stable builds due to more unit and integration tests and less e2e tests. ✅ Short time to market ✅ Modern JS and frameworks on the server and client ✅ Higher developer happiness and productivity 
  • 11. Developer experience • BFFs can easily run locally, no hard dependencies on other services • Able to use APIs from any environment: int, demo, dev-tenant or local • Frontend developers write both server and client • Swagger is the contract between BFFs and APIs • Plenty of ready-to-use internal libraries and components • Styling is provided by Design System
  • 12. Code share and reuse • Design System • common styles, fonts and images • React components • atoms and molecules (Buttons, Dialogs, …) • organisms (Header & Footer) • Server instrastructure code • middlewares • API clients • HTML rendering • metrics, logging and tracing
  • 13. Testing strategy Jest, react-test-renderer Mocha, Chai, Sinon Jest snapshots Cypress.io (wip) Seleniume2e Mock API QATestLab Stage of the Docker build
  • 14. Build and deploy • Shared build config (Webpack, Babel, eslint, …) • Automated dependecy updates • Automated builds for master and PR • Shared multi-stage Docker build • Feature switches and a/b switches • Canary releases • One-click production rollback
  • 15. Scale and performance • Frontend app uses only its own BFF (1 exception) • CDN to serve static resources • SSR only for bots and app shell • Run calls to BE APIs in parallel • Smart load balancing of BE API calls • Keep BFFs small • Scale by increasing number of instances
  • 16. Alerting & Monitoring Server: • Access and error logs in Kibana • Metrics in Graphana • Node.js event loop and garbage collector • Response status and latency • Tracing in Jaeger • Profile and monitor distributed platform Client: • Error logs in Sentry
  • 17. How we make decisions ADRs – capture an important architectural decisions made along with its context and consequences. TechRadar – list of technologies we observe: currently used, tested, under research or put on hold. The list has four major categories: Techniques, Tools, Platforms, Language & frameworks. Frontend guild – supports close collaboration and knowledge sharing among all frontend developers.
  • 18.  Pros +huge improvement on time-to- market for product features +smaller, more isolated and maintainable codebases +more scalable organisation with decoupled, autonomous teams +the ability to update or rewrite parts of the frontend in a more incremental fashion −duplication of dependencies and increasing the number of bytes the users must download −team autonomy can lead to platform fragmentation and inconsistent codebases −struggle to keep all frontends up-to-date −CI/CD pipeline performance becomes a bottleneck  Cons
  • 19. Usefull links • Micro Frontends (Cam Jackson) • Pattern: Backends For Frontends (Sam Newman) • Micro-frontend Architecture in Action with six ways (Phodal Huang) • Micro-frontends resources (Luca Mezzalira)