SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Building
Microservices
with .Net
Vasilenko Anton
.Net Team Leader
@ Binary Studio
Contents
1. Definitions
2. Comparison with alternatives
3.Key aspects in details
In theory
In the real .Net solution
“Microservices are ...
… small, autonomous services
that work together.
Sam Newman
“There are two hard things in computer
science: cache invalidation, naming things,
and off-by-one errors.”
“Any fool can write code that a computer
can understand. Good programmers write
code that humans can understand.”
Martin Fowler
“Microservices ...
● application - a suite of small services
○ each in own process
○ communicating i.e. via HTTP
● built around business capabilities
● auto-deployed independently by CI & CD
● minimal centralized management
● different languages possible
● different data storages possible
Service Oriented Architecture
“A loosely-coupled architecture designed to
meet the business needs of the organization.”
A software design based on discrete software
components, “services”, that collectively
provide the functionalities of the larger
software architecture.
SOA is an architectural style that supports service-orientation. Service-orientation is a way of
thinking in terms of services and service-based development and the outcomes of services.
SOA vs Microservices
SOA
Microservices
Very broad term,
almost meaningless
Monolith architecture
“All architectural layers and all
functionality in one single application.”
Simple to:
● Develop
● Deploy
● Test
… until it starts growing
https://youtu.be/wgdBVIX9ifA?t=1089
Let’s dive into details
In theory
✘ Separate projects
✘ Identify seams
✘ Isolate wisely
changing parts
team-wise
extra security, monitoring
Key points: Splitting the Monolith
In our project
✘ Logical split
✘ With scalability in mind
✘ Isolate external services
✘ several DBs
Key points: Splitting the Monolith
Summary
✘ Do you really need to split?
✘ Document API
✘ Use different solutions, even for same stack
✘ Avoid using shared logic
“Don't even consider
microservices unless you have a
system that's too complex to
manage as a monolith.”
In theory
✘ Prefer REST via HTTP
✘ Facade services for 3rd-party API
✘ Unified log data & format
✘ Strangler pattern
✘ Tolerant readers
Key points: Integration
In our project
✘ Mostly HTTP, almost REST
✘ Gateway Service
✘ Tolerant readers (rest + json)
✘ DB Integration
✘ WCF (request-response, fire and forget)
Key points: Integration
Summary
✘ Better stick to HTTP with REST
✘ Integration tests for 3rd parties
✘ Avoid API versioning
In theory
✘ Centralized logging
✘ Queryable log
✘ Unified log data & format
Key points: Logging
In our project
✘ Log from Cloud
✘ Simple Filtering
✘ Single format
Key points: Logging
Summary
✘ Always store source module of event
✘ Use Correlation ID
✘ Don’t reinvent the
Tools for logs: LogStash, Kibana.
In theory
✘ Blackbox tests of API
✘ Generating tests by documented API
Key points: Testing
In our project
✘ UnitTests
✘ Integration Tests
✘ PostMan
✘ WcfTestClient
Summary
✘ Local debug environment (with faked
boundaries)
✘ Simple test utility to test API
In theory
✘ Single Sign-On
✘ Authorized Clients
✘ Authorized Services
Key points: Security
In our project
✘ Central identity & auth Servers
✘ Everything authorized
✘ Token in HTTP Header
identity and auth info
Summary
✘ HTTPS is a MUST
✘ Avoid sending auth info in token
✘ Don’t reinvent the
In theory
✘ Single Sign-On
✘ Authorized Clients
✘ Authorized Services
Key points: Security
In our project
✘ Central identity & auth Servers
✘ Everything authorized
✘ Token in HTTP Header
identity and auth info
Key points: Security
Summary
✘ HTTPS is a MUST
✘ Avoid sending auth info in token
✘ Don’t reinvent the
In theory
✘ Cloud should help you
✘ If you help cloud
Key points: Scaling
In our project
✘ Almost all services support scaling
✘ Sync through tricks with MongoDB
✘ Cloud support of scaling
Key points: Scaling
Summary
✘ Microservice should be scalable
✘ Think about DB bottlenecks
✘ Think of data sync (DB, queues)
In theory
✘ Independent service deployment
✘ ASAP
✘ Use Cloud or containers features
Key points: Deployment
In our project
✘ monolith deployment :(
✘ Independent patching possible
✘ Cloud doesn’t encourage auto deploy
Key points: Deployment
Summary
✘ Separate CI & CD jobs for each service
✘ Deployment strategy
Our Learning path
Our project
Microservices
onolythic
pplication
Service-oriented
Architecture
Monolith
✘ Simplicity
✘ Consistency
✘ Inter-module refactoring
Monolyth vs Microservices
Microservices
✘ Partial Deployment
✘ Availability
✘ Help preserve modularity
✘ Multiple Platforms (but please no JS)
Remember my advices?
Microservices Trade-Offs
What to Pick?
What do we have?
✘ Rapid Host Provisioning
✘ Basic Monitoring
✘ Rapid App Deployment
✘ DevOps culture ...
What do we need?
Always consider
✘ Solution scale
✘ Teams configuration
Virtualization Containerization
&
● Running on few hosts
● Environment close to production
● Easy management (with Cloud)
● Running on dev host
● Environment close to virtual
● Easy trace
● Easy management (even without cloud)
Containerization with .Net
.Net stack usually requires Windows
Containers usually require UNIX
Sources
1. “Building Microservices” by Sam Newman
2. Enterprise Integration Patterns at camel.apache.org
3.Microservices by Martin Fowler
a.Microservices Conf Video
4.https://www.nginx.com/solutions/microservices/
5.Majestic Monolith by David Heinemeier Hansson
6.Our project source code and docs
i.e.:
✘You’ve said… Can you explain… ?
✘What do you mean by …?
✘Have you tried …?
✘Can you suggest …?
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a CometDDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
Richard Banks
 

Was ist angesagt? (20)

DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a CometDDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
 
Service mesh in Microservice World to Manage end to end service communications
Service mesh in Microservice World to Manage end to end service communicationsService mesh in Microservice World to Manage end to end service communications
Service mesh in Microservice World to Manage end to end service communications
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
The Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET frameworkThe Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET framework
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...
 
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
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Integration Microservices
Integration MicroservicesIntegration Microservices
Integration Microservices
 
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology Stack
 
Microservice Architecture 101
Microservice Architecture 101Microservice Architecture 101
Microservice Architecture 101
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Microservices
MicroservicesMicroservices
Microservices
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
 
Deep-dive into Microservice Outer Architecture
Deep-dive into Microservice Outer ArchitectureDeep-dive into Microservice Outer Architecture
Deep-dive into Microservice Outer Architecture
 

Andere mochten auch

Andere mochten auch (12)

Build 2017 - B8083 - The future of Visual Studio
Build 2017 - B8083 - The future of Visual StudioBuild 2017 - B8083 - The future of Visual Studio
Build 2017 - B8083 - The future of Visual Studio
 
Negotiating Skills
Negotiating SkillsNegotiating Skills
Negotiating Skills
 
Overview of the new .NET Core and .NET Platform Standard
Overview of the new .NET Core and .NET Platform StandardOverview of the new .NET Core and .NET Platform Standard
Overview of the new .NET Core and .NET Platform Standard
 
Building .NET Microservices
Building .NET MicroservicesBuilding .NET Microservices
Building .NET Microservices
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
E book Microsoft Dynamics CRM 2013 Personal Dashboard for End Users
E book Microsoft Dynamics CRM 2013 Personal Dashboard for End UsersE book Microsoft Dynamics CRM 2013 Personal Dashboard for End Users
E book Microsoft Dynamics CRM 2013 Personal Dashboard for End Users
 
Introduction to .NET Core
Introduction to .NET CoreIntroduction to .NET Core
Introduction to .NET Core
 
Build 2017 - B8058 - Location intelligence and personalized experiences with ...
Build 2017 - B8058 - Location intelligence and personalized experiences with ...Build 2017 - B8058 - Location intelligence and personalized experiences with ...
Build 2017 - B8058 - Location intelligence and personalized experiences with ...
 
Cross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet coreCross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet core
 
Short introduction - .net core and .net standard 2.0
Short introduction - .net core and .net standard 2.0Short introduction - .net core and .net standard 2.0
Short introduction - .net core and .net standard 2.0
 
Mastering The Fourth Industrial Revolution
Mastering The Fourth Industrial Revolution Mastering The Fourth Industrial Revolution
Mastering The Fourth Industrial Revolution
 
10 facts about jobs in the future
10 facts about jobs in the future10 facts about jobs in the future
10 facts about jobs in the future
 

Ähnlich wie Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)

