SlideShare a Scribd company logo
GOING MICROSERVICES
WITH .NETDavid Revoledo
@deirevoledo
Contamos con el apoyo de:
About me !
David Revoledo | @deirevoledo
• Working with Microsoft technologies pretty much all my career.
• Speaker
• .Net, AzureTrainer and Consultant.
• Open Source active contributor (Azure event hub, service bus SDK’s
and a Few Plugins).
• Focused onAsp. NET Core / Azure
• Software Architect at DGENIX
19/12/2018
19/12/2018
Agenda
1. Microservices Introduction
2. Starting Microservices with .NET
3. Conclusion
4. Q&A
19/12/2018
19/12/2018
Microservices?
Let’s start saying is a very bad name.
• Serverless ?
• NoSQL ?
• Data Lake ?
19/12/2018
What is a Microservices Architecture?
“a microservices architecture as a service-oriented architecture
composed of loosely coupled elements that have bounded
contexts. “
?
19/12/2018
But what is the difference with a Layer/Tier (Coding)
Architecture
19/12/2018
What microservices are not
• When a solutions need to be deployed complete to provide a “new
version” of a product.
• When a component failing is causing a complete system failure.
19/12/2018
Microservices is “Multi Process Applications”
19/12/2018
Common characteristics
• Componentization via Services by Domain “bounded context”.
• Organized around business capabilities.
• Decentralized Data Management.
• Infrastructure Automation.
• Design for Failure.
• Aggressive monitoring.
19/12/2018
Benefits
• Allows to create pieces of software in loosely coupled services kind.
• Allow to release features/fixes continuously (better Time To Market)
• Allows to evolve the company technology stack.
• Allows to migrate a services changing nothing if the contract does not change.
• Because MS is built with failures in mind, we are building resilience.
• Because MS is built with automation in mind, we are saving time/money in the future.
• Because MS is built with monitoring in mind, we have a better control how what is happening.
• We don’t have to marry with a technology/framework (devs engagement)
• Let us built software with business first with a service scope instead of a technical layers.
19/12/2018
There ain't no such thing as a free lunch
• Inter Process Communication.
• Async Calling by Messaging.
• Eventual Consistency.
• Duplicated data.
• Process failures.
19/12/2018
CAP Theorem
19/12/2018
19/12/2018
Microservices Architecture Is Not a Silver Bullet
• As is not just a technical decision, it require a mindset change of the
complete team including the client.
• Business boundaries need to be identified.
• Is the solution being too simply, probably MS will bring more complexity
than flexibility.
• You need to be mature with Devops. Practices.
19/12/2018
Let’s start MS with NET
19/12/2018
Structure
• DDD / CRQS Microservices
• Messaging communication between services
• Api Gateway
• Retries.
• Containers.
19/12/2018
Api Gateway
• How do the clients of a Microservices-based application access the
individual services?
19/12/2018
19/12/2018
Api Gateway
• Coupling: Without the API Gateway pattern the client apps are coupled to the
internal microservices.
• Too many round-trips: A single page/screen in the client app might require
several calls to multiple services.
• Security issues: Without a gateway, all the microservices must be exposed to
the "external world“. The smaller is the attack surface, the more secure your
application can be.
• Cross-cutting concerns: Each publicly published microservice must handle
concerns such as authorization, SSL, etc. In many situations those concerns
could be handled in a single tier so the internal microservices are simplified.
19/12/2018
Use an API Gateway
REST
Product info service
REST
Recommendation service
AMQP
Review service
API
gateway
View Controller
Model
Traditional server-side
web application
View Controller
Model
Browser/native app
Single entry
point
Client
specific API Protocol
translation
19/12/2018
Variation: Backends for frontends
Web application
Mobile app
3rd party applications
Web app
API
gateway
Mobile API
gateway
Public API
gateway
REST
Catalog service
REST
Recommendation service
gRPC
Review service
19/12/2018
Ocelot Api Gateway
• Routing
• Request Aggregation
• Service Discovery with Consul &
Eureka
• Service Fabric
• WebSockets
• Authentication
• Authorization
• Rate Limiting
• Caching
• Retry policies / QoS
• Load Balancing
• Logging / Tracing / Correlation
• Headers / Query String / Claims
Transformation
• Custom Middleware / Delegating Handlers
• Configuration / Administration REST API
• Platform / Cloud Agnostic
• Etc.
19/12/2018
Ocelot ASP.NET Core configuration.
dotnet add package Ocelot
19/12/2018
Ocelot ASP.NET Core configuration.
19/12/2018
Ocelot Load balancing.
19/12/2018
Ocelot Auth.
19/12/2018
Ocelot Rate Limits.
19/12/2018
Ocelot
• Is a code level gateway useful also to run multiple services in a single
docker container image.
19/12/2018
Options.
For others features not supported by Ocelot or a better infrastructure
throughput consider infrastructure solutions like.
• Azure Application Gateway.
• Azure Api Management.
• Others
19/12/2018
Messaging between Microservices “Breaking RPC”
• Async communication between microservices
• Event driven design
• Easy to add a sub-action for an event/command without change the
communication in the producer
19/12/2018
Messaging in Microservices
The more nodes there are, more work load Messaging will improve
performance, resilience and resources usages.
• If there is a network outage / issue with the code with an RCP call the
operations will break down and client need to execute it again.
• With RPC, threads are allocated with load, the more nodes there are
more accumulated memory you have. (Gen2 Garbage collector problem).
• Instead of using threads and memory the work going through durable
disk saved messages.
19/12/2018
19/12/2018
Using RabbitMQ
19/12/2018
Using RabbitMQ
19/12/2018
Using Messaging
Using messages we are doing workload by an async call that is not waiting for the
response of an external process (RPC).
Using other Messaging providers like Azure Service Bus we have others features
Like:
• Automatic duplicated detection.
• Transactions.
• Pub/Sub scenarios.
• Sessions / Ordered messages.
19/12/2018
CQRS + DDD
• Not all microservices need same level of complexity but for those who are
not trivial, and the business is complex enough, CQRS + DDD is the perfect
combination
• DDD let us focus on bounded context, perfect to structure our
microservices
• CQRS let us divide Command and Event models, perfect to use messaging,
rcp calls.
19/12/2018
Drive Domain Design
• Being Aligned with the business’ model, strategies, and processes.
• Being isolated from other domains and layers in the business.
• A Common Set of Terms and Definitions Used by the Entire Team
• Keeping Track Is Made Easier
• Better Code
• Agility Is a Standard
• Get a Good Software Architecture
• Stay Focused on the Solution
• Purely Flexible
19/12/2018
MediatR
Is the most popular framework to implement domain events
implementations under CQRS fashion.
19/12/2018
MediatR
MediatR acting as an internal process message broker has two kinds of
messages it dispatches:
• Request/response messages, dispatched to a single handler
• Notification messages, dispatched to multiple handlers
19/12/2018
MediatR
• Request/response messages, dispatched to a single handler
19/12/2018
MediatR
• Notification messages, dispatched to multiple handlers
19/12/2018
MediatR Installing in ASP.NET Core
dotnet add package MediatR
dotnet add package MediatR.Extensions.Microsoft.DependencyInjection
19/12/2018
That’s it start using MediatR and IRequests Handler
19/12/2018
MediatR + Messaging
Combining MediatR + Async Messaging is an excellent choise
For an Event Driven solution that works with high throughput
for high Work Load without data lost in a microservices architecture.
19/12/2018
Retry Strategy
19/12/2018
Retry Strategy
As we can deal with multiple distributed nodes things can fail and WILL fail.
Retry is an important deal to consider in a Microservices architecture.
• Retry Pattern
• Circuit Breaker
• Exponential Retry.
19/12/2018
Polly
19/12/2018
Containers
Contrary to how VMs work, with Docker we don’t need to constantly set up
clean environments in the hopes of avoiding conflicts.
With Docker, we know that there will be no conflicts. Docker guarantees that
application microservices will run in their own environments that are
completely separate from the operating system.
Docker becomes the facto technology for applications containerization.
19/12/2018
Containers
Docker allow us to configure the environment of an app an include all the OS
dependencies and configuration insolated of the OS it runs.
With docker we can run containers dependencies for our nodes (Microservices)
create the whole environment where they run.
Also configure the required software like Databases, Rabbit, otc.
There are tons of images in Docker Hub
- Rabbit
- Redis
- SQL Server
19/12/2018
Docker ASP.NET Core Configuration.
Just a file
19/12/2018
Docker Visual Studio integration.
19/12/2018
19/12/2018
Docker Benefit
• Faster start time. A Docker container starts in a matter of seconds
because a container is just an operating system process. A VM with a
complete OS can take minutes to load.
• Faster deployment. There’s no need to set up a new environment; with
Docker, web development team members only need to download a Docker
image to run it on a different server.
• Easier management and scaling of containers, as you can destroy and run
containers faster than you can destroy and run virtual machines.
• Better usage of computing resources as you can run more containers than
virtual machines on a single server.
• Support for various operating systems: you can get Docker for Windows,
Mac, Debian, and other OSs.
19/12/2018
Conclusion.
Microservices is an evolution of SOA, actually is not something new.
It’s a more aggressive solution that require the complete team ready to
implement it. Implementing MS is not just a technical decision.
19/12/2018
Conclusion.
19/12/2018
Conclusion.
You Build it, Test it, Deploy it.
19/12/2018
More Information.
https://dotnet.microsoft.com/download/thank-you/microservices-architecture-ebook
¡MUCHAS GRACIAS!
Follow me:
@deirevoledo
davidrevoledo@d-genix.com

