Building Microservices With .NET Core
Building Microservices With .NET Core
Metrics /
Protocol Monitoring
Discovery
Elastic Scaling
Service Tracing
0 Downtime
Deploy
Security
Logging
Networking
What is a Microservice
A microservice is a discrete unit of functionality that adheres to the Single
Responsibility Principle, asks nothing* of its host, and can be deployed without
impacting other services in the ecosystem.
Request App
Reduce
Inventory
Update
Ledger
Distributed Failure via Microservices
Inventory
Service
Gateway/
Request Agg Product
Service Service
Ledger
Service
Immutable Events and Shared-Nothing Activity Modeling
Inv Reserved
Inv
InvReleased
Shipped
FACT STATE
API Order
REST/JSON Service Command
Order
Mgmt
Ledger
Inventory
● gRPC Services
● Pub/Sub Messaging
○ Kafka
Partial Foods
● Entity Framework Core 2.0
○ Postgres
● Eventual Consistency
Sample App Demo ● Modeling Activities instead of
& Distributed Transactions
Code Walkthrough ● Embrace Shared-Nothing
Recap / Lessons Learned
● Not all microservices are RESTful JSON services
○ Show gRPC some love
● Modeling entities and immutable, distributed activities can be a simple solution to a complex
problem
○ Event Sourcing and CQRS are for more than just Netflix
○ Get it working first, materialize your views later.
● .NET Core 2.0 is excellent, and ready for production.
○ 2.0 tooling is superb, 1.x … not so much
● Containerize your workloads
● Build cloud-first or cloud native
○ Kubernetes, Cloud Foundry, AWS, Azure, Google Cloud, etc.
○ 12/15 factors
● Microservices are an architectural pattern, NOT a framework/library
○ Nor are they a panacea
● Disappointed that Partial Foods doesn’t have a proper logo
Q&A
● Twitter @KevinHoffman
● Always available to chat
● Partial Foods Code
○ http://github.com/microservices-aspnetcore/partialfood-*
○ Requires Postgres, Zookeeper & Kafka, .NET Core 2.0
● Resources
○ grpc.io
○ https://kafka.apache.org/quickstart