SlideShare une entreprise Scribd logo
1  sur  41
Microservices - Why?
Or why not?
Speaker: Sascha Düpre
Agenda
Microservice and Monolith Architectural Style
Brief introductions
Comparison
Microservices
Project management view
Team/Microservice size
Roles
Process model assumptions
What are microservices?
“In short, the microservice architectural style [1] is an approach to developing a single
application as a suite of small services, each running in its own process and
communicating with lightweight mechanisms, often an HTTP resource API.” - Martin
Fowler
Many “small” services (business logic is split up)
Independent and automatically deployable
Lightweight Communication
Source:
https://www.nginx.com/blog/introduction
-to-microservices/
What is a monolith?
Traditionally split into 3 parts (3-Tier-Architecture)
UI (Client), AS (Business logic), DB (Data)
AS is the core (should be modularized)
Gets Requests
Handles business logic
Makes DB transactions/calls
Populates HTML-Views
Source:
https://www.nginx.com/blog/introduction
-to-microservices/
What about scaling?
Monolith
Microservices
Source: http://martinfowler.com/articles/microservices.html
Scale-Up Scale-Out
Some Ups and Downs -- Monolith
+ Short time-to-market
+ Cross-Cutting-Concerns (e.g. Logging) can be handled centralized (via libs)
- Strong dependencies
⇒ Scaling: Deployment of the whole Application to another environment (e.g. VM)
Some Ups and Downs -- Microservice
+ No dependencies to other services
⇒ Scaling: Each service can be deployed separate
- Operational overhead
⇒ Longer time-to-market
Where to start?
Under the assumption this is a pioneer project with “enough” resources….
How big should a team be? And therefore the Microservice?
Which roles exist in a team? (This is a general topic)
[More explicit] What personnel is needed?
What process model should be used?
What are the requirements?
How many services/teams do we need?
Team size (1/2)
Group question:
Of what sizes are you thinking for each team per service? And maybe why?
Some responsibilities (while the product is not live)
Testing
UI
Logic
DB(s)
Team size (2/2)
Less than 10 as a rule of thumb.
Amazon says 6-8 -- Two-Pizza-Rule
Should be small enough to decrease the complexity of communication
Big enough to build and run the product
All competences must be covered
Conway’s law: The size will determine the structure and LOC of the service
Which roles exist in a team? (1/2)
Source: http://martinfowler.com/articles/microservices.html
Conway’s law:
“Organizations which design systems
[…] are constrained to produce designs
which are copies of the communication
structures of these organizations.” -
Melvin E. Conway
● Driven by the management
because they see the technology
stack
Which roles exist in a team? (2/2)
Source: http://martinfowler.com/articles/microservices.html
● Cross-functional teams
● Organized around business
capabilities
● Responsibility to build and
operate each product
=> Team organizes itself and is
product and data owner
Team roles - Conclusion
Operators are needed
Developers are needed
Consider DevOpsGeneral Problem: From the moment the product runs in production you will need to have a team
member for emergency cases available.
“I work from 9-5, no interest in working more besides overtime.” - Random Employee
“I love my work. I like to work more if it’s interesting.” - Another Random Employee
People don’t want to work on attendance (“9-5”, “Not interesting”)
In the US: One may get fired if they won’t do it.
In Germany: It’s on free will, a “fair” model or you have an explicit operator.
Considerations for the process model
Agile development (it’s a methodology)
Iterative (work a while then review and again)
Streamlined (getting to work)
Time-boxed (you work in time boxes)
Very collaborative (you are talking to your team and other teams all time)
Test-driven-design
Domain-driven-design
Conclusion to those “management” questions
In case of a pioneer project ….
Lack of experiences with microservices => High Risk Level
Wrong interpretation of the whole
Operations will overwhelm you
Longer time-to-market if not even failure
With experience => Low Risk Level
Short delivery cycles (agile dev)
Extremely modular / Independent development & deployment
Microservices Why?
Modularity, independent development and operations
Scaling can be done per service
Technology diversity -- Polyglott presence
Right technology stack for the problem (languages, libraries, middleware, databases)
Exchangeable
You can replace a service with “no effort” regarding to a monolith architecture
Effective and not more communication
Microservices Why not?
Lack of needed experience
Not enough resources to buy it
Long(er) time-to-market
(Highly) distributed system
Therefore: Eventual consistency
System and Operational complexity
Cross service testing is hard
And now?
If you consider using a microservice approach
Do we have the capabilities (resources)?
Do we have organizational complexity?
Do we need the scaling abilities?
Do we need to deliver software faster and maybe deliver regular updates?
As one can see these points are project dependent. Therefore you may not say: “Let’s
make everything as a MS.”. One need to reconsider it all the time!
Want to dive deeper?
We got a project management view on that topic? Yes!
We can answer the central question? Yes!
Whats missing?
Use-Case - Technical details
With concrete services
Overview of cross-cutting-concerns
Let’s get rid of the abstraction in the previous part!
Profit: You will see more of the whole microservice thing!Yes! No!
Who is living microservices? (1/4)
Walmart
Bought OneOps and worked 2 years on a DevOps API
OpenSource (oneops.com)
“Four years ago, the Walmart Global eCommerce system was a monolithic
application, deployed once every 2 months.” - walmart.com [2016]
“On a typical day there are now over 1,000 deployments, executed on-demand by
development teams, each taking only minutes on average to complete.”
Who is living microservices? (2/4)
Netflix
They obviously need microservices
Contribute to the OpenSource community (only some well-known)
Hystrix
Chaos Monkey
https://github.com/Netflix/ & https://netflix.github.io/
Who is living microservices? (3/4)
Twitter
http://twitter.github.io/
Finagle
Own MySQL fork
History
Started with a three-tier ruby on rails architecture
Switched to a more Services oriented approach
Who is living microservices? (4/4)
Many more
Amazon
Ebay
Google
PayPal
Soundcloud
In common: Evolved from monolith architectural style
Use-case -- Shopsystem
Common scenario: An user chooses one or many articles from an article list to buy.
Objects: User, Article Actions: choose, buy
Concrete scenarios: User chooses Article(s); User buys Article(s)
ArticleManagement
Service
UserManagement
Service
Use-case -- Shopsystem
Exemplary “Buy” scenario: User buys Article
Possible services -- Shopsystem
UserManagement
Service
ArticleManagement
Service
OrderManagement
Service
StockManagement
Service
Payment
Service
Recommendation
Service
ShippingService
Routing or Service-Discovery (1/3)
Microservice infrastructure handles running service instances
=> Arbitrary amount of instances per service with individual IPs
How does the client know where to route the request?
Server-Side Service Discovery
Client-Side Service-Discovery
“Kubernetes is an open-source
system for automating deployment,
operations, and scaling of
containerized applications” -
kubernetes.com
Routing or Service-Discovery (2/3)
Source: http://microservices.io/
AWS Elastic Load Balancer
Routing or Service-Discovery (3/3)
Source: http://microservices.io/
Eureka - Service Registry
Ribbon client - REST Client
querying Eureka
Communication between services (1/2)
UserManagement
Service
ArticleManagement
Service OrderManagement
Service
StockManagement
Service
Payment
Service
User
(Frontend)
Order Service will
provide the Order
Article info
Stock amnt
Addresses
Invoice
Communication between services (2/2)
Stateless communication e.g. HTTP
REST
SOAP (XML-RPC)
Message Service/Pipes (Java: JMS)
etc.
*
*“I implement Enterprise Integration
Patters, ROAARR”
API Gateway Pattern
Source: http://microservices.io/
Hides the internal API
Provides different APIs per Client-
Type (mobile, web…)
Makes version changes easier in
production
Less communication overhead
Handles Service-Discovery
Unavailable services
Services should be deployable and runnable on it’s own
If ArticleService is down OrderService will be in serious troubles
OrderService must respond even if ArticleService is down
Fault tolerance
Cross-cutting concern
Solution: Respond with the correct HTTP StatusCode or send an uncomplete Order
Microservice Requirements (1/2)
Small footprint
Responsive
Rapid and consistent response times
Resilient
Fault tolerant → Let it fail!
replication, containment, isolation and delegation
Elastic
System stays responsive regardless to its workload http://www.reactivemanifesto.org/
Microservice Requirements (2/2)
Web-Frameworks
Vertx.io
Java, Javascript, Groovy, Ruby, Ceylon
Play Framework
Java, Scala
WildFly
Java (JEE 7 Compliant)
REST-Frameworks
Databases
One Database for each service
Database may run on n nodes
One Database for each service instance
Additional problems are awaiting (Consistency, Routing…)
Short NoSQL Excursion
CAP-Theorem
Availability, Consistence, Partition Tolerance
Take two!
Authentication
Problem: Which Requests may the User make?
Services don’t know about the User’s permissions
Example OAuth2
Sources
http://martinfowler.com/articles/microservices.html
https://www.nginx.com/blog/introduction-to-microservices/
http://microservices.io/patterns/monolithic.html
http://microservices.io/patterns/microservices.html
http://microservices.io/patterns/microservice-chassis.html
http://thenewstack.io/agile-management-how-to-manage-microservices-with-your-
team/
http://www.baselinemag.com/enterprise-apps/walmart-embraces-microservices-to-
get-more-agile.html
http://techblog.netflix.com/
http://www.artima.com/scalazine/articles/twitter_on_scala.html
Microservices - Why?
Or why not?
Speaker: Sascha Düpre
Questions?
Feel free to ask!

