SlideShare une entreprise Scribd logo
1  sur  51
Micro Front-end
The Microservice Development Architecture on the
Front-end side
Hello!
I am Miki Lombardi
Full Stack Developer at Plansoft s.r.l |
Endless curious, computer science lover, cinema
addicted, sport maniac | Married w Pizza
2
@thejoin95
I am Iacopo Ciao
Full Stack Developer at Plansoft s.r.l |
Developer | Java | Angular+ | Innovative
3
@kernelpanic92
Hello!
4
1. Intro in the magic world of Microservices
a. Principles, Architecture, Case studies
2. From Monolith to Microservices
3. What is a Micro Front-End?
4. Micro Front-end principles
5. Case studies & architecture comparison
6. Technical implementations
7. Q&A
8. Networking & Pizza
Agenda
1.
Microservices
Let set the world on fire
6
Yeah, you know.. We will working with Microservices..
“Microservices - also known as the microservice
architecture - is an architectural style that
structures an application as a collection of services
that are highly maintainable, testable, resiliently,
independently deployable and organized around
business capabilities.
7
Breaking up an application into a series of
smaller, more specialised parts, each of which
communicate with one another across common
interfaces such as APIs and REST interfaces
like HTTP
Why I should develop in
Microservices?
◦ Scalability
◦ Multi Language
◦ DDD
◦ Reliability
◦ Easy to release
◦ Decoupled services
◦ Agile/Lean Team
◦ Better maintenance
◦ Production ready
◦ Cross Platform
◦ Cloud
implementation
◦ Performance
8
Microservices Principles
Modelled around
business domain
Culture of
automation
Hide
implementation
details
9
Decentralization
Deploy
independently
Consumer First
Isolate failure Highly observable CI and Team
development
Microservices Architecture - Example
10
Microservices Architecture - AWS Example
11
Pros & Cons of Microservices architecture
◦ Independent Databases
◦ Independent technology stack
◦ High testability
◦ Easy Q&A
◦ Easy to release a new version
◦ Independent in case of
failures
◦ Parallel development
◦ Services oriented
12
◦ A lot of effort on design,
orchestration, CI/CD
◦ Need at least a DevOps
◦ “Dynamic cost” (it depends)
◦ Maintenance cost in term of
services languages
◦ Hard ACID transactions
◦ Need a service discovery
◦ Difficulties on refactoring
Service Oriented Architecture is very different from
Microservices Architecture!!
They are sharing some principles, but not all!
Let’s see some examples of these architectures
13
SOA != Microservices
14
Architectures comparison
SOA & Microservices Comparison
15
From
RubyOnRailsMonolith (Monorail) &
MySQLon a Self Managed Infrastructure
To
JavaServices on AWScloud
SOA Architecture
16
Case studies
.
From
.NETMonolith & SQL Serveron a Self
Managed Infrastructure
To
Java/PythonServices on AWScloud
Microservices Architecture
Fun (not too much) fact
What happen at Skyscanner when a service is generating
multiple 500 errors and affect its 1% traffic?
“A component with high cache key cardinality (including the date of a flight search in the
key) had been released from behind an A/B experiment to 100% of travellers and was
hammering the cache. This release was done by an external squad, so was not seen in the
Flight Search Result service’s release logs.”
https://medium.com/@SkyscannerEng/production-incident-postmortem-aws-cache-12d722e30840
17
Fun fact
AirBnB is still working to migrate some features from the
monolith to the Microservices architecture
They are still migrating! It been 3 years since they started
18
Cinema Microservices
https://github.com/Crizstian/cinema-
microservice
19
2.
From Monolith to Micro
Dudes, changing the world is a tough job...
21
Uber like App with a Monolith
Architecture
PRO
◦ Shared Memory
◦ Simple to develop
◦ Faster QuickStart (at the
beginning)
◦ Code reusability
◦ “Simple” to scale, but not
in the cheapest way of it
22
Monolith Architecture pro & cons
CONS
◦ Single codebase
◦ Elevate Bug Density
◦ Side effects on changes
◦ Less innovation
◦ Time consuming deploy
◦ Slower release
◦ No separation between
backend/frontend
◦ Difficult CD & CI
This means that build Monolith is bad?
23
Unfortunately, people have come to view the monolith as something to be
avoided as something that is inherently problematic. This is a problem. A
monolithic architec‐ ture is a choice, and a valid one at that. It may not be the
right choice in all circumstances, any more than microservices are, but it’s a
choice nonetheless.
Think about a modular Monolith architecture with a good business/service layer
separation: it will be easy to refactoring it into the microservices architecture —
like Netflix and others did in the past.
It depends
Let’s refactoring the previous Monolith to the
Microservices Architecture
24
25
Uber like App with a
Microservices Architecture
26
Use monolith architecture if you:
● Small Team
● MVP version of a new product
● No time or money to spend on innovation
● Other constraints
Use microservices architecture if you:
■ don’t have a tight deadline; microservices require you to research and
architecture planning to ensure it works
■ have a team with knowledge of different languages
■ worry a lot about the scalability and reliability of your product
■ distributed team
■ have an existing monolith app and see problems with parts of your application
that could be split across multiple microservices
Comparison
From
MagentoMonolith
To
Microservices & MicroFront-
End architecture
27
Case studies
From
Perl/Java/C++Monolith
To
Microservices & Serverless
architecture
From
Rails/Java/Scala Monolith
To
Microservices & Serverless
architecture
3.
What are Micro Front-
End?
What are you talking about?!
29
“Micro Front-ends are the
technical representation of a
business subdomain, they
provide strong boundaries with
clear contracts, also they avoid
sharing data with other
subdomains
30
Luca Mezzalira, DAZN VP Manager
Micro Front-end Principles
Modelling around
business domain
Decentralisation
Culture of
automation
31
Hide
Implementation
details
Isolate failure
Deploy
independently
Micro Front-end Pros - Innovation
32
● Runtime injection of new features
● Faster feedback loops
● Tech agnostic
Micro Front-end Pros - Productivity
33
● End-to-End responsibility
● Full control
● Lean, Agile processes
● Independent development
● Continuous delivery
Micro Front-end Pros - Growth
34
● Faster onboarding
● Magnetic
● Easy to spin-off new teams
35
What I should see on the client side?
4.
Architecture & Case
studies
Get some inspiration from the Big company
Sample of a Micro Front-End
Architecture - End2End
37
FromServicestoFront-End
WebComponent
s
MongoDB +
ElasticSearch
Angular
MongoDB +
ElasticSearch
React
MongoDB
WebComponent
s
Oracle
Sample of a Micro Front-End
Architecture - Generic
38
Development workflow
39
◦ Select a subdomain / feature
◦ Cross functional Team (size 2-6)
◦ Design & Build
◦ Deploy on Dev / Staging Environment
◦ End2End Test
◦ Q&A session
◦ Deploy or deploy with A/B test
40
BIG Case studies
An iframe composition
with event bus for
coordinating the events
across different iframes.
It is an old style approach,
but still working
Inspired by BigPipe
framework (Facebook)
they developed Mosaic9
for assembling all the
different layer of the
architecture, from routing
to compose all the UI
fragment on the runtime
A hybrid solution between
Zalando and Single-spa
framework by building a
middle layer called
Bootstrap, that is
responsible for application
startup, I/O operations,
routing e configurations
Sample of a Micro Front-End
Architecture - Zalando
41
Sample of a Micro Front-End
Architecture - Spotify
42
5.
Technical
implementations
Finally some incomprehensive code!
How can we get started?
44
◦ Setup a global reset.css
◦ Build cross functional team for each subdomain
◦ Select the technology stack for a Front-End team
◦ Build your front-end application
◦ Setup HTTP2 and caching protocol
◦ Setup a Front-End communication protocol
◦ Setup routing and templating services
Guidelines: http://microservice-websites.netlify.com/
Note: you can also build an end-to-end team that develop from back-end to front-
end
HTTP/2
45
- Low overhead in parsing data
- Less prone to errors.
- Lighter network footprint.
- Enables other capabilities of
the HTTP/2 including
compression, multiplexing,
prioritization, flow control and
effective handling of TLS
- Reduced network latency and
improved throughput.
PUB & SUB - Micro Front-End
communication
46
- It is an easy way to published
event and message between
micro front-end
- We are not sharing any
global state or other micro
front-end variable
- We are manipulating just the
micro front-ends that we
needed
ESI & SSI & CSI
47
<esi:include src="http://example.com/1.html"
alt="http://bak.example.com/2.html" onerror="continue"/>
- EdgeServer Include - Include a portion of HTML from the CDN or
Proxy server
- Server Side Include - Generate the HTML on the response from the
server, without JS
- Client Side Include - As ESI, but on the client side
Most used frameworks
Single-SPA
Single-SPA is a framework
for bringing together
multiple javascript
frameworks in a frontend
application with a simple
architecture
Mosaic9
Mosaic is a set of services,
libraries together with a
specification that defines
how its components
interact with each other, to
support a microservice
style architecture for large
scale websites
Open Components
OpenComponents is an
open-source, "batteries
included" micro frontends
framework developed by
OpenTable
48
6.
Demo
Let’s see something folks!
https://github.com/plansoft-it/demo-microfrontends
Questions?
Thanks

