Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
From Microservices to Serverless. A
new hype or a new hope?
Davide Taibi
CloWEE – Cloud and Web Engineering
http://researc...
Microservices and Serverless Trends
@davidetaibi From Microservices to Serverless. A new hype or a new hope?
serverless
mi...
Microservices and Serverless Trends
@davidetaibi From Microservices to Serverless. A new hype or a new hope?
Google Trends...
Systems and Software Evolution
@davidetaibi
5
Serverless
Function as a
Service
Software Architecture Evolution
2015s
Function as a Service
Highly Decoupled
Any Good
Metaphor
Microservices
Monolithic Systems
8/28/19@davidetaibi
Monolithic Systems
@davidetaibi 8/28/19
Monolithic vs Microservice
8/28/19
Why Companies Are Migrating to
Microservices?
Migration To Microservices - Motivations [1]
• Maintainability
• Scalability
• Cost
@davidetaibi From Microservices to Ser...
Microservice Perceived Benefits [1][2]
• Distributed Work
• System Understandability
• Scalability (if well orchestrated)
...
Technical Issues
• Architectural Patterns and anti-patterns are not clear
• Decoupling from the monolithic system
• How to...
Microservice Architectural Patterns
8/28/19
• Patterns
• D. Taibi, Lenarduzzi, V. , and Pahl, C.
“Architectural Patterns f...
Microservice Architectural Patterns
8/28/19
• Patterns
• D. Taibi, Lenarduzzi, V. , and Pahl, C.
“Architectural Patterns f...
Microservice Architectural Patterns
8/28/19
• Patterns
• D. Taibi, Lenarduzzi, V. , and Pahl, C.
“Architectural Patterns f...
Chris Richardson
microservices.io
Microservice Decomposition
Microservice Decomposition
8/28/19
• How about process mining to identify business processes?
D. Taibi and Systa, K. , “Fr...
Microservice - METRICS
8/28/19
• How to measure coupling?
• CBM (coupling between microservices) [1]
• Working on a new se...
Microservice Maintenance
Technical Debt under control
@davidetaibi 8/28/19
0
2K
4K
6K
8K
10K
12K
14K
16K
Aug-14Oct-14Dec-1...
• Reverse engineering of microservice architecture
• https://github.com/clowee/MicroDepGraph
• https://github.com/clowee/M...
Serverless
Serverless Functions
Function-as-a-service
O’Reilly SW Architecture Conference 2018
Stop using microservices!
Move to serverless functions as soon as possible!
22/05...
From Microservices to Serverless Functions
• Practitioners started migrate from microservices to FaaS
• Mixed Approach (mi...
What is Serverless [3]
a cloud-native platform
for
short-running, stateless computation
and
event-driven applications
whic...
8/28/19
Runs code only on-demand on a
per-request basis
Serverless
deployment &
operations model No servers Just code
Serv...
Runscode in response to events
Event-programming
model
What triggers code execution?
22/05/2019@davidetaibi Serverless Mee...
f(x)
What is Serverless good for?
Serverless is good for
short-running
stateless
event-driven
Microservices
Mobile Backend...
Current Platforms for Serverless
Azure Functions
AWS Lambda
Kubernetes
Google Functions
Red-Hat 22/05/2019@davidetaibi Ser...
Why practitioners are moving to
serverless
Survey (ongoing)
• 52 companies
• Identify Motivations, Benefits, Issues, Patterns, anti-patterns.
22/05/2019 | 32@davidet...
Preliminary Results – Migration Motivations
Companies Already moved to Microservices
• OPS Effort for Microservices
• Get ...
Preliminary Results – Migration Issues
Developers are not used to the event-oriented programming
Very hard to test
Debug a...
Serverless Anti-Patterns
Preliminary Results
22/05/2019 | 36
@davidetaibi
Serverless Meetup - Tampere
Serverless Anti-Patterns Summary
#1 Async Calls
#2 Functions calling other functions
#3 Shared Code
#4 Shared Libraries as...
Open Questions - Microservices
• How to refactor a monolithic system into microservices?
• Which anti-patterns are actuall...
Open Questions - Serverless
• When is better to use serverless and when microservices
• How to architect a system based on...
Spoiler… New IEEE Special Theme Issue
Serverless Applications Engineering
• Topics:
• Mindsets: Engineering strategies and...
Conclusion
• Serverless and Microservices are very powerful and useful technologies
• Still several open questions
• Devel...
8/28/19@davidetaibi From Microservices to Serverless. A new hype or a new hope?
Upcoming SlideShare
Loading in …5
×

From Microservices to Serverless. A new hype or a new hope?

DEVOPS AND MICROSERVICE APIS
2nd Vienna Software Seminar (VSS)
28.08.2019 Vienna

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

  • Be the first to like this

From Microservices to Serverless. A new hype or a new hope?

  1. 1. From Microservices to Serverless. A new hype or a new hope? Davide Taibi CloWEE – Cloud and Web Engineering http://research.tuni.fi/clowee 28.08.2019 2nd Vienna Software Seminar (VSS) on DevOps and Microservice APIs Vienna, Austria
  2. 2. Microservices and Serverless Trends @davidetaibi From Microservices to Serverless. A new hype or a new hope? serverless microservice Google Trends 8/28/19
  3. 3. Microservices and Serverless Trends @davidetaibi From Microservices to Serverless. A new hype or a new hope? Google Trends 8/28/19
  4. 4. Systems and Software Evolution @davidetaibi 5 Serverless Function as a Service
  5. 5. Software Architecture Evolution 2015s Function as a Service Highly Decoupled Any Good Metaphor
  6. 6. Microservices
  7. 7. Monolithic Systems 8/28/19@davidetaibi Monolithic Systems @davidetaibi 8/28/19
  8. 8. Monolithic vs Microservice 8/28/19
  9. 9. Why Companies Are Migrating to Microservices?
  10. 10. Migration To Microservices - Motivations [1] • Maintainability • Scalability • Cost @davidetaibi From Microservices to Serverless. A new hype or a new hope? [1] D. Taibi, Lenarduzzi, V. , and Pahl, C. , “Processes, Motivations and Issues for Migrating to Microservices Architectures: An Empirical Investigation”, IEEE Cloud Computing Journal, vol. 4, no. 5, 2017. 8/28/19
  11. 11. Microservice Perceived Benefits [1][2] • Distributed Work • System Understandability • Scalability (if well orchestrated) [2] J. Soldani, D.A. Tamburri, W. Van Den Heuvel, The pains and gains of microservices: A Systematic grey literature review, Journal of Systems and Software, Volume 146, pp 215-232. 2018 8/28/19
  12. 12. Technical Issues • Architectural Patterns and anti-patterns are not clear • Decoupling from the monolithic system • How to decompose the monolithic system? • Database migration and data splitting Effort-Related issues • Development Effort overhead • at least 20% higher • Effort required for the DevOps infrastructure • Effort required for library conversion Microservice Perceived Issues [1][2] @davidetaibi 8/28/19
  13. 13. Microservice Architectural Patterns 8/28/19 • Patterns • D. Taibi, Lenarduzzi, V. , and Pahl, C. “Architectural Patterns for Microservices: A Systematic Mapping Study” CLOSER , 2018 • D. Taibi, Lenarduzzi, V. , and Pahl, C. , “Continuous Architecting with Microservices and DevOps: A Systematic Mapping Study”, in Cloud Computing and Services Science, Springer International Publishing, 2019 • Anti-pattern • D.. Taibi and V. Lenarduzzi , “On the Definition of Microservice Bad Smells” IEEE Software , vol. 5, no. 3, 2018. • D. Taibi, V. Lenarduzzi, C. Pahl. "Microservices Antipatterns: A Taxonomy" Microservices - Science and Engineering, Springer, 2019
  14. 14. Microservice Architectural Patterns 8/28/19 • Patterns • D. Taibi, Lenarduzzi, V. , and Pahl, C. “Architectural Patterns for Microservices: A Systematic Mapping Study” CLOSER , 2018 • D. Taibi, Lenarduzzi, V. , and Pahl, C. , “Continuous Architecting with Microservices and DevOps: A Systematic Mapping Study”, in Cloud Computing and Services Science, Springer International Publishing, 2019 • Anti-pattern • D.. Taibi and V. Lenarduzzi , “On the Definition of Microservice Bad Smells” IEEE Software , vol. 5, no. 3, 2018. • D. Taibi, V. Lenarduzzi, C. Pahl. "Microservices Antipatterns: A Taxonomy" Microservices - Science and Engineering, Springer, 2019
  15. 15. Microservice Architectural Patterns 8/28/19 • Patterns • D. Taibi, Lenarduzzi, V. , and Pahl, C. “Architectural Patterns for Microservices: A Systematic Mapping Study” CLOSER , 2018 • D. Taibi, Lenarduzzi, V. , and Pahl, C. , “Continuous Architecting with Microservices and DevOps: A Systematic Mapping Study”, in Cloud Computing and Services Science, Springer International Publishing, 2019 • Anti-pattern • D.. Taibi and V. Lenarduzzi , “On the Definition of Microservice Bad Smells” IEEE Software , vol. 5, no. 3, 2018. • D. Taibi, V. Lenarduzzi, C. Pahl. "Microservices Antipatterns: A Taxonomy" Microservices - Science and Engineering, Springer, 2019
  16. 16. Chris Richardson microservices.io Microservice Decomposition
  17. 17. Microservice Decomposition 8/28/19 • How about process mining to identify business processes? D. Taibi and Systa, K. , “From Monolithic Systems to Microservices: A Decomposition Framework based on Process Mining”, in 9th International Conference on Cloud Computing and Services Science, CLOSER , 2019, Heraklion (Greece), 2019.
  18. 18. Microservice - METRICS 8/28/19 • How to measure coupling? • CBM (coupling between microservices) [1] • Working on a new set of validate measures • Validation of metrics proposed by Bogner et al. [2] [1] D. Taibi and Systa, K. , “From Monolithic Systems to Microservices: A Decomposition Framework based on Process Mining”, in 9th International Conference on Cloud Computing and Services Science, CLOSER , 2019, Heraklion (Greece), 2019. [2] Justus Bogner, Stefan Wagner, Alfred Zimmermann. Automatically measuring the maintainability of service- and microservice-based systems: a literature review. IWSM-Mensura 2017
  19. 19. Microservice Maintenance Technical Debt under control @davidetaibi 8/28/19 0 2K 4K 6K 8K 10K 12K 14K 16K Aug-14Oct-14Dec-14Feb-15Apr-15 Jun-15Aug-15Oct-15Dec-15Feb-16Apr-16 Jun-16Aug-16Oct-16Dec-16Feb-17Apr-17 Jun-17Aug-17Oct-17Dec-17Feb-18Apr-18 Jun-18Aug-18Oct-18 TDinminutes(thousands) Monolithic System Microservice 1 Microservice 2 Microservice 3 Microservice 4 Microservice 5 Total TD_M linear (before) linear (after)
  20. 20. • Reverse engineering of microservice architecture • https://github.com/clowee/MicroDepGraph • https://github.com/clowee/MicroserviceDataset • Other approaches? Microservice – Patterns Analysus @davidetaibi 8/28/19
  21. 21. Serverless Serverless Functions Function-as-a-service
  22. 22. O’Reilly SW Architecture Conference 2018 Stop using microservices! Move to serverless functions as soon as possible! 22/05/2019 | 24@davidetaibi Serverless Meetup - Tampere
  23. 23. From Microservices to Serverless Functions • Practitioners started migrate from microservices to FaaS • Mixed Approach (microservices + Functions) • New applications 100% serverless • vast majority of Finnish companies (interviewed) @davidetaibi 8/28/19
  24. 24. What is Serverless [3] a cloud-native platform for short-running, stateless computation and event-driven applications which scales up and down instantly and automatically and charges for actual usage at a millisecond granularity What is Serverless? 8/28/19 [3] Baldini I. et al. (2017) Serverless Computing: Current Trends and Open Problems. In: Chaudhary S., Somani G., Buyya R. (eds) Research Advances in Cloud Computing. Springer, Singapore
  25. 25. 8/28/19 Runs code only on-demand on a per-request basis Serverless deployment & operations model No servers Just code Server-less means no servers? Or worry-less about servers? How does it work @davidetaibi
  26. 26. Runscode in response to events Event-programming model What triggers code execution? 22/05/2019@davidetaibi Serverless Meetup - Tampere | 28
  27. 27. f(x) What is Serverless good for? Serverless is good for short-running stateless event-driven Microservices Mobile Backends Bots, ML Inferencing IoT Modest Stream Processing Service integration Serverless is not good for long-running stateful number crunching Databases Deep Learning Training Heavy-Duty Stream Analytics Spark/Hadoop Analytics Numerical Simulation Video Streaming 22/05/2019@davidetaibi Serverless Meetup - Tampere 29
  28. 28. Current Platforms for Serverless Azure Functions AWS Lambda Kubernetes Google Functions Red-Hat 22/05/2019@davidetaibi Serverless Meetup - Tampere | 30
  29. 29. Why practitioners are moving to serverless
  30. 30. Survey (ongoing) • 52 companies • Identify Motivations, Benefits, Issues, Patterns, anti-patterns. 22/05/2019 | 32@davidetaibi Serverless Meetup - Tampere
  31. 31. Preliminary Results – Migration Motivations Companies Already moved to Microservices • OPS Effort for Microservices • Get rid of Kubernetes • No OPS Companies Migrating from Monolithic systems • New (hype) technology • Promising technology • No initial infrastructural costs (pay as you use) • Automatic scaling 22/05/2019 | 33@davidetaibi Serverless Meetup - Tampere
  32. 32. Preliminary Results – Migration Issues Developers are not used to the event-oriented programming Very hard to test Debug almost impossible Unknown Patterns and antipatterns Anomalies can generate unexpected costs! 22/05/2019 | 34@davidetaibi Serverless Meetup - Tampere
  33. 33. Serverless Anti-Patterns Preliminary Results 22/05/2019 | 36 @davidetaibi Serverless Meetup - Tampere
  34. 34. Serverless Anti-Patterns Summary #1 Async Calls #2 Functions calling other functions #3 Shared Code #4 Shared Libraries as Functions #5 Too many libraries #6 Too Many technologies #7 Too many functions EXTRA: The distributed Monolith 22/05/2019 | 37@davidetaibi Serverless Meetup - Tampere
  35. 35. Open Questions - Microservices • How to refactor a monolithic system into microservices? • Which anti-patterns are actually harmful and when? • How to evaluate coupling and cohesion between Microservices? • How to efficiently orchestrate a system? • Is a microservices-based system more understandable, and more maintainable? • How to measure them? 22/05/2019 | 38@davidetaibi Serverless Meetup - Tampere
  36. 36. Open Questions - Serverless • When is better to use serverless and when microservices • How to architect a system based on serverless functions? • Or to combine functions to create a microservice? • Architectural Patterns? Anti-Patterns? • How to prevent anomalies? 22/05/2019 | 39@davidetaibi Serverless Meetup - Tampere
  37. 37. Spoiler… New IEEE Special Theme Issue Serverless Applications Engineering • Topics: • Mindsets: Engineering strategies and priorities in a serverless context. • Architectures: Single- and multi-cloud FaaS/BaaS bindings; portable functions. • Patterns: Functions as glue code versus fully FaaS-based applications; function orchestration in code versus composition languages. • Testing approaches: Platform emulation; validation of function code and configuration; generic benchmarks and corner case simulations. • Frameworks/tools: Deployment, automated FaaSification, tracing and visualisation of function dependencies, state/storage bindings. 8/28/19@davidetaibi From Microservices to Serverless. A new hype or a new hope?
  38. 38. Conclusion • Serverless and Microservices are very powerful and useful technologies • Still several open questions • Developers should carefully consider the “old fashioned” software engineering practices • Properly design a modular system • Pay attention to coupling and cohesion • Think about long-term maintenance • Avoid the distributed monolith 22/05/2019 | 41@davidetaibi Serverless Meetup - Tampere
  39. 39. 8/28/19@davidetaibi From Microservices to Serverless. A new hype or a new hope?

×