Contenu connexe

En vedette

Profile_Thomas Raju
Profile_Thomas RajuProfile_Thomas Raju
Profile_Thomas RajuThomas Raju
 
Koalay.com 2015 yılı Performansı
Koalay.com  2015 yılı PerformansıKoalay.com  2015 yılı Performansı
Koalay.com 2015 yılı PerformansıKoalay
 
patenting ayurveda a review
 patenting ayurveda a review patenting ayurveda a review
patenting ayurveda a reviewSeetaram Kishore
 
Location scouting sheet
Location scouting sheetLocation scouting sheet
Location scouting sheetevamariaa
 
Dave Dietz Resume address removed
Dave Dietz Resume address removedDave Dietz Resume address removed
Dave Dietz Resume address removedDave Dietz
 
антон роднянков пугм полоцк (конференция в могилёве 12-05-2016)
антон роднянков   пугм полоцк (конференция в могилёве 12-05-2016)антон роднянков   пугм полоцк (конференция в могилёве 12-05-2016)
антон роднянков пугм полоцк (конференция в могилёве 12-05-2016)Pashka Gorbunov
 
Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...
Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...
Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...Zhanat Chukeev
 
Презентация главного инженера АО "Труд" Киберева Ю.В.
Презентация главного инженера АО "Труд" Киберева Ю.В. Презентация главного инженера АО "Труд" Киберева Ю.В.
Презентация главного инженера АО "Труд" Киберева Ю.В. проект "Механик"
 