More Related Content

What's hot

Extending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud FoundryExtending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud Foundry
Kenny Bastani
 
Back your app with MySQL and Redis on Cloud Foundry
Back your app with MySQL and Redis on Cloud FoundryBack your app with MySQL and Redis on Cloud Foundry
Back your app with MySQL and Redis on Cloud Foundry
Kenny Bastani
 
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entitySpring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Toni Jara
 
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Kai Wähner
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
VMware Tanzu
 
Serverless Spring
Serverless SpringServerless Spring
Serverless Spring
VMware Tanzu
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Binary Studio
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung
 
Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
VMware Tanzu
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
Emily Jiang
 
Cloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud ServicesCloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud Services
Chris Sterling
 
Azure privatelink
Azure privatelinkAzure privatelink
Azure privatelink
Udaiappa Ramachandran
 
Microservices architecture overview v3
Microservices architecture overview v3Microservices architecture overview v3
Microservices architecture overview v3
Dmitry Skaredov
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
Ramnivas Laddad
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
VMware Tanzu
 
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at JavanturaHands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Jamie Coleman
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
Kelvin Yeung
 
CF SUMMIT: Partnerships, Business and Cloud Foundry
CF SUMMIT: Partnerships, Business and Cloud FoundryCF SUMMIT: Partnerships, Business and Cloud Foundry
CF SUMMIT: Partnerships, Business and Cloud Foundry
Nima Badiey
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
Anatole Tresch
 
Kasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsKasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applications
LibbySchulze
 

What's hot (20)

Extending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud FoundryExtending the Platform with Spring Boot and Cloud Foundry
Extending the Platform with Spring Boot and Cloud Foundry
 
Back your app with MySQL and Redis on Cloud Foundry
Back your app with MySQL and Redis on Cloud FoundryBack your app with MySQL and Redis on Cloud Foundry
Back your app with MySQL and Redis on Cloud Foundry
 
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entitySpring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
 
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
Microservices, Containers, Docker and a Cloud-Native Architecture in the Midd...
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
 
Serverless Spring
Serverless SpringServerless Spring
Serverless Spring
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
 
Cloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud ServicesCloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud Services
 
Azure privatelink
Azure privatelinkAzure privatelink
Azure privatelink
 
Microservices architecture overview v3
Microservices architecture overview v3Microservices architecture overview v3
Microservices architecture overview v3
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
 
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at JavanturaHands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
Hands-on cloud-native Java with MicroProfile, Kubernetes and Istio at Javantura
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
CF SUMMIT: Partnerships, Business and Cloud Foundry
CF SUMMIT: Partnerships, Business and Cloud FoundryCF SUMMIT: Partnerships, Business and Cloud Foundry
CF SUMMIT: Partnerships, Business and Cloud Foundry
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 
Kasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsKasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applications
 

Similar to Going MicroServices with Net

Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday
Walid Shaari
 
CCCNA17 Introduction
CCCNA17 IntroductionCCCNA17 Introduction
CCCNA17 Introduction
ShapeBlue
 
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS
 
Serverless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment OpportunitiesServerless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment Opportunities
Underscore VC
 
Major Cloud Platforms Players - Year 2015
Major Cloud Platforms Players - Year 2015Major Cloud Platforms Players - Year 2015
Major Cloud Platforms Players - Year 2015
Krishna-Kumar
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
UOS
 
Aws based digital_transformation_platform
Aws based digital_transformation_platformAws based digital_transformation_platform
Aws based digital_transformation_platform
Slobodan Sipcic
 
Tampere Docker meetup - Happy 5th Birthday Docker
Tampere Docker meetup - Happy 5th Birthday DockerTampere Docker meetup - Happy 5th Birthday Docker
Tampere Docker meetup - Happy 5th Birthday Docker
Sakari Hoisko
 
