SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Serverless Meetup Boston, May 23, 2019
Marius Bogoevici
Principal Specialist Solution Architect
mariusb@redhat.com
twitter: mariusbogoevici
1
Event-driven
Microservices in the
Serverless Age
Marius Bogoevici
● Principal Specialist Solutions Architect at Red Hat
○ Specialize in Integration/Messaging/Data Streaming
● OSS contributor since 2008
○ Spring Integration
○ JBoss ecosystem
○ Spring XD, Spring Integration Kafka
○ Former Spring Cloud Stream project lead
● Co-author “Spring Integration in Action”, Manning, 2012
2
WHY MICROSERVICES?
WHY SERVERLESS?
Monolith Microservices
Operational efficiency Fast value delivery
INSERT DESIGNATOR, IF NEEDED4
Still, why fast value delivery?
Fast value delivery
New features
Experimentation
Increased
confidence
Unfortunately, we cannot predict the future. As an
organization, we must be able to observe and experiment
in our environments and react accordingly.
We need to be agile.
On the other hand we must be mindful of our resources;
We want to eliminate waste, reduce time to
experiment, and make it cheap so we can increase
our returns.
We cannot build complex systems from complex parts.
We must keep our components as simple and
understandable as possible.
As hardware evolves, we have more options
Request-reply vs. event-driven
Synchronous & ephemeral
Low composability
Simplified model
Low tolerance to failure
Best practices evolved as REST
Asynchronous and persistent
Decoupled
Highly composable
Complex model
High tolerance to failure
Best practices are still evolving
9
What is an event?
● Action or occurrence, something that happened in the past
○ ‘Order created’, ‘user logged in’, ‘
● Event characteristics:
○ Immutable
○ Optionally persistent
○ Shareable
● Event types: [1]
○ Notification
○ State Transfer (Command)
○ Event-Sourcing/CQRS
[1] https://martinfowler.com/articles/201701-event-driven.html
10
Designing systems with events
● EDA: event-centric approach in system design
○ Treating events as part of your domain model
○ Designing components as event handlers and
emitters
● EDA is aligned with the goals of domain-driven design
○ Enforce isolation and decoupling between bounded
contexts
○ Properly designed events can create an expressive
ubiquitous language
● EDA creates highly observable and extensible systems
● Event storming: events-first design
11
Event-driven microservices
Applications
Messaging
Middleware
12
RETHINKING EVENT-DRIVEN ARCHITECTURE
EventsMicroservices
Lines of
Business
Apps
Regions
System and data-centric
Events are designed to respond to
ad-hoc connectivity needs
Event-centric
Events are first class citizens that describe
the interactions in the enterprise
Events
Events
Events
Microservices
Apps
LOBs
Regions
Microservices in containers:
Increasing agility, isolation, utilization
14
● Use a platform that makes running apps reliable, transparent and
boring
● In-built resource management
○ Memory, CPU, disk
● Elastic scaling
● Monitoring and failover
○ Health, logging, metrics
● Routing and load balancing
● Rolling upgrades and CI/CD
● Namespacing
Orchestrating containers on cloud native platforms
15
Event-driven microservices in the cloud native age:
Elastic computing and utility messaging
16
Some challenges with microservices ...
● Utilization
○ Idling under low traffic
○ High resource consumption - memory, disk
● Connectivity
○ Must know broker location
○ Integration with event sources
● Abstraction
○ Must know broker type
○ Dependence on data/payload formats
● Observability
● Security
Serverless model: event-based and elastic
Enriching microservice architecture with serverless
facilities
● Elastic execution and avoidance of idling (autoscale)
● Utility data and messaging infrastructure
○ Provided via platform services
● Decoupling of business logic from messaging
infrastructure
Architectural risks with serverless:
loss of domain perspective …
Architectural risks with serverless:
… point-to-point integrations and sprawl
Recap: event hubs in microservice arhitecture
Event-centric microservice arhitectures...
… can be easily adopted for serverless design
Microservices in Event-driven Architecture:
Pros and cons
Functions in Event-driven Architecture:
Pros and cons
Event-driven microservice use cases applied to serverless
Event Sourcing/CQRS
Event-driven microservice use cases applied to serverless
Streaming ETL, CDC
Event-driven microservice use cases applied to serverless
Load Balancing and High Scale Compute
Container-centric microservices and functions on
Kubernetes
Optimizing utilization outside of autoscaling
● Impedance mismatch between runtimes optimized for physical/virtual
environments and containerization
○ Large footprint (low density)
○ Long startup times - latency
● Recommendations:
○ Favor technologies with small footprint and low latency, in particular for
serverless
○ Favor technologies that allow for easy change of deployment model
(independent deployment vs on-demand/serverless) while preserving
investment in business logic
Your technology radar
● Service Mesh (e.g. Istio):
○ Provide microservice interconnectivity
● Serverless platforms (e.g. Knative)
○ Container build and on-demand scheduling
● Container-native frameworks (e.g. Quarkus)
○ Optimize Java workloads for containerized apps
● Strimzi - Kafka operator for Kubernetes/OpenShift
● EnMasse - Messaging-as-a-Service for Kubernetes/OpenShift
● FaaS frameworks (e.g. Camel-K)
○ Schedule integration code directly on platform or via Knative
Conclusions
● Event-driven microservices are key for implementing highly
distributed, extensible architectures
● Serverless platforms are a natural fit for several event-driven
microservice use cases
● Serverless architectures should complement event-based execution
with event-centric design
● Always consider tradeoffs:
○ Serverless vs independent deployment (aka ‘traditional’
microservice)
○ Optimizied runtime vs technical investment (can you have both?)