ABCs of Email Marketing : A Glossary Of Terms
ABCs of Email Marketing : A Glossary Of TermsABCs of Email Marketing : A Glossary Of Terms
ABCs of Email Marketing : A Glossary Of TermsPawan Kumar
 

En vedette (18)

Alexandru Botila CVEN
Alexandru Botila CVENAlexandru Botila CVEN
Alexandru Botila CVEN
 
Profile_Thomas Raju
Profile_Thomas RajuProfile_Thomas Raju
Profile_Thomas Raju
 
How to Write Short
How to Write ShortHow to Write Short
How to Write Short
 
Koalay.com 2015 yılı Performansı
Koalay.com  2015 yılı PerformansıKoalay.com  2015 yılı Performansı
Koalay.com 2015 yılı Performansı
 
Aplicación
Aplicación Aplicación
Aplicación
 
Marhaba 2016
Marhaba 2016Marhaba 2016
Marhaba 2016
 
patenting ayurveda a review
 patenting ayurveda a review patenting ayurveda a review
patenting ayurveda a review
 
Location scouting sheet
Location scouting sheetLocation scouting sheet
Location scouting sheet
 
Dave Dietz Resume address removed
Dave Dietz Resume address removedDave Dietz Resume address removed
Dave Dietz Resume address removed
 
антон роднянков пугм полоцк (конференция в могилёве 12-05-2016)
антон роднянков   пугм полоцк (конференция в могилёве 12-05-2016)антон роднянков   пугм полоцк (конференция в могилёве 12-05-2016)
антон роднянков пугм полоцк (конференция в могилёве 12-05-2016)
 
MOST TALENTED-PDF
MOST TALENTED-PDFMOST TALENTED-PDF
MOST TALENTED-PDF
 