Ähnlich wie Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio) (20)

Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS SummitDiscover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
Discover MongoDB Atlas and MongoDB Stitch - DEM02-S - Mexico City AWS Summit
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloudInterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
 
Microservices (en)
Microservices (en)Microservices (en)
Microservices (en)
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
Microservices
MicroservicesMicroservices
Microservices
 
Moving from Monolith to Microservices
Moving from Monolith to MicroservicesMoving from Monolith to Microservices
Moving from Monolith to Microservices
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Microservices-101
Microservices-101Microservices-101
Microservices-101
 
Ledingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in action
 
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
 
Feedback on building Production-Ready Microsoft Teams Apps
Feedback on building Production-Ready Microsoft Teams AppsFeedback on building Production-Ready Microsoft Teams Apps
Feedback on building Production-Ready Microsoft Teams Apps
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupAutomating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native Meetup
 
Opticon18: Developer Night
Opticon18: Developer NightOpticon18: Developer Night
Opticon18: Developer Night
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
 
Workshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesWorkshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databases
 
Micro-services meetup
Micro-services meetupMicro-services meetup
Micro-services meetup
 

Mehr von Binary Studio

Mehr von Binary Studio (20)

Academy PRO: D3, part 3
Academy PRO: D3, part 3Academy PRO: D3, part 3
Academy PRO: D3, part 3
 