Contenu connexe

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Event Driven Microservices in the Serverless Age

  • 1. Serverless Meetup Boston, May 23, 2019 Marius Bogoevici Principal Specialist Solution Architect mariusb@redhat.com twitter: mariusbogoevici 1 Event-driven Microservices in the Serverless Age
  • 2. Marius Bogoevici ● Principal Specialist Solutions Architect at Red Hat ○ Specialize in Integration/Messaging/Data Streaming ● OSS contributor since 2008 ○ Spring Integration ○ JBoss ecosystem ○ Spring XD, Spring Integration Kafka ○ Former Spring Cloud Stream project lead ● Co-author “Spring Integration in Action”, Manning, 2012 2
  • 3. WHY MICROSERVICES? WHY SERVERLESS? Monolith Microservices Operational efficiency Fast value delivery
  • 4. INSERT DESIGNATOR, IF NEEDED4 Still, why fast value delivery? Fast value delivery New features Experimentation Increased confidence
  • 5. Unfortunately, we cannot predict the future. As an organization, we must be able to observe and experiment in our environments and react accordingly. We need to be agile.
  • 6. On the other hand we must be mindful of our resources; We want to eliminate waste, reduce time to experiment, and make it cheap so we can increase our returns.
  • 7. We cannot build complex systems from complex parts. We must keep our components as simple and understandable as possible.
  • 8. As hardware evolves, we have more options
  • 9. Request-reply vs. event-driven Synchronous & ephemeral Low composability Simplified model Low tolerance to failure Best practices evolved as REST Asynchronous and persistent Decoupled Highly composable Complex model High tolerance to failure Best practices are still evolving 9
  • 10. What is an event? ● Action or occurrence, something that happened in the past ○ ‘Order created’, ‘user logged in’, ‘ ● Event characteristics: ○ Immutable ○ Optionally persistent ○ Shareable ● Event types: [1] ○ Notification ○ State Transfer (Command) ○ Event-Sourcing/CQRS [1] https://martinfowler.com/articles/201701-event-driven.html 10
  • 11. Designing systems with events ● EDA: event-centric approach in system design ○ Treating events as part of your domain model ○ Designing components as event handlers and emitters ● EDA is aligned with the goals of domain-driven design ○ Enforce isolation and decoupling between bounded contexts ○ Properly designed events can create an expressive ubiquitous language ● EDA creates highly observable and extensible systems ● Event storming: events-first design 11
  • 13. RETHINKING EVENT-DRIVEN ARCHITECTURE EventsMicroservices Lines of Business Apps Regions System and data-centric Events are designed to respond to ad-hoc connectivity needs Event-centric Events are first class citizens that describe the interactions in the enterprise Events Events Events Microservices Apps LOBs Regions
  • 14. Microservices in containers: Increasing agility, isolation, utilization 14
  • 15. ● Use a platform that makes running apps reliable, transparent and boring ● In-built resource management ○ Memory, CPU, disk ● Elastic scaling ● Monitoring and failover ○ Health, logging, metrics ● Routing and load balancing ● Rolling upgrades and CI/CD ● Namespacing Orchestrating containers on cloud native platforms 15
  • 16. Event-driven microservices in the cloud native age: Elastic computing and utility messaging 16
  • 17. Some challenges with microservices ... ● Utilization ○ Idling under low traffic ○ High resource consumption - memory, disk ● Connectivity ○ Must know broker location ○ Integration with event sources ● Abstraction ○ Must know broker type ○ Dependence on data/payload formats ● Observability ● Security
  • 19. Enriching microservice architecture with serverless facilities ● Elastic execution and avoidance of idling (autoscale) ● Utility data and messaging infrastructure ○ Provided via platform services ● Decoupling of business logic from messaging infrastructure
  • 20. Architectural risks with serverless: loss of domain perspective …
  • 21. Architectural risks with serverless: … point-to-point integrations and sprawl
  • 22. Recap: event hubs in microservice arhitecture
  • 24. … can be easily adopted for serverless design
  • 25. Microservices in Event-driven Architecture: Pros and cons
  • 26. Functions in Event-driven Architecture: Pros and cons
  • 27. Event-driven microservice use cases applied to serverless Event Sourcing/CQRS
  • 28. Event-driven microservice use cases applied to serverless Streaming ETL, CDC
  • 29. Event-driven microservice use cases applied to serverless Load Balancing and High Scale Compute
  • 30. Container-centric microservices and functions on Kubernetes
  • 31. Optimizing utilization outside of autoscaling ● Impedance mismatch between runtimes optimized for physical/virtual environments and containerization ○ Large footprint (low density) ○ Long startup times - latency ● Recommendations: ○ Favor technologies with small footprint and low latency, in particular for serverless ○ Favor technologies that allow for easy change of deployment model (independent deployment vs on-demand/serverless) while preserving investment in business logic
  • 32. Your technology radar ● Service Mesh (e.g. Istio): ○ Provide microservice interconnectivity ● Serverless platforms (e.g. Knative) ○ Container build and on-demand scheduling ● Container-native frameworks (e.g. Quarkus) ○ Optimize Java workloads for containerized apps ● Strimzi - Kafka operator for Kubernetes/OpenShift ● EnMasse - Messaging-as-a-Service for Kubernetes/OpenShift ● FaaS frameworks (e.g. Camel-K) ○ Schedule integration code directly on platform or via Knative
  • 33. Conclusions ● Event-driven microservices are key for implementing highly distributed, extensible architectures ● Serverless platforms are a natural fit for several event-driven microservice use cases ● Serverless architectures should complement event-based execution with event-centric design ● Always consider tradeoffs: ○ Serverless vs independent deployment (aka ‘traditional’ microservice) ○ Optimizied runtime vs technical investment (can you have both?)