Ch26
Ch26Ch26
Ch26
 
Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...
Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...
Презентация Проекта Программы развития придорожного сервиса вдоль автомобильн...
 
Презентация главного инженера АО "Труд" Киберева Ю.В.
Презентация главного инженера АО "Труд" Киберева Ю.В. Презентация главного инженера АО "Труд" Киберева Ю.В.
Презентация главного инженера АО "Труд" Киберева Ю.В.
 
Ch29
Ch29Ch29
Ch29
 
EuroVelo project
EuroVelo projectEuroVelo project
EuroVelo project
 
Menopause
MenopauseMenopause
Menopause
 
ABCs of Email Marketing : A Glossary Of Terms
ABCs of Email Marketing : A Glossary Of TermsABCs of Email Marketing : A Glossary Of Terms
ABCs of Email Marketing : A Glossary Of Terms
 

Similaire à Microservices why?

Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureFaren faren
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitectureABDEL RAHMAN KARIM
 
Conceptual models of enterprise applications as instrument of performance ana...
Conceptual models of enterprise applications as instrument of performance ana...Conceptual models of enterprise applications as instrument of performance ana...
Conceptual models of enterprise applications as instrument of performance ana...Leonid Grinshpan, Ph.D.
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsAraf Karsh Hamid
 
Falcon Security Essay
Falcon Security EssayFalcon Security Essay
Falcon Security EssayJennifer Wood
 
Timeless design in a cloud-native world
Timeless design in a cloud-native worldTimeless design in a cloud-native world
Timeless design in a cloud-native worldUwe Friedrichsen
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesAngelos Kapsimanis
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft MicroservicesChase Aucoin
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCapgemini
 
Agile architecture upload
Agile architecture uploadAgile architecture upload
Agile architecture uploadThe Real Dyl
 
Introduction to Micro Services
Introduction to Micro ServicesIntroduction to Micro Services
Introduction to Micro ServicesShashi Shekhar
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootKashif Ali Siddiqui
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureKim Clark
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesJim (张建军) Zhang
 

Similaire à Microservices why? (20)

Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Distributed Systems in Data Engineering
Distributed Systems in Data EngineeringDistributed Systems in Data Engineering
Distributed Systems in Data Engineering
 
Conceptual models of enterprise applications as instrument of performance ana...
Conceptual models of enterprise applications as instrument of performance ana...Conceptual models of enterprise applications as instrument of performance ana...
Conceptual models of enterprise applications as instrument of performance ana...
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
 
Falcon Security Essay
Falcon Security EssayFalcon Security Essay
Falcon Security Essay
 
Timeless design in a cloud-native world
Timeless design in a cloud-native worldTimeless design in a cloud-native world
Timeless design in a cloud-native world
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based Architectures
 
Microservices vs monolithics betabeers
Microservices vs monolithics   betabeersMicroservices vs monolithics   betabeers
Microservices vs monolithics betabeers
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft Microservices
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der wal
 
Agile architecture upload
Agile architecture uploadAgile architecture upload
Agile architecture upload
 
Widget SOA
Widget SOAWidget SOA
Widget SOA
 
Microservices
MicroservicesMicroservices
Microservices
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Introduction to Micro Services
Introduction to Micro ServicesIntroduction to Micro Services
Introduction to Micro Services
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration Architecture
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
 

Dernier

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
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
 
"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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
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
 
