Luca Mezzaira ha presentato il case study di DAZN spiegando cosa sono le micro-architetture e focalizzandosi sui micro-frontends.
Durante l'intervento, il relatore ci ha spiegato come DAZN si è approcciato allo sviluppo della propria piattaforma evolvendola da una single page application a micro-frontends.
E' seguito poi uno spazio per domande e curiosità riguardo la tematica affrontata nell’intervento.
4. 4
Scaling our applications with microfrontends
SPA
DB
Microservice
DB
Microservice
DB
Microservice
API
Gateway
5. 5
Scaling our applications with microfrontends
Microfrontend
DB
Microservice
DB
Microservice
DB
Microservice
API
Gateway
Microfrontend Microfrontend
Routing
On the edge,
Server side
Or Client side*
API
Gateway
6. “Micro-frontends are the technical
representation of a business subdomain,
they allow independent implementations with same
or different technology choices, finally
they should avoid sharing logic with other
subdomains and they are own by a single team
6
From Domain
Driven Design
(DDD)
10. Design for hundreds of developers
We are going to have
hundreds of developers
working on DAZN.
Bear in mind when you
design our new
architecture!
10
100
100
100
“
“
11. 11
DAZN teams structure
DX Team Payments BE
Cloud Engineers
Catalog FE+BE
My Account team
Help team
Sports Data team
SREs
Onboarding FE+BE
Mobile Native teams
TVs FE only
Video Player FE
13. 13
DAZN implementation
Micro-frontends
▧ Each Micro-frontend represents a
subdomain matching the business
structure
▧ It’s technology/framework agnostic
▧ A Micro-frontend is AUTONOMOUS
▧ Inside a Micro-frontend the team can
share components, code, styles or any
other asset
▧ Independent building systems
▧ 1 Micro-frontend loaded per time
▧ 1 team own 1 Micro-frontend
16. 16
How bootstrap works
<html>
<head>
<script src=”./bootstrap.js” />
</head>
<body>
...
</body>
</html>
▧ Bootstrap loaded as first
element and always
available
▧ Tiny JS layer responsible
to load micro-frontends
▧ Exposes APIs for
different micro-frontends
18. 18
How bootstrap works
Window.DAZN = {
Lifecycle: {
OnLoad: function(){...}
OnunLoad: function(){...}
},
Localstorage: {...},
...
}
▧ DAZN object exposes
methods and properties
for all the micro-frontends
▧ Each micro-frontend has
lifecycle callbacks available
▧ This object abstracts the
platform exposing
common APIs
19. Components
19
{...}
▧ Components available on NPM
private repos
▧ Components need to work with
any framework
▧ They expose a contract for the
micro-frontend to interact with
▧ Components are own by specific
teams
▧ They can be shared within same
team
21. 21
DAZN teams structure
DX Team
Cloud Engineers
SREs
Payments BE
Catalog FE+BE
My Account team
Help team
Video Player FE
Onboarding FE+BE
Mobile Native teams
TVs FE only
Sports Data team
Core Global
Core+SupportingGeneric
22. 5 teamsOnboarded on the same projects in 3 weeks
De-risk our releases
2 years without S1 incidents, multiple releases
per day, doubling the user base every year
400 techiesWorking on the same platform
22