Docker12 factor
Docker12 factorDocker12 factor
Docker12 factor
John Zaccone
 
Docker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to DockerDocker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to Docker
Docker, Inc.
 
#dbhouseparty - Should I be building Microservices?
#dbhouseparty - Should I be building Microservices?#dbhouseparty - Should I be building Microservices?
#dbhouseparty - Should I be building Microservices?
Tammy Bednar
 
Microservices Patterns with GoldenGate
Microservices Patterns with GoldenGateMicroservices Patterns with GoldenGate
Microservices Patterns with GoldenGate
Jeffrey T. Pollock
 
[WSO2Con Asia 2018] Microservices, Containers, and Beyond
[WSO2Con Asia 2018] Microservices, Containers, and Beyond[WSO2Con Asia 2018] Microservices, Containers, and Beyond
[WSO2Con Asia 2018] Microservices, Containers, and Beyond
WSO2
 
Microservices, Containers, and Beyond
Microservices, Containers, and BeyondMicroservices, Containers, and Beyond
Microservices, Containers, and Beyond
Lakmal Warusawithana
 
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
LetsConnect
 
Building Cloud-Native Applications with a Container-Native SQL Database in th...
Building Cloud-Native Applications with a Container-Native SQL Database in th...Building Cloud-Native Applications with a Container-Native SQL Database in th...
Building Cloud-Native Applications with a Container-Native SQL Database in th...
NuoDB
 
Final_CloudEventFrankfurt2017 (1).pdf
Final_CloudEventFrankfurt2017 (1).pdfFinal_CloudEventFrankfurt2017 (1).pdf
Final_CloudEventFrankfurt2017 (1).pdf
MongoDB
 
Coud computing
Coud computingCoud computing
Coud computing
Benila Mendus
 
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Getting value from IoT, Integration and Data Analytics
 
Ravi namboori-cloud computing
Ravi namboori-cloud computingRavi namboori-cloud computing
Ravi namboori-cloud computing
ravi namboori
 

Similar to Going MicroServices with Net (20)

Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday
 
CCCNA17 Introduction
CCCNA17 IntroductionCCCNA17 Introduction
CCCNA17 Introduction
 
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
NUS-ISS Learning Day 2018- Designing software to make the most of cloud platf...
 
Serverless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment OpportunitiesServerless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment Opportunities
 
Major Cloud Platforms Players - Year 2015
Major Cloud Platforms Players - Year 2015Major Cloud Platforms Players - Year 2015
Major Cloud Platforms Players - Year 2015
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Aws based digital_transformation_platform
Aws based digital_transformation_platformAws based digital_transformation_platform
Aws based digital_transformation_platform
 
Tampere Docker meetup - Happy 5th Birthday Docker
Tampere Docker meetup - Happy 5th Birthday DockerTampere Docker meetup - Happy 5th Birthday Docker
Tampere Docker meetup - Happy 5th Birthday Docker
 
Docker12 factor
Docker12 factorDocker12 factor
Docker12 factor
 
Docker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to DockerDocker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to Docker
 
#dbhouseparty - Should I be building Microservices?
#dbhouseparty - Should I be building Microservices?#dbhouseparty - Should I be building Microservices?
#dbhouseparty - Should I be building Microservices?
 
Microservices Patterns with GoldenGate
Microservices Patterns with GoldenGateMicroservices Patterns with GoldenGate
Microservices Patterns with GoldenGate
 
[WSO2Con Asia 2018] Microservices, Containers, and Beyond
[WSO2Con Asia 2018] Microservices, Containers, and Beyond[WSO2Con Asia 2018] Microservices, Containers, and Beyond
[WSO2Con Asia 2018] Microservices, Containers, and Beyond
 
Microservices, Containers, and Beyond
Microservices, Containers, and BeyondMicroservices, Containers, and Beyond
Microservices, Containers, and Beyond
 
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
 
Building Cloud-Native Applications with a Container-Native SQL Database in th...
Building Cloud-Native Applications with a Container-Native SQL Database in th...Building Cloud-Native Applications with a Container-Native SQL Database in th...
Building Cloud-Native Applications with a Container-Native SQL Database in th...
 
Final_CloudEventFrankfurt2017 (1).pdf
Final_CloudEventFrankfurt2017 (1).pdfFinal_CloudEventFrankfurt2017 (1).pdf
Final_CloudEventFrankfurt2017 (1).pdf
 
Coud computing
Coud computingCoud computing
Coud computing
 
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
 