Academy PRO: D3, part 1
Academy PRO: D3, part 1Academy PRO: D3, part 1
Academy PRO: D3, part 1
 
Academy PRO: Cryptography 3
Academy PRO: Cryptography 3Academy PRO: Cryptography 3
Academy PRO: Cryptography 3
 
Academy PRO: Cryptography 1
Academy PRO: Cryptography 1Academy PRO: Cryptography 1
Academy PRO: Cryptography 1
 
Academy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobXAcademy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobX
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
 
Binary Studio Academy 2017: JS team project - Orderly
Binary Studio Academy 2017: JS team project - OrderlyBinary Studio Academy 2017: JS team project - Orderly
Binary Studio Academy 2017: JS team project - Orderly
 
Binary Studio Academy 2017: .NET team project - Unicorn
Binary Studio Academy 2017: .NET team project - UnicornBinary Studio Academy 2017: .NET team project - Unicorn
Binary Studio Academy 2017: .NET team project - Unicorn
 
Academy PRO: React native - miscellaneous
Academy PRO: React native - miscellaneousAcademy PRO: React native - miscellaneous
Academy PRO: React native - miscellaneous
 
Academy PRO: React native - publish
Academy PRO: React native - publishAcademy PRO: React native - publish
Academy PRO: React native - publish
 
Academy PRO: React native - navigation
Academy PRO: React native - navigationAcademy PRO: React native - navigation
Academy PRO: React native - navigation
 
Academy PRO: React native - building first scenes
Academy PRO: React native - building first scenesAcademy PRO: React native - building first scenes
Academy PRO: React native - building first scenes
 
Academy PRO: React Native - introduction
Academy PRO: React Native - introductionAcademy PRO: React Native - introduction
Academy PRO: React Native - introduction
 
Academy PRO: Push notifications. Denis Beketsky
Academy PRO: Push notifications. Denis BeketskyAcademy PRO: Push notifications. Denis Beketsky
Academy PRO: Push notifications. Denis Beketsky
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4
 
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3
 
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2
 
Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1
 

Kürzlich hochgeladen

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
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+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
 

