SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro FrontendYugo Sakamoto
 
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 - ...Shift Conference
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedVinci Rufus
 
"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr KhivrychFwdays
 
Micro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoniMicro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoniSandeep Soni
 
"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...Fwdays
 
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 frontendAudrey Neveu
 
[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...DevDay.org
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecturetyrantbrian
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontendGlobant
 
Micro Frontends Architecture
Micro Frontends ArchitectureMicro Frontends Architecture
Micro Frontends ArchitectureRag Dhiman
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
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 wayPrasanna Venkatesan
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice ArchitectureNguyen Tung
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To MicroservicesLalit Kale
 

Was ist angesagt? (20)

State of Micro Frontend
State of Micro FrontendState of Micro Frontend
State of Micro Frontend
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
 
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 - ...
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
 
"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych
 
Micro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoniMicro frontend architecture_presentation_ssoni
Micro frontend architecture_presentation_ssoni
 
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJSMicro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
 
"Micro-frontends: 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-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 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
 
[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...
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontend
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
 
Micro-Frontend Architecture
Micro-Frontend ArchitectureMicro-Frontend Architecture
Micro-Frontend Architecture
 
Micro Frontends Architecture
Micro Frontends ArchitectureMicro Frontends Architecture
Micro Frontends Architecture
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
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
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 

Ähnlich wie Micro Front-End & Microservices - Plansoft

Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Rodrigo Antonialli
 
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)Ahmed Misbah
 
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 ...Ambassador Labs
 
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 2015Ken Owens
 
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.itGiuseppe Lavagetto
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science PlatformDecision Science Community
 
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 SREAraf Karsh Hamid
 
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?Phuong Mai Nguyen
 
Diving Into Docker
Diving Into Docker Diving Into Docker
Diving Into Docker XebiaLabs
 
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...apidays
 
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)Ahmed Misbah
 
Moving from Monolith to Microservices
Moving from Monolith to MicroservicesMoving from Monolith to Microservices
Moving from Monolith to MicroservicesMist.io
 
Microservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learningsMicroservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learningsMatthew Reynolds
 
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 AvivRon Perlmuter
 
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 monolithMarkus Eisele
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?NGINX, Inc.
 
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...NETWAYS
 
Microservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureMicroservices + Oracle: A Bright Future
Microservices + Oracle: A Bright FutureKelly Goetsch
 
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 MoreSimform
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 

Kürzlich hochgeladen (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 

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

Hinweis der Redaktion

  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