Ravi namboori-cloud computing
Ravi namboori-cloud computingRavi namboori-cloud computing
Ravi namboori-cloud computing
 

Recently uploaded

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

Going MicroServices with Net

  • 1. GOING MICROSERVICES WITH .NETDavid Revoledo @deirevoledo
  • 2. Contamos con el apoyo de:
  • 3. About me ! David Revoledo | @deirevoledo • Working with Microsoft technologies pretty much all my career. • Speaker • .Net, AzureTrainer and Consultant. • Open Source active contributor (Azure event hub, service bus SDK’s and a Few Plugins). • Focused onAsp. NET Core / Azure • Software Architect at DGENIX 19/12/2018
  • 4. 19/12/2018 Agenda 1. Microservices Introduction 2. Starting Microservices with .NET 3. Conclusion 4. Q&A
  • 6. 19/12/2018 Microservices? Let’s start saying is a very bad name. • Serverless ? • NoSQL ? • Data Lake ?
  • 7. 19/12/2018 What is a Microservices Architecture? “a microservices architecture as a service-oriented architecture composed of loosely coupled elements that have bounded contexts. “ ?
  • 8. 19/12/2018 But what is the difference with a Layer/Tier (Coding) Architecture
  • 9. 19/12/2018 What microservices are not • When a solutions need to be deployed complete to provide a “new version” of a product. • When a component failing is causing a complete system failure.
  • 10. 19/12/2018 Microservices is “Multi Process Applications”
  • 11. 19/12/2018 Common characteristics • Componentization via Services by Domain “bounded context”. • Organized around business capabilities. • Decentralized Data Management. • Infrastructure Automation. • Design for Failure. • Aggressive monitoring.
  • 12. 19/12/2018 Benefits • Allows to create pieces of software in loosely coupled services kind. • Allow to release features/fixes continuously (better Time To Market) • Allows to evolve the company technology stack. • Allows to migrate a services changing nothing if the contract does not change. • Because MS is built with failures in mind, we are building resilience. • Because MS is built with automation in mind, we are saving time/money in the future. • Because MS is built with monitoring in mind, we have a better control how what is happening. • We don’t have to marry with a technology/framework (devs engagement) • Let us built software with business first with a service scope instead of a technical layers.
  • 13. 19/12/2018 There ain't no such thing as a free lunch • Inter Process Communication. • Async Calling by Messaging. • Eventual Consistency. • Duplicated data. • Process failures.
  • 16. 19/12/2018 Microservices Architecture Is Not a Silver Bullet • As is not just a technical decision, it require a mindset change of the complete team including the client. • Business boundaries need to be identified. • Is the solution being too simply, probably MS will bring more complexity than flexibility. • You need to be mature with Devops. Practices.
  • 18. 19/12/2018 Structure • DDD / CRQS Microservices • Messaging communication between services • Api Gateway • Retries. • Containers.
  • 19. 19/12/2018 Api Gateway • How do the clients of a Microservices-based application access the individual services?
  • 21. 19/12/2018 Api Gateway • Coupling: Without the API Gateway pattern the client apps are coupled to the internal microservices. • Too many round-trips: A single page/screen in the client app might require several calls to multiple services. • Security issues: Without a gateway, all the microservices must be exposed to the "external world“. The smaller is the attack surface, the more secure your application can be. • Cross-cutting concerns: Each publicly published microservice must handle concerns such as authorization, SSL, etc. In many situations those concerns could be handled in a single tier so the internal microservices are simplified.
  • 22. 19/12/2018 Use an API Gateway REST Product info service REST Recommendation service AMQP Review service API gateway View Controller Model Traditional server-side web application View Controller Model Browser/native app Single entry point Client specific API Protocol translation
  • 23. 19/12/2018 Variation: Backends for frontends Web application Mobile app 3rd party applications Web app API gateway Mobile API gateway Public API gateway REST Catalog service REST Recommendation service gRPC Review service
  • 24. 19/12/2018 Ocelot Api Gateway • Routing • Request Aggregation • Service Discovery with Consul & Eureka • Service Fabric • WebSockets • Authentication • Authorization • Rate Limiting • Caching • Retry policies / QoS • Load Balancing • Logging / Tracing / Correlation • Headers / Query String / Claims Transformation • Custom Middleware / Delegating Handlers • Configuration / Administration REST API • Platform / Cloud Agnostic • Etc.
  • 25. 19/12/2018 Ocelot ASP.NET Core configuration. dotnet add package Ocelot
  • 30. 19/12/2018 Ocelot • Is a code level gateway useful also to run multiple services in a single docker container image.
  • 31. 19/12/2018 Options. For others features not supported by Ocelot or a better infrastructure throughput consider infrastructure solutions like. • Azure Application Gateway. • Azure Api Management. • Others
  • 32. 19/12/2018 Messaging between Microservices “Breaking RPC” • Async communication between microservices • Event driven design • Easy to add a sub-action for an event/command without change the communication in the producer
  • 33. 19/12/2018 Messaging in Microservices The more nodes there are, more work load Messaging will improve performance, resilience and resources usages. • If there is a network outage / issue with the code with an RCP call the operations will break down and client need to execute it again. • With RPC, threads are allocated with load, the more nodes there are more accumulated memory you have. (Gen2 Garbage collector problem). • Instead of using threads and memory the work going through durable disk saved messages.
  • 37. 19/12/2018 Using Messaging Using messages we are doing workload by an async call that is not waiting for the response of an external process (RPC). Using other Messaging providers like Azure Service Bus we have others features Like: • Automatic duplicated detection. • Transactions. • Pub/Sub scenarios. • Sessions / Ordered messages.
  • 38. 19/12/2018 CQRS + DDD • Not all microservices need same level of complexity but for those who are not trivial, and the business is complex enough, CQRS + DDD is the perfect combination • DDD let us focus on bounded context, perfect to structure our microservices • CQRS let us divide Command and Event models, perfect to use messaging, rcp calls.
  • 39. 19/12/2018 Drive Domain Design • Being Aligned with the business’ model, strategies, and processes. • Being isolated from other domains and layers in the business. • A Common Set of Terms and Definitions Used by the Entire Team • Keeping Track Is Made Easier • Better Code • Agility Is a Standard • Get a Good Software Architecture • Stay Focused on the Solution • Purely Flexible
  • 40. 19/12/2018 MediatR Is the most popular framework to implement domain events implementations under CQRS fashion.
  • 41. 19/12/2018 MediatR MediatR acting as an internal process message broker has two kinds of messages it dispatches: • Request/response messages, dispatched to a single handler • Notification messages, dispatched to multiple handlers
  • 42. 19/12/2018 MediatR • Request/response messages, dispatched to a single handler
  • 43. 19/12/2018 MediatR • Notification messages, dispatched to multiple handlers
  • 44. 19/12/2018 MediatR Installing in ASP.NET Core dotnet add package MediatR dotnet add package MediatR.Extensions.Microsoft.DependencyInjection
  • 45. 19/12/2018 That’s it start using MediatR and IRequests Handler
  • 46. 19/12/2018 MediatR + Messaging Combining MediatR + Async Messaging is an excellent choise For an Event Driven solution that works with high throughput for high Work Load without data lost in a microservices architecture.
  • 48. 19/12/2018 Retry Strategy As we can deal with multiple distributed nodes things can fail and WILL fail. Retry is an important deal to consider in a Microservices architecture. • Retry Pattern • Circuit Breaker • Exponential Retry.
  • 50. 19/12/2018 Containers Contrary to how VMs work, with Docker we don’t need to constantly set up clean environments in the hopes of avoiding conflicts. With Docker, we know that there will be no conflicts. Docker guarantees that application microservices will run in their own environments that are completely separate from the operating system. Docker becomes the facto technology for applications containerization.
  • 51. 19/12/2018 Containers Docker allow us to configure the environment of an app an include all the OS dependencies and configuration insolated of the OS it runs. With docker we can run containers dependencies for our nodes (Microservices) create the whole environment where they run. Also configure the required software like Databases, Rabbit, otc. There are tons of images in Docker Hub - Rabbit - Redis - SQL Server
  • 52. 19/12/2018 Docker ASP.NET Core Configuration. Just a file
  • 55. 19/12/2018 Docker Benefit • Faster start time. A Docker container starts in a matter of seconds because a container is just an operating system process. A VM with a complete OS can take minutes to load. • Faster deployment. There’s no need to set up a new environment; with Docker, web development team members only need to download a Docker image to run it on a different server. • Easier management and scaling of containers, as you can destroy and run containers faster than you can destroy and run virtual machines. • Better usage of computing resources as you can run more containers than virtual machines on a single server. • Support for various operating systems: you can get Docker for Windows, Mac, Debian, and other OSs.
  • 56. 19/12/2018 Conclusion. Microservices is an evolution of SOA, actually is not something new. It’s a more aggressive solution that require the complete team ready to implement it. Implementing MS is not just a technical decision.