When MicroFrontends Architecture Goes Wrong

Tomasz Ducin  •  ducin.dev  •  Bottega IT Minds

Hi, I'm Tomasz

Independent Consultant & Software Architect

Trainer, Speaker, Frontend & Backend

Bottega IT Minds, ArchitekturaNaFroncie.pl (ANF)

Developer Jutra (.pl)

Warsaw, PL

tomasz (at) ducin.dev

🦋 @ducin.dev

𝕏  @tomasz_ducin

Agenda

architecture, KEY DECISION DRIVERS, no code details

MANY PEOPLE STILL DON'T

How to ruin FE with MFE?

  • uncertain profits
  • a lot of sharing bloated
  • bloated UI component library
  • granular packages (longer build times)
  • lack of deployment frequency/count tracking
  • lack of CWV tracking (especially: LCP)

📸

Disclaimer

this technology DOES make sense... under SPECIFIC CIRCUMSTANCES!

Architecture - WDYM?

Architecture - the WHY?

👉 WHY > what & how 👈

MicroServices

  • independent deploys / failures (isolation)

  • scalability / performance

MicroFrontends

  • independent deploys / failures

  • that's it... :)

MFE case study

SECTOR: regulated/public

Fundamental question:

How OFTEN do/should you deploy?

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.

- Melvin Conway

MicroServices and MicroFrontends are technical solutions to people problems.

- someone

🤨

Sociotechnical Systems:

Socio: people, work culture, roles, relations

Tech: infrastructure, software, processes

MFE case study

SECTOR: ITIL

  • VERY BIG CORP acquiring smaller ones 
  • the need to combine multiple PRODUCTS into one
  • DIFFERENT WORK CULTURE, lots of teams
  • different tool stack

MFE case study: how to ruin?

SECTOR: ACCOUNTING

  • 1 team manages the whole app
  • splitting is UNJUSTIFIED

MFE case study: how NOT to ruin?

SECTOR: E-COMMERCE

  • LOTS OF TEAMS
  • parallel work
  • DEPENDENCIES across teams
  • different BUSINESS priorities

to MEASURE or NOT to measure?

WHAT shall we measure and why?

DF: Deployment Frequency

BEFORE MFEs:

  • measure DF
  • deployment process analysis:
    • how many steps?
    • how many parties are engaded?
    • how it changes after MFEs?
  • MFE goals:
    • shorten deployment time (of a module/app)
    • less steps
    • shorten TTM
    • team autonomy

MFE: how to ruin

DEPLOY HOST APP OFTEN

MFE: how to ruin?

MFE: how to ruin?

share state across MFEs

  • global store, anything redux-alike
  • shared via direct references
  • LACK of autonomous changes
  • LACK of autonomous stack
  • change autonomy
  • tech stack autonomy
  • change autonomy
  • LACK of tech stack autonomy

Decoupling?

Decoupling? Events!

interface MessageBroker {
  publish(topic, event): void;
  subscribe(topic, subscribeFn): void;
  unsubscribe(topic, subscribeFn): void;
}

MFE: how to ruin?

SHARE as much as you can, SHARE SHARE SHARE

MFE: how to ruin?

deploy host app OFTEN

MFE: how to ruin?

make pipeline LONGER (e.g. granular packages)

📦

📦

📦

📦

📦

📦

📦

📦

📦

📦

📦

📦

How to ruin FE with MFE?

  • uncertain profits
  • a lot of sharing bloated
  • bloated UI component library
  • granular packages (longer build times)
  • lack of deployment frequency/count tracking
  • lack of CWV tracking (especially: LCP)

👉 WHY > what & how 👈

Thank you

Tomasz Ducin  •  ducin.dev

When MicroFrontends Architecture Goes Wrong / JSPoland

By Tomasz Ducin

When MicroFrontends Architecture Goes Wrong / JSPoland

  • 676