Contenu connexe

Tendances

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
 

Tendances (20)

Introduction To Micro Frontends
Introduction To Micro Frontends Introduction To Micro Frontends
Introduction To Micro Frontends
 
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
 
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?
 
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
 
[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...
[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...
[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Micro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoniMicro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoni
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
 
Micro-frontend
Micro-frontendMicro-frontend
Micro-frontend
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends wayBuilding applications in a Micro-frontends way
Building applications in a Micro-frontends way
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
 
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
 
Micro Frontends Architecture
Micro Frontends ArchitectureMicro Frontends Architecture
Micro Frontends Architecture
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Micro frontend: The microservices puzzle extended to frontend
Micro frontend: The microservices puzzle  extended to frontendMicro frontend: The microservices puzzle  extended to frontend
Micro frontend: The microservices puzzle extended to frontend
 

Similaire à Micro Front-End & Microservices - Plansoft

Similaire à Micro Front-End & Microservices - Plansoft (20)

Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
 
Migrating to Microservices Patterns and Technologies (edition 2023)
 Migrating to Microservices Patterns and Technologies (edition 2023) Migrating to Microservices Patterns and Technologies (edition 2023)
Migrating to Microservices Patterns and Technologies (edition 2023)
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.it
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
 
Diving Into Docker
Diving Into Docker Diving Into Docker
Diving Into Docker
 
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
 
Istio as an enabler for migrating to microservices (edition 2022)
Istio as an enabler for migrating to microservices (edition 2022)Istio as an enabler for migrating to microservices (edition 2022)
Istio as an enabler for migrating to microservices (edition 2022)
 
Moving from Monolith to Microservices
Moving from Monolith to MicroservicesMoving from Monolith to Microservices
Moving from Monolith to Microservices
 
Webinar : Microservices and Containerization
Webinar : Microservices and ContainerizationWebinar : Microservices and Containerization
Webinar : Microservices and Containerization
 
Microservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learningsMicroservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learnings
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
stackconf 2023 | Infrastructure-From-Code and the end of Microservices by Ala...
stackconf 2023 | Infrastructure-From-Code and the end of Microservices by Ala...stackconf 2023 | Infrastructure-From-Code and the end of Microservices by Ala...
stackconf 2023 | Infrastructure-From-Code and the end of Microservices by Ala...
 
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureMicroservices + Oracle: A Bright Future
Microservices + Oracle: A Bright Future
 
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreA Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Micro Front-End & Microservices - Plansoft

  • 1. Micro Front-end The Microservice Development Architecture on the Front-end side
  • 2. Hello! I am Miki Lombardi Full Stack Developer at Plansoft s.r.l | Endless curious, computer science lover, cinema addicted, sport maniac | Married w Pizza 2 @thejoin95
  • 3. I am Iacopo Ciao Full Stack Developer at Plansoft s.r.l | Developer | Java | Angular+ | Innovative 3 @kernelpanic92 Hello!
  • 4. 4 1. Intro in the magic world of Microservices a. Principles, Architecture, Case studies 2. From Monolith to Microservices 3. What is a Micro Front-End? 4. Micro Front-end principles 5. Case studies & architecture comparison 6. Technical implementations 7. Q&A 8. Networking & Pizza Agenda
  • 6. 6 Yeah, you know.. We will working with Microservices..
  • 7. “Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are highly maintainable, testable, resiliently, independently deployable and organized around business capabilities. 7 Breaking up an application into a series of smaller, more specialised parts, each of which communicate with one another across common interfaces such as APIs and REST interfaces like HTTP
  • 8. Why I should develop in Microservices? ◦ Scalability ◦ Multi Language ◦ DDD ◦ Reliability ◦ Easy to release ◦ Decoupled services ◦ Agile/Lean Team ◦ Better maintenance ◦ Production ready ◦ Cross Platform ◦ Cloud implementation ◦ Performance 8
  • 9. Microservices Principles Modelled around business domain Culture of automation Hide implementation details 9 Decentralization Deploy independently Consumer First Isolate failure Highly observable CI and Team development
  • 12. Pros & Cons of Microservices architecture ◦ Independent Databases ◦ Independent technology stack ◦ High testability ◦ Easy Q&A ◦ Easy to release a new version ◦ Independent in case of failures ◦ Parallel development ◦ Services oriented 12 ◦ A lot of effort on design, orchestration, CI/CD ◦ Need at least a DevOps ◦ “Dynamic cost” (it depends) ◦ Maintenance cost in term of services languages ◦ Hard ACID transactions ◦ Need a service discovery ◦ Difficulties on refactoring
  • 13. Service Oriented Architecture is very different from Microservices Architecture!! They are sharing some principles, but not all! Let’s see some examples of these architectures 13 SOA != Microservices
  • 15. SOA & Microservices Comparison 15
  • 16. From RubyOnRailsMonolith (Monorail) & MySQLon a Self Managed Infrastructure To JavaServices on AWScloud SOA Architecture 16 Case studies . From .NETMonolith & SQL Serveron a Self Managed Infrastructure To Java/PythonServices on AWScloud Microservices Architecture
  • 17. Fun (not too much) fact What happen at Skyscanner when a service is generating multiple 500 errors and affect its 1% traffic? “A component with high cache key cardinality (including the date of a flight search in the key) had been released from behind an A/B experiment to 100% of travellers and was hammering the cache. This release was done by an external squad, so was not seen in the Flight Search Result service’s release logs.” https://medium.com/@SkyscannerEng/production-incident-postmortem-aws-cache-12d722e30840 17
  • 18. Fun fact AirBnB is still working to migrate some features from the monolith to the Microservices architecture They are still migrating! It been 3 years since they started 18
  • 20. 2. From Monolith to Micro Dudes, changing the world is a tough job...
  • 21. 21 Uber like App with a Monolith Architecture
  • 22. PRO ◦ Shared Memory ◦ Simple to develop ◦ Faster QuickStart (at the beginning) ◦ Code reusability ◦ “Simple” to scale, but not in the cheapest way of it 22 Monolith Architecture pro & cons CONS ◦ Single codebase ◦ Elevate Bug Density ◦ Side effects on changes ◦ Less innovation ◦ Time consuming deploy ◦ Slower release ◦ No separation between backend/frontend ◦ Difficult CD & CI
  • 23. This means that build Monolith is bad? 23 Unfortunately, people have come to view the monolith as something to be avoided as something that is inherently problematic. This is a problem. A monolithic architec‐ ture is a choice, and a valid one at that. It may not be the right choice in all circumstances, any more than microservices are, but it’s a choice nonetheless. Think about a modular Monolith architecture with a good business/service layer separation: it will be easy to refactoring it into the microservices architecture — like Netflix and others did in the past. It depends
  • 24. Let’s refactoring the previous Monolith to the Microservices Architecture 24
  • 25. 25 Uber like App with a Microservices Architecture
  • 26. 26 Use monolith architecture if you: ● Small Team ● MVP version of a new product ● No time or money to spend on innovation ● Other constraints Use microservices architecture if you: ■ don’t have a tight deadline; microservices require you to research and architecture planning to ensure it works ■ have a team with knowledge of different languages ■ worry a lot about the scalability and reliability of your product ■ distributed team ■ have an existing monolith app and see problems with parts of your application that could be split across multiple microservices Comparison
  • 27. From MagentoMonolith To Microservices & MicroFront- End architecture 27 Case studies From Perl/Java/C++Monolith To Microservices & Serverless architecture From Rails/Java/Scala Monolith To Microservices & Serverless architecture
  • 28. 3. What are Micro Front- End? What are you talking about?!
  • 29. 29
  • 30. “Micro Front-ends are the technical representation of a business subdomain, they provide strong boundaries with clear contracts, also they avoid sharing data with other subdomains 30 Luca Mezzalira, DAZN VP Manager
  • 31. Micro Front-end Principles Modelling around business domain Decentralisation Culture of automation 31 Hide Implementation details Isolate failure Deploy independently
  • 32. Micro Front-end Pros - Innovation 32 ● Runtime injection of new features ● Faster feedback loops ● Tech agnostic
  • 33. Micro Front-end Pros - Productivity 33 ● End-to-End responsibility ● Full control ● Lean, Agile processes ● Independent development ● Continuous delivery
  • 34. Micro Front-end Pros - Growth 34 ● Faster onboarding ● Magnetic ● Easy to spin-off new teams
  • 35. 35 What I should see on the client side?
  • 36. 4. Architecture & Case studies Get some inspiration from the Big company
  • 37. Sample of a Micro Front-End Architecture - End2End 37 FromServicestoFront-End WebComponent s MongoDB + ElasticSearch Angular MongoDB + ElasticSearch React MongoDB WebComponent s Oracle
  • 38. Sample of a Micro Front-End Architecture - Generic 38
  • 39. Development workflow 39 ◦ Select a subdomain / feature ◦ Cross functional Team (size 2-6) ◦ Design & Build ◦ Deploy on Dev / Staging Environment ◦ End2End Test ◦ Q&A session ◦ Deploy or deploy with A/B test
  • 40. 40 BIG Case studies An iframe composition with event bus for coordinating the events across different iframes. It is an old style approach, but still working Inspired by BigPipe framework (Facebook) they developed Mosaic9 for assembling all the different layer of the architecture, from routing to compose all the UI fragment on the runtime A hybrid solution between Zalando and Single-spa framework by building a middle layer called Bootstrap, that is responsible for application startup, I/O operations, routing e configurations
  • 41. Sample of a Micro Front-End Architecture - Zalando 41
  • 42. Sample of a Micro Front-End Architecture - Spotify 42
  • 44. How can we get started? 44 ◦ Setup a global reset.css ◦ Build cross functional team for each subdomain ◦ Select the technology stack for a Front-End team ◦ Build your front-end application ◦ Setup HTTP2 and caching protocol ◦ Setup a Front-End communication protocol ◦ Setup routing and templating services Guidelines: http://microservice-websites.netlify.com/ Note: you can also build an end-to-end team that develop from back-end to front- end
  • 45. HTTP/2 45 - Low overhead in parsing data - Less prone to errors. - Lighter network footprint. - Enables other capabilities of the HTTP/2 including compression, multiplexing, prioritization, flow control and effective handling of TLS - Reduced network latency and improved throughput.
  • 46. PUB & SUB - Micro Front-End communication 46 - It is an easy way to published event and message between micro front-end - We are not sharing any global state or other micro front-end variable - We are manipulating just the micro front-ends that we needed
  • 47. ESI & SSI & CSI 47 <esi:include src="http://example.com/1.html" alt="http://bak.example.com/2.html" onerror="continue"/> - EdgeServer Include - Include a portion of HTML from the CDN or Proxy server - Server Side Include - Generate the HTML on the response from the server, without JS - Client Side Include - As ESI, but on the client side
  • 48. Most used frameworks Single-SPA Single-SPA is a framework for bringing together multiple javascript frameworks in a frontend application with a simple architecture Mosaic9 Mosaic is a set of services, libraries together with a specification that defines how its components interact with each other, to support a microservice style architecture for large scale websites Open Components OpenComponents is an open-source, "batteries included" micro frontends framework developed by OpenTable 48
  • 49. 6. Demo Let’s see something folks! https://github.com/plansoft-it/demo-microfrontends

Notes de l'éditeur

  1. Backend For Frontend (BFF) Loadbalencer prima dei gateway Loadbalencer dopo gateway Eventbus interno ai microservizi
  2. Loadbalencer prima dei gateway Loadbalencer dopo gateway Eventbus interno ai microservizi
  3. ESB allows communication via a common communication bus that consists of a variety of point-to-point connections between providers and consumers . In addition to above, the data storage is shared within all services in SOA
  4. ESB allows communication via a common communication bus that consists of a variety of point-to-point connections between providers and consumers . In addition to above, the data storage is shared within all services in SOA
  5. AirBnB più di 450 servizi => API Gateway & Internal Bus per comunicazione intraservizio => 3 Anni per cambiare architettura SkyScanner suddivisione in macroteam su aree di dominio e sottodominio del business
  6. Monolita vecchio stampo, Monolita modulare, Monolita distribuito Ports and Adapters architecture (a.k.a Hexagonal Architecture) differ between data layer and devices
  7. https://microservices.io/patterns/monolithic.html
  8. Zalando uses magento for its first ecommerce
  9. AirBnB più di 450 servizi => API Gateway & Internal Bus per comunicazione intraservizio => 3 Anni per cambiare architettura SkyScanner suddivisione in macroteam su aree di dominio e sottodominio del business
  10. Micro Frontend is a Microservice approach to front-end web development. The current trend is to build a powerful and feature-rich web application which resides on top of a Microservice architecture. Over time the front end part of the application, is often developed by a separate team, grows and gets more difficult to maintain, this type of application is called Frontend Monolith. To solve this problem, the concept of the Micro Frontend came into the picture. The concept of Micro Frontend is to think about a web application as a composition of features owned by different independent teams. Each team having a distinct area of business that it specializes in. A team is cross-functional and develops end-to-end features, from the user interface to the database. Micro Frontend is more friendly and less bulky one. In this type of architecture, split the entire application by business domain across the entire stack. This enables front-end teams the same level of flexibility, testability, and velocity that backend teams get from Microservices.
  11. Jimmy old monolith
  12. Jimmy old monolith
  13. Ci permette di impacchetare in una volta più richieste, così da ridurre il tempo di attesa della risposta
  14. Ci permette di impacchetare in una volta più richieste, così da ridurre il tempo di attesa della risposta