Kürzlich hochgeladen (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
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
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
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...
 
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
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
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...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
+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...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
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
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
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
 
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
 

Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)

  • 2. Vasilenko Anton .Net Team Leader @ Binary Studio
  • 3. Contents 1. Definitions 2. Comparison with alternatives 3.Key aspects in details In theory In the real .Net solution
  • 4. “Microservices are ... … small, autonomous services that work together. Sam Newman
  • 5. “There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.” “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” Martin Fowler
  • 6. “Microservices ... ● application - a suite of small services ○ each in own process ○ communicating i.e. via HTTP ● built around business capabilities ● auto-deployed independently by CI & CD ● minimal centralized management ● different languages possible ● different data storages possible
  • 7. Service Oriented Architecture “A loosely-coupled architecture designed to meet the business needs of the organization.” A software design based on discrete software components, “services”, that collectively provide the functionalities of the larger software architecture. SOA is an architectural style that supports service-orientation. Service-orientation is a way of thinking in terms of services and service-based development and the outcomes of services.
  • 8. SOA vs Microservices SOA Microservices Very broad term, almost meaningless
  • 9. Monolith architecture “All architectural layers and all functionality in one single application.” Simple to: ● Develop ● Deploy ● Test … until it starts growing https://youtu.be/wgdBVIX9ifA?t=1089
  • 10. Let’s dive into details
  • 11. In theory ✘ Separate projects ✘ Identify seams ✘ Isolate wisely changing parts team-wise extra security, monitoring Key points: Splitting the Monolith In our project ✘ Logical split ✘ With scalability in mind ✘ Isolate external services ✘ several DBs
  • 12. Key points: Splitting the Monolith Summary ✘ Do you really need to split? ✘ Document API ✘ Use different solutions, even for same stack ✘ Avoid using shared logic “Don't even consider microservices unless you have a system that's too complex to manage as a monolith.”
  • 13. In theory ✘ Prefer REST via HTTP ✘ Facade services for 3rd-party API ✘ Unified log data & format ✘ Strangler pattern ✘ Tolerant readers Key points: Integration In our project ✘ Mostly HTTP, almost REST ✘ Gateway Service ✘ Tolerant readers (rest + json) ✘ DB Integration ✘ WCF (request-response, fire and forget)
  • 14. Key points: Integration Summary ✘ Better stick to HTTP with REST ✘ Integration tests for 3rd parties ✘ Avoid API versioning
  • 15. In theory ✘ Centralized logging ✘ Queryable log ✘ Unified log data & format Key points: Logging In our project ✘ Log from Cloud ✘ Simple Filtering ✘ Single format
  • 16. Key points: Logging Summary ✘ Always store source module of event ✘ Use Correlation ID ✘ Don’t reinvent the Tools for logs: LogStash, Kibana.
  • 17. In theory ✘ Blackbox tests of API ✘ Generating tests by documented API Key points: Testing In our project ✘ UnitTests ✘ Integration Tests ✘ PostMan ✘ WcfTestClient Summary ✘ Local debug environment (with faked boundaries) ✘ Simple test utility to test API
  • 18. In theory ✘ Single Sign-On ✘ Authorized Clients ✘ Authorized Services Key points: Security In our project ✘ Central identity & auth Servers ✘ Everything authorized ✘ Token in HTTP Header identity and auth info Summary ✘ HTTPS is a MUST ✘ Avoid sending auth info in token ✘ Don’t reinvent the
  • 19. In theory ✘ Single Sign-On ✘ Authorized Clients ✘ Authorized Services Key points: Security In our project ✘ Central identity & auth Servers ✘ Everything authorized ✘ Token in HTTP Header identity and auth info
  • 20. Key points: Security Summary ✘ HTTPS is a MUST ✘ Avoid sending auth info in token ✘ Don’t reinvent the
  • 21. In theory ✘ Cloud should help you ✘ If you help cloud Key points: Scaling In our project ✘ Almost all services support scaling ✘ Sync through tricks with MongoDB ✘ Cloud support of scaling
  • 22. Key points: Scaling Summary ✘ Microservice should be scalable ✘ Think about DB bottlenecks ✘ Think of data sync (DB, queues)
  • 23. In theory ✘ Independent service deployment ✘ ASAP ✘ Use Cloud or containers features Key points: Deployment In our project ✘ monolith deployment :( ✘ Independent patching possible ✘ Cloud doesn’t encourage auto deploy
  • 24. Key points: Deployment Summary ✘ Separate CI & CD jobs for each service ✘ Deployment strategy
  • 25. Our Learning path Our project Microservices onolythic pplication Service-oriented Architecture
  • 26. Monolith ✘ Simplicity ✘ Consistency ✘ Inter-module refactoring Monolyth vs Microservices Microservices ✘ Partial Deployment ✘ Availability ✘ Help preserve modularity ✘ Multiple Platforms (but please no JS) Remember my advices?
  • 28. What to Pick? What do we have? ✘ Rapid Host Provisioning ✘ Basic Monitoring ✘ Rapid App Deployment ✘ DevOps culture ... What do we need? Always consider ✘ Solution scale ✘ Teams configuration
  • 29. Virtualization Containerization & ● Running on few hosts ● Environment close to production ● Easy management (with Cloud) ● Running on dev host ● Environment close to virtual ● Easy trace ● Easy management (even without cloud)
  • 30. Containerization with .Net .Net stack usually requires Windows Containers usually require UNIX
  • 31. Sources 1. “Building Microservices” by Sam Newman 2. Enterprise Integration Patterns at camel.apache.org 3.Microservices by Martin Fowler a.Microservices Conf Video 4.https://www.nginx.com/solutions/microservices/ 5.Majestic Monolith by David Heinemeier Hansson 6.Our project source code and docs
  • 32. i.e.: ✘You’ve said… Can you explain… ? ✘What do you mean by …? ✘Have you tried …? ✘Can you suggest …? Questions?