SlideShare a Scribd company logo
1 of 101
Download to read offline
Biography
· Gameloft
· DevPro
· Pics.io
· Epam
· Namecheap.com
· Frontend
· Backend
· Infrastructure
· Pre-sale
· System Design
Founder Stellar Ukraine
Charity Foundation
Founder KharkivJS
Conference
Social Media
Let me tell you a story…
The story starts with a
reference to the past.
Which reasons to use
Microservice?
2014
· Increase Resilience
· Improved scalability
· The ability to use the right tool for the right task
· Fast and flexible delivery
· Easier debugging and maintenance
· Improved ROI with reduced TCO
· Mitigate Convey Law Risk
Reasons to use Microservices
Microservices is not a
silver bullet
2017–2018
What about Frontend
Microservices?
2018
Namecheap
development history
2015 – We have started migrating our monolith to microservices.
2016 – Monolith becomes smaller. Microservices grow. Frontend
remains unchanged.
2017 – Monolith becomes smaller and smaller. Microservices are
everywhere. Frontend remains unchanged.
2018 – What to do with frontend?
History
How usually Frontend looks
like in huge projects
Service [1]
Service [2]
Service [3]
Frontend
Gateway
Let’s see in more detail…
Frontend
What we really had?
· CMS served tones Frontend pages
· Some separate FE services on NodeJS
· No rules
· No agreement
· 16 Lighthouse Desktop Score
· Dozens of unknown scripts loading
· Multiple version of same dependencies
Service [1]
Service [2]
Service [3]
Frontend
Gateway Backend for
Frontend [1]
Backend for
Frontend [2]
Our next step is frontend
extraction
Benefits
· Independent deploys
· Frontend agnostic approach
· Developers can use modern technology
· Development Experience
· Faster changes
Enough? Almost…
· What about structural consistency?
· What about UI consistency?
· What about cross dependent releases?
· What about sharing UI functionality?
· What about reusing part of UI on different pages?
So we decided to try
frontend microservices…
Goals
· Page consists of several fragments
· Fragment is independent application
· Application supports client side routing
· SSR should be supported
· UI have to be consistent
Requirements
· HTML Page is delivered by layout streaming system
· A unit of streaming is a fragment
· Streaming is lighting fase
· Fragment is a regular frontend application
· Framework Agnostic
· CSS Isolated
· Support Global Routes
· Fragment Delivery is Independent
· Fragment knows nothing about others
· Code sharing
Organizational goals
· Mitigate Convey Law Risks
· Team is independent unit
· Application and system should be testable and reliable
· Avoid communication overkill
Application #1
Application #2
Application #3
Imagine it is your browser
New Architecture
Service [1]
Service [2]
Service [3]
Gateway
Frontend
Microservice
Engine
Fragment [1]
Fragment [2]
Fragment [3]
But in reality…
Service [1]
Service [2]
Service [3]
Gateway
Frontend
Microservice
Engine
Fragment [1]
Fragment [2]
Fragment [3]
Scary Part of
Frontend
Full Architecture View
Service [1]
Service [2]
Service [3]
Gateway
Frontend
Microservice
Engine
Fragment [1]
Fragment [2]
Fragment [3]
Frontend
Microservice
Registry
App #1
App #2
App #3
What is Microservice Engine?
Web Service responsible for processing
incoming requests, discover page
fragments, communicate to fragment
services and form HTML.
What is Microservice Registry?
Web Service with persistent storage that
manage basic entities like routes,
template, fragments and their relationship.
What is Fragment?
Development unit. It is just regular
frontend service.
How it works
together
How it works together. Server Side
Browser Gateway
Frontend
Microservice
Engine
Frontend
Microservice
Registry
Fragments
Form HTTP
Response
HTML Inject Scripts
Inject JSON
configuration
Object
How it works together. Client Side
Browser
Load
Microservice
Engine Script
Load Injected
Fragment
Scripts
Parse
Configuration
Object
Match Route
Load ESM
Modules for
Fragments
Render/Hydrate
Applications
Client/Server side routing
Allow to build isomorphic routing.
Browser
Frontend
Microservice
Engine
Router
App Router [1]
App Router [2]
App Router [3]
Client side routing. Frontend
Browser MSS Engine App Routes
route/ms1
route/ms2
route/ms3
route/*
/ms1
/ms2
/ms3
What is Route
Route Template
What is Template ?
</head>
<body>
<ilc-slot id="navbar" />
<ilc-slot id="body" />
<ilc-slot id="footer" />
</body>
</html>
Template customization
</head>
<body>
<header> Hello World!!! </header>
<ilc-slot id="navbar" />
<ilc-slot id="body" />
<ilc-slot id="footer" />
</body>
</html>
What is Route
Route Template
Slots
• Anchor for a Frontend Application.
• Declare node from Application is embedded.
What is Slot
What is Route
Route Template
Slots Application
Client Side Integration
const application = {
bootstrap: () => Promise.resolve(),
mount: () => Promise.resolve(),
unmount: () => Promise.resolve(),
}
Bootstrap
This lifecycle function will be called once, right before the
registered application is mounted for the first time.
Mount
mount = async (props: LifecycleFnProps): Promise<Root> => {
const slotNode = props.domElementGetter();
const root = createRoot(slotNode);
root.render(<div>Hello World</div>);
return Promise.resolve(root);
};
This lifecycle function will be called whenever the registered
application is not mounted, but it is ready to be. This function
should create DOM elements, DOM event listeners, etc. to
render content to the user.
Unmount
This lifecycle function will be called whenever the registered
application is mounted. When called, this function should
clean up all DOM elements, DOM event listeners, leaked
memory, globals, observable subscriptions, etc.
unmount = async () => {
const reactRoot = this.getRoot();
if (reactRoot) {
reactRoot.unmount();
}
};
That is it!
Server Side Integration
With every request for SSR content from the app ILC sends the
following meta-information as query params:
• Router Properties
• BasePath
• RequestURL
• Application Properties
• Header x-request-uri. Request URL string. This contains only
the URL that is present in the actual HTTP request.
Server Side Integration
SSR response has to contain:
• Body with HTML
• Header Link
• Header x-head-title
• Header x-head-meta
processResponse(response, {
pageTitle: meta?.title,
pageMetaTags: `${meta?.meta || ''}${meta?.link || ''}`,
appAssets: await this.applicationManifestConfig.getAppAssets(),
});
response.send(html);
Code example
How it affects
development?
The goal is to not
affect it at all.
Really. Development is
almost not affected.
Almost…
Over complication is
only integration.
Developers still can…
• Choose JS Framework
• Choose CSS Framework
• Decide if SSR is Required
• Control their build process
• Control their deploy
SO what do we have…
Application #1
Application #2
Application #3
• MS engine allows to build pages by
fragments.
• Fragment is independent App.
• Fragment can be deploy and change part
of the page.
• Your app can support client side
navigation.
• SSR is supported.
This is the culmination
but not the end.
How to Configure It
How to Configure It?
Admin Panel.
How to Configure It?
Configuration as a Code.
Do you remember this slide?
Allow to build isomorphic routing.
Browser
Frontend
Microservice
Engine
Router
App Router [1]
App Router [2]
App Router [3]
*It is not 100% truth. I will explain later.
To be more precise this string…
Allow to build isomorphic routing.
Browser
Frontend
Microservice
Engine
Router
App Router [1]
App Router [2]
App Router [3]
*It is not 100% truth. I will explain later.
Soft navigation
Hard navigation
Router [1]
Router [2]
Router [3]
Router [A]
Router [B]
Router [B]
Router. Template Mismatch.
What about
reliability?
It is fine when everything’s fine 😌
Application #1
Application #2
Application #3
Application #1
Application #2
Application #3
But what if not everything is fine? 🤨
Application #1
Application #2
Application #3
What if it is a disaster?!! 😩
What are the reasons for this?
• Client Side Runtime Error
• Server Side Error
• Client resources are not available
• Server is not available
• Customer should not suffer.
• One Application with Error has not to break page.
• Business and Development can define own fault tolerance strategy.
How to react on Errors and Outage?
Fragment types
• Primary
• Essential
• Regular
• SSR: all 5xx response codes trigger the 500 error page
configured in ILC.
• CSR: any error caught by ILC errorHander, or errors during
loading/mounting trigger the 500 error page configured in ILC.
Primary Application Type
• SSR: all non-2xx response codes are treated as SSR error and
the second rendering attempt will be done on the client-side.
• CSR: any error caught by ILC errorHander, or errors during
loading/mounting trigger the 500 error page configured in ILC.
Essential Application Type
• SSR: all non-2xx response codes are treated as SSR error and
the second rendering attempt will be done on the client-side.
• CSR: any error caught by ILC errorHander, or errors during
loading/mounting are logged without any further action.
Regular Application Type
Developers manage how
your app reacts on error
What is 500 error page in
term of microservices?
What is an Error Page?
• Works similar to regular route
• Associated with template
• Could be associated with apps but here developer should be
carefully because all your backend can be not accessible.
What about
other errors?
• Route does not exists on MS Engine level
• Route does not exists on Service level
• Entity does not exists on Service level
Error 404
Error 404
● Route does not exists on MS Engine level
○ System renders global 404
● Route does not exists on Service level
○ Developer can decide to show own 404 or global
● Entity does not exists on Service level
○ Developer can decide to show own 404 or global
Consider that global 404 page is a regular and can handle majority of cases you have
Page Transition Handling
Customise Page Transition UI
● MS Engine can handle re-rendering of apps on the page
● API for customising loaders
Page Transition Hooks
● Stop navigation and use your custom behavior such as
authentication form as an example to navigate whenever you need
(CSR).
● Redirect to a new location (CSR, SSR).
● Continue navigation (CSR, SSR).
Plugin System
Plugin Types
● Page Transition Plugins
● Reporting Plugins
● Localisation Plugin
Code Sharing
Shared Library
● Client side modules designed to share between pages
● Deliver without server side only client bundle
● Consumer receive updates right after deploy
Using Shared Fragments
● Ensure polyfill loading
● Load Bundle With Common deps
○ React
○ Mobx
○ L10n
○ EventBus
Using Shared Fragments
</head>
<include id="shared" src="https://host-1.server.net” timeout="10000"></include>
<body>
<ilc-slot id="navbar" />
<ilc-slot id="body" />
<ilc-slot id="footer" />
</body>
</html>
Local Development
Dev Experience
● Developers don’t want to run tons of docker containers
● Developers don’t want to checkout tons of git repo
Developer wants
npm start
How to develop
Application #1
Application #2 (Mine)
Application #3
How to develop
Application #1
Application #2 (Mine)
Application #3
CDN
Remove Server
How to develop
Application #1
Application #2 (Mine)
Cookie configuration
Application #3
CDN
Remove Server
Local Static
Local Server
Performance
Why is it performant
● Horizontal scaling of backend service
● Built-in caches
● Minimum amount of computation
● Client side logic is backend agnostic
Delivery CI/CD
Multi Domain Support
Conclusion
● MS increases complexity on your frontend
● MS microservices is not about code splitting
● MS should not effect frontend dev experience
● MS should be fault tolerant
● MS should have robust monitoring system
● Local development should convenient
What ILC Allow
● Deliver part of the page independently
● Isomorphic Client side and Server side navigation
● Support of SSR
● Error Handling System
● Fault Tolerance System
● Solution for Local Development
● Monitoring using plugin system
● Auth Capabilities
● Multi domain support
● Configuration as a Code
● Does not break your regular experience
Social Media
Internal Links
Inspiration Links

More Related Content

What's hot

Improving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error MonitoringImproving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error MonitoringScyllaDB
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro FrontendYugo Sakamoto
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module FederationThe Software House
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro FrontendMiki Lombardi
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React NativeSambhu Lakshmanan
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontendGlobant
 
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
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting StartedTracy Lee
 
S60 3rd FP2 Widgets
S60 3rd FP2 WidgetsS60 3rd FP2 Widgets
S60 3rd FP2 Widgetsromek
 
Microservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro FrontendsMicroservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro Frontendsandrejusb
 

What's hot (20)

Improving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error MonitoringImproving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error Monitoring
 
Micro-frontend
Micro-frontendMicro-frontend
Micro-frontend
 
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
 
State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro Frontend
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module Federation
 
FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro Frontend
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Chapter 3.4.pptx
Chapter 3.4.pptxChapter 3.4.pptx
Chapter 3.4.pptx
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontend
 
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?
 
Micro Frontends Architecture - Jitendra kumawat (Guavus)
Micro Frontends Architecture - Jitendra kumawat (Guavus)Micro Frontends Architecture - Jitendra kumawat (Guavus)
Micro Frontends Architecture - Jitendra kumawat (Guavus)
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting Started
 
Why Microservices
Why MicroservicesWhy Microservices
Why Microservices
 
S60 3rd FP2 Widgets
S60 3rd FP2 WidgetsS60 3rd FP2 Widgets
S60 3rd FP2 Widgets
 
Micro-Frontend Architecture
Micro-Frontend ArchitectureMicro-Frontend Architecture
Micro-Frontend Architecture
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Microservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro FrontendsMicroservice Approach for Web Development with Micro Frontends
Microservice Approach for Web Development with Micro Frontends
 

Similar to "Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap", Artem Zakharchenko

Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEORNodeXperts
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksMohammad Asif Siddiqui
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminarGal Marder
 
Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)
Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)
Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)Codit
 
ngStockholm #8 at NetEnt - Micro Frontend Architecture
ngStockholm #8 at NetEnt - Micro Frontend ArchitecturengStockholm #8 at NetEnt - Micro Frontend Architecture
ngStockholm #8 at NetEnt - Micro Frontend ArchitectureIshaan Puniani
 
Andriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptxAndriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptxfaiz324545
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & DatabasesMuhammad Sajid
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaAraf Karsh Hamid
 
Comparison of Current Service Mesh Architectures
Comparison of Current Service Mesh ArchitecturesComparison of Current Service Mesh Architectures
Comparison of Current Service Mesh ArchitecturesMirantis
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular jsAndrew Alpert
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern LaunguageInho Kang
 
What serverless means for enterprise apps
What serverless means for enterprise appsWhat serverless means for enterprise apps
What serverless means for enterprise appsSumit Sarkar
 

Similar to "Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap", Artem Zakharchenko (20)

Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice Frameworks
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Reactive Micro Services with Java seminar
Reactive Micro Services with Java seminarReactive Micro Services with Java seminar
Reactive Micro Services with Java seminar
 
Android101
Android101Android101
Android101
 
Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)
Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)
Azure Service Fabric: notes from the field (Sam Vanhoute @Integrate 2016)
 
ngStockholm #8 at NetEnt - Micro Frontend Architecture
ngStockholm #8 at NetEnt - Micro Frontend ArchitecturengStockholm #8 at NetEnt - Micro Frontend Architecture
ngStockholm #8 at NetEnt - Micro Frontend Architecture
 
Andriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptxAndriod Lecture 8 A.pptx
Andriod Lecture 8 A.pptx
 
20181023 progressive web_apps_are_here_sfcampua
20181023 progressive web_apps_are_here_sfcampua20181023 progressive web_apps_are_here_sfcampua
20181023 progressive web_apps_are_here_sfcampua
 
Progressive Web Apps are here!
Progressive Web Apps are here!Progressive Web Apps are here!
Progressive Web Apps are here!
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
 
Comparison of Current Service Mesh Architectures
Comparison of Current Service Mesh ArchitecturesComparison of Current Service Mesh Architectures
Comparison of Current Service Mesh Architectures
 
agile microservices @scaibo
agile microservices @scaiboagile microservices @scaibo
agile microservices @scaibo
 
Microservices
MicroservicesMicroservices
Microservices
 
Microservice
MicroserviceMicroservice
Microservice
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
 
What serverless means for enterprise apps
What serverless means for enterprise appsWhat serverless means for enterprise apps
What serverless means for enterprise apps
 

More from Fwdays

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...Fwdays
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil TopchiiFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro SpodaretsFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym KindritskyiFwdays
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...Fwdays
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...Fwdays
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...Fwdays
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...Fwdays
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...Fwdays
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...Fwdays
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...Fwdays
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...Fwdays
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra MyronovaFwdays
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...Fwdays
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...Fwdays
 

More from Fwdays (20)

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

"Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap", Artem Zakharchenko

  • 1.
  • 2. Biography · Gameloft · DevPro · Pics.io · Epam · Namecheap.com · Frontend · Backend · Infrastructure · Pre-sale · System Design Founder Stellar Ukraine Charity Foundation Founder KharkivJS Conference
  • 4. Let me tell you a story…
  • 5. The story starts with a reference to the past.
  • 6. Which reasons to use Microservice? 2014
  • 7. · Increase Resilience · Improved scalability · The ability to use the right tool for the right task · Fast and flexible delivery · Easier debugging and maintenance · Improved ROI with reduced TCO · Mitigate Convey Law Risk Reasons to use Microservices
  • 8. Microservices is not a silver bullet 2017–2018
  • 11. 2015 – We have started migrating our monolith to microservices. 2016 – Monolith becomes smaller. Microservices grow. Frontend remains unchanged. 2017 – Monolith becomes smaller and smaller. Microservices are everywhere. Frontend remains unchanged. 2018 – What to do with frontend? History
  • 12. How usually Frontend looks like in huge projects Service [1] Service [2] Service [3] Frontend Gateway
  • 13. Let’s see in more detail… Frontend
  • 14. What we really had? · CMS served tones Frontend pages · Some separate FE services on NodeJS · No rules · No agreement · 16 Lighthouse Desktop Score · Dozens of unknown scripts loading · Multiple version of same dependencies
  • 15. Service [1] Service [2] Service [3] Frontend Gateway Backend for Frontend [1] Backend for Frontend [2] Our next step is frontend extraction
  • 16. Benefits · Independent deploys · Frontend agnostic approach · Developers can use modern technology · Development Experience · Faster changes
  • 17. Enough? Almost… · What about structural consistency? · What about UI consistency? · What about cross dependent releases? · What about sharing UI functionality? · What about reusing part of UI on different pages?
  • 18. So we decided to try frontend microservices…
  • 19. Goals · Page consists of several fragments · Fragment is independent application · Application supports client side routing · SSR should be supported · UI have to be consistent
  • 20. Requirements · HTML Page is delivered by layout streaming system · A unit of streaming is a fragment · Streaming is lighting fase · Fragment is a regular frontend application · Framework Agnostic · CSS Isolated · Support Global Routes · Fragment Delivery is Independent · Fragment knows nothing about others · Code sharing
  • 21. Organizational goals · Mitigate Convey Law Risks · Team is independent unit · Application and system should be testable and reliable · Avoid communication overkill
  • 22. Application #1 Application #2 Application #3 Imagine it is your browser
  • 23. New Architecture Service [1] Service [2] Service [3] Gateway Frontend Microservice Engine Fragment [1] Fragment [2] Fragment [3]
  • 24. But in reality… Service [1] Service [2] Service [3] Gateway Frontend Microservice Engine Fragment [1] Fragment [2] Fragment [3] Scary Part of Frontend
  • 25. Full Architecture View Service [1] Service [2] Service [3] Gateway Frontend Microservice Engine Fragment [1] Fragment [2] Fragment [3] Frontend Microservice Registry App #1 App #2 App #3
  • 26. What is Microservice Engine? Web Service responsible for processing incoming requests, discover page fragments, communicate to fragment services and form HTML.
  • 27. What is Microservice Registry? Web Service with persistent storage that manage basic entities like routes, template, fragments and their relationship.
  • 28. What is Fragment? Development unit. It is just regular frontend service.
  • 30. How it works together. Server Side Browser Gateway Frontend Microservice Engine Frontend Microservice Registry Fragments Form HTTP Response HTML Inject Scripts Inject JSON configuration Object
  • 31. How it works together. Client Side Browser Load Microservice Engine Script Load Injected Fragment Scripts Parse Configuration Object Match Route Load ESM Modules for Fragments Render/Hydrate Applications
  • 32. Client/Server side routing Allow to build isomorphic routing. Browser Frontend Microservice Engine Router App Router [1] App Router [2] App Router [3]
  • 33. Client side routing. Frontend Browser MSS Engine App Routes route/ms1 route/ms2 route/ms3 route/* /ms1 /ms2 /ms3
  • 35. What is Template ? </head> <body> <ilc-slot id="navbar" /> <ilc-slot id="body" /> <ilc-slot id="footer" /> </body> </html>
  • 36. Template customization </head> <body> <header> Hello World!!! </header> <ilc-slot id="navbar" /> <ilc-slot id="body" /> <ilc-slot id="footer" /> </body> </html>
  • 37. What is Route Route Template Slots
  • 38. • Anchor for a Frontend Application. • Declare node from Application is embedded. What is Slot
  • 39. What is Route Route Template Slots Application
  • 40. Client Side Integration const application = { bootstrap: () => Promise.resolve(), mount: () => Promise.resolve(), unmount: () => Promise.resolve(), }
  • 41. Bootstrap This lifecycle function will be called once, right before the registered application is mounted for the first time.
  • 42. Mount mount = async (props: LifecycleFnProps): Promise<Root> => { const slotNode = props.domElementGetter(); const root = createRoot(slotNode); root.render(<div>Hello World</div>); return Promise.resolve(root); }; This lifecycle function will be called whenever the registered application is not mounted, but it is ready to be. This function should create DOM elements, DOM event listeners, etc. to render content to the user.
  • 43. Unmount This lifecycle function will be called whenever the registered application is mounted. When called, this function should clean up all DOM elements, DOM event listeners, leaked memory, globals, observable subscriptions, etc. unmount = async () => { const reactRoot = this.getRoot(); if (reactRoot) { reactRoot.unmount(); } };
  • 45. Server Side Integration With every request for SSR content from the app ILC sends the following meta-information as query params: • Router Properties • BasePath • RequestURL • Application Properties • Header x-request-uri. Request URL string. This contains only the URL that is present in the actual HTTP request.
  • 46. Server Side Integration SSR response has to contain: • Body with HTML • Header Link • Header x-head-title • Header x-head-meta
  • 47. processResponse(response, { pageTitle: meta?.title, pageMetaTags: `${meta?.meta || ''}${meta?.link || ''}`, appAssets: await this.applicationManifestConfig.getAppAssets(), }); response.send(html); Code example
  • 49. The goal is to not affect it at all.
  • 50. Really. Development is almost not affected. Almost…
  • 52. Developers still can… • Choose JS Framework • Choose CSS Framework • Decide if SSR is Required • Control their build process • Control their deploy
  • 53. SO what do we have… Application #1 Application #2 Application #3 • MS engine allows to build pages by fragments. • Fragment is independent App. • Fragment can be deploy and change part of the page. • Your app can support client side navigation. • SSR is supported.
  • 54. This is the culmination but not the end.
  • 56. How to Configure It? Admin Panel.
  • 57. How to Configure It? Configuration as a Code.
  • 58. Do you remember this slide? Allow to build isomorphic routing. Browser Frontend Microservice Engine Router App Router [1] App Router [2] App Router [3] *It is not 100% truth. I will explain later.
  • 59. To be more precise this string… Allow to build isomorphic routing. Browser Frontend Microservice Engine Router App Router [1] App Router [2] App Router [3] *It is not 100% truth. I will explain later.
  • 60. Soft navigation Hard navigation Router [1] Router [2] Router [3] Router [A] Router [B] Router [B] Router. Template Mismatch.
  • 62. It is fine when everything’s fine 😌 Application #1 Application #2 Application #3
  • 63. Application #1 Application #2 Application #3 But what if not everything is fine? 🤨
  • 64. Application #1 Application #2 Application #3 What if it is a disaster?!! 😩
  • 65. What are the reasons for this? • Client Side Runtime Error • Server Side Error • Client resources are not available • Server is not available
  • 66. • Customer should not suffer. • One Application with Error has not to break page. • Business and Development can define own fault tolerance strategy. How to react on Errors and Outage?
  • 67. Fragment types • Primary • Essential • Regular
  • 68. • SSR: all 5xx response codes trigger the 500 error page configured in ILC. • CSR: any error caught by ILC errorHander, or errors during loading/mounting trigger the 500 error page configured in ILC. Primary Application Type
  • 69. • SSR: all non-2xx response codes are treated as SSR error and the second rendering attempt will be done on the client-side. • CSR: any error caught by ILC errorHander, or errors during loading/mounting trigger the 500 error page configured in ILC. Essential Application Type
  • 70. • SSR: all non-2xx response codes are treated as SSR error and the second rendering attempt will be done on the client-side. • CSR: any error caught by ILC errorHander, or errors during loading/mounting are logged without any further action. Regular Application Type
  • 71. Developers manage how your app reacts on error
  • 72. What is 500 error page in term of microservices?
  • 73. What is an Error Page? • Works similar to regular route • Associated with template • Could be associated with apps but here developer should be carefully because all your backend can be not accessible.
  • 75. • Route does not exists on MS Engine level • Route does not exists on Service level • Entity does not exists on Service level Error 404
  • 76. Error 404 ● Route does not exists on MS Engine level ○ System renders global 404 ● Route does not exists on Service level ○ Developer can decide to show own 404 or global ● Entity does not exists on Service level ○ Developer can decide to show own 404 or global Consider that global 404 page is a regular and can handle majority of cases you have
  • 78. Customise Page Transition UI ● MS Engine can handle re-rendering of apps on the page ● API for customising loaders
  • 79. Page Transition Hooks ● Stop navigation and use your custom behavior such as authentication form as an example to navigate whenever you need (CSR). ● Redirect to a new location (CSR, SSR). ● Continue navigation (CSR, SSR).
  • 81. Plugin Types ● Page Transition Plugins ● Reporting Plugins ● Localisation Plugin
  • 83. Shared Library ● Client side modules designed to share between pages ● Deliver without server side only client bundle ● Consumer receive updates right after deploy
  • 84. Using Shared Fragments ● Ensure polyfill loading ● Load Bundle With Common deps ○ React ○ Mobx ○ L10n ○ EventBus
  • 85. Using Shared Fragments </head> <include id="shared" src="https://host-1.server.net” timeout="10000"></include> <body> <ilc-slot id="navbar" /> <ilc-slot id="body" /> <ilc-slot id="footer" /> </body> </html>
  • 87. Dev Experience ● Developers don’t want to run tons of docker containers ● Developers don’t want to checkout tons of git repo
  • 90. How to develop Application #1 Application #2 (Mine) Application #3
  • 91. How to develop Application #1 Application #2 (Mine) Application #3 CDN Remove Server
  • 92. How to develop Application #1 Application #2 (Mine) Cookie configuration Application #3 CDN Remove Server Local Static Local Server
  • 94. Why is it performant ● Horizontal scaling of backend service ● Built-in caches ● Minimum amount of computation ● Client side logic is backend agnostic
  • 97. Conclusion ● MS increases complexity on your frontend ● MS microservices is not about code splitting ● MS should not effect frontend dev experience ● MS should be fault tolerant ● MS should have robust monitoring system ● Local development should convenient
  • 98. What ILC Allow ● Deliver part of the page independently ● Isomorphic Client side and Server side navigation ● Support of SSR ● Error Handling System ● Fault Tolerance System ● Solution for Local Development ● Monitoring using plugin system ● Auth Capabilities ● Multi domain support ● Configuration as a Code ● Does not break your regular experience