"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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"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...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Microservices why?

  • 1. Microservices - Why? Or why not? Speaker: Sascha Düpre
  • 2. Agenda Microservice and Monolith Architectural Style Brief introductions Comparison Microservices Project management view Team/Microservice size Roles Process model assumptions
  • 3. What are microservices? “In short, the microservice architectural style [1] is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.” - Martin Fowler Many “small” services (business logic is split up) Independent and automatically deployable Lightweight Communication
  • 5. What is a monolith? Traditionally split into 3 parts (3-Tier-Architecture) UI (Client), AS (Business logic), DB (Data) AS is the core (should be modularized) Gets Requests Handles business logic Makes DB transactions/calls Populates HTML-Views
  • 7. What about scaling? Monolith Microservices Source: http://martinfowler.com/articles/microservices.html Scale-Up Scale-Out
  • 8. Some Ups and Downs -- Monolith + Short time-to-market + Cross-Cutting-Concerns (e.g. Logging) can be handled centralized (via libs) - Strong dependencies ⇒ Scaling: Deployment of the whole Application to another environment (e.g. VM)
  • 9. Some Ups and Downs -- Microservice + No dependencies to other services ⇒ Scaling: Each service can be deployed separate - Operational overhead ⇒ Longer time-to-market
  • 10. Where to start? Under the assumption this is a pioneer project with “enough” resources…. How big should a team be? And therefore the Microservice? Which roles exist in a team? (This is a general topic) [More explicit] What personnel is needed? What process model should be used? What are the requirements? How many services/teams do we need?
  • 11. Team size (1/2) Group question: Of what sizes are you thinking for each team per service? And maybe why? Some responsibilities (while the product is not live) Testing UI Logic DB(s)
  • 12. Team size (2/2) Less than 10 as a rule of thumb. Amazon says 6-8 -- Two-Pizza-Rule Should be small enough to decrease the complexity of communication Big enough to build and run the product All competences must be covered Conway’s law: The size will determine the structure and LOC of the service
  • 13. Which roles exist in a team? (1/2) Source: http://martinfowler.com/articles/microservices.html Conway’s law: “Organizations which design systems […] are constrained to produce designs which are copies of the communication structures of these organizations.” - Melvin E. Conway ● Driven by the management because they see the technology stack
  • 14. Which roles exist in a team? (2/2) Source: http://martinfowler.com/articles/microservices.html ● Cross-functional teams ● Organized around business capabilities ● Responsibility to build and operate each product => Team organizes itself and is product and data owner
  • 15. Team roles - Conclusion Operators are needed Developers are needed Consider DevOpsGeneral Problem: From the moment the product runs in production you will need to have a team member for emergency cases available. “I work from 9-5, no interest in working more besides overtime.” - Random Employee “I love my work. I like to work more if it’s interesting.” - Another Random Employee People don’t want to work on attendance (“9-5”, “Not interesting”) In the US: One may get fired if they won’t do it. In Germany: It’s on free will, a “fair” model or you have an explicit operator.
  • 16. Considerations for the process model Agile development (it’s a methodology) Iterative (work a while then review and again) Streamlined (getting to work) Time-boxed (you work in time boxes) Very collaborative (you are talking to your team and other teams all time) Test-driven-design Domain-driven-design
  • 17. Conclusion to those “management” questions In case of a pioneer project …. Lack of experiences with microservices => High Risk Level Wrong interpretation of the whole Operations will overwhelm you Longer time-to-market if not even failure With experience => Low Risk Level Short delivery cycles (agile dev) Extremely modular / Independent development & deployment
  • 18. Microservices Why? Modularity, independent development and operations Scaling can be done per service Technology diversity -- Polyglott presence Right technology stack for the problem (languages, libraries, middleware, databases) Exchangeable You can replace a service with “no effort” regarding to a monolith architecture Effective and not more communication
  • 19. Microservices Why not? Lack of needed experience Not enough resources to buy it Long(er) time-to-market (Highly) distributed system Therefore: Eventual consistency System and Operational complexity Cross service testing is hard
  • 20. And now? If you consider using a microservice approach Do we have the capabilities (resources)? Do we have organizational complexity? Do we need the scaling abilities? Do we need to deliver software faster and maybe deliver regular updates? As one can see these points are project dependent. Therefore you may not say: “Let’s make everything as a MS.”. One need to reconsider it all the time!
  • 21. Want to dive deeper? We got a project management view on that topic? Yes! We can answer the central question? Yes! Whats missing? Use-Case - Technical details With concrete services Overview of cross-cutting-concerns Let’s get rid of the abstraction in the previous part! Profit: You will see more of the whole microservice thing!Yes! No!
  • 22. Who is living microservices? (1/4) Walmart Bought OneOps and worked 2 years on a DevOps API OpenSource (oneops.com) “Four years ago, the Walmart Global eCommerce system was a monolithic application, deployed once every 2 months.” - walmart.com [2016] “On a typical day there are now over 1,000 deployments, executed on-demand by development teams, each taking only minutes on average to complete.”
  • 23. Who is living microservices? (2/4) Netflix They obviously need microservices Contribute to the OpenSource community (only some well-known) Hystrix Chaos Monkey https://github.com/Netflix/ & https://netflix.github.io/
  • 24. Who is living microservices? (3/4) Twitter http://twitter.github.io/ Finagle Own MySQL fork History Started with a three-tier ruby on rails architecture Switched to a more Services oriented approach
  • 25. Who is living microservices? (4/4) Many more Amazon Ebay Google PayPal Soundcloud In common: Evolved from monolith architectural style
  • 26. Use-case -- Shopsystem Common scenario: An user chooses one or many articles from an article list to buy. Objects: User, Article Actions: choose, buy Concrete scenarios: User chooses Article(s); User buys Article(s) ArticleManagement Service UserManagement Service
  • 27. Use-case -- Shopsystem Exemplary “Buy” scenario: User buys Article
  • 28. Possible services -- Shopsystem UserManagement Service ArticleManagement Service OrderManagement Service StockManagement Service Payment Service Recommendation Service ShippingService
  • 29. Routing or Service-Discovery (1/3) Microservice infrastructure handles running service instances => Arbitrary amount of instances per service with individual IPs How does the client know where to route the request? Server-Side Service Discovery Client-Side Service-Discovery “Kubernetes is an open-source system for automating deployment, operations, and scaling of containerized applications” - kubernetes.com
  • 30. Routing or Service-Discovery (2/3) Source: http://microservices.io/ AWS Elastic Load Balancer
  • 31. Routing or Service-Discovery (3/3) Source: http://microservices.io/ Eureka - Service Registry Ribbon client - REST Client querying Eureka
  • 32. Communication between services (1/2) UserManagement Service ArticleManagement Service OrderManagement Service StockManagement Service Payment Service User (Frontend) Order Service will provide the Order Article info Stock amnt Addresses Invoice
  • 33. Communication between services (2/2) Stateless communication e.g. HTTP REST SOAP (XML-RPC) Message Service/Pipes (Java: JMS) etc. * *“I implement Enterprise Integration Patters, ROAARR”
  • 34. API Gateway Pattern Source: http://microservices.io/ Hides the internal API Provides different APIs per Client- Type (mobile, web…) Makes version changes easier in production Less communication overhead Handles Service-Discovery
  • 35. Unavailable services Services should be deployable and runnable on it’s own If ArticleService is down OrderService will be in serious troubles OrderService must respond even if ArticleService is down Fault tolerance Cross-cutting concern Solution: Respond with the correct HTTP StatusCode or send an uncomplete Order
  • 36. Microservice Requirements (1/2) Small footprint Responsive Rapid and consistent response times Resilient Fault tolerant → Let it fail! replication, containment, isolation and delegation Elastic System stays responsive regardless to its workload http://www.reactivemanifesto.org/
  • 37. Microservice Requirements (2/2) Web-Frameworks Vertx.io Java, Javascript, Groovy, Ruby, Ceylon Play Framework Java, Scala WildFly Java (JEE 7 Compliant) REST-Frameworks
  • 38. Databases One Database for each service Database may run on n nodes One Database for each service instance Additional problems are awaiting (Consistency, Routing…) Short NoSQL Excursion CAP-Theorem Availability, Consistence, Partition Tolerance Take two!
  • 39. Authentication Problem: Which Requests may the User make? Services don’t know about the User’s permissions Example OAuth2
  • 41. Microservices - Why? Or why not? Speaker: Sascha Düpre Questions? Feel free to ask!

Notes de l'éditeur

  1. First two questions are more general. And the last ones will answered with regard to the use case.
  2. Consider a problem in the production. Now the operator will try his best, but if it will fail over and over again because of a software lack, he won’t be able to find a solution -- he will need a dev.
  3. Iterative: Instead of planning everything front up and then implementing one will plan and then implement some features and maybe replan e.g.. Streamlined: Instead of long meetings. There are daily short meetings (15 mins) where everybody has a stand up. And then there is some time to talk to each other. Time-Boxed: You say okay lets work 3 weeks and see what gets done. In SCRUM you are using a backlog which contains the requirements broken down to features. And you’ll say we try to implement features a,c,g,e and another team makes f,b,d. Basic conclusion: This topic could fill plenty of hours. You may need to fit it according to your needs.
  4. Before Iam showing the use case, I must mention that this process is just for conceptional reasons. You might use your own techniques for Requirements Engineering.
  5. Thank you for listening. Special thanks to the organizators especially Randy who invited me to have a talk. Thanks.