Microservices in .NET Core
β Scribed by Christian Horsdal Gammelgaard
- Publisher
- Manning Publications
- Year
- 2020
- Tongue
- English
- Leaves
- 197
- Edition
- 2 (MEAP Version 4)
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Table of Contents
Microservices in .NET Core, Second Edition MEAP V04
Copyright
Welcome
Brief contents
Chapter 1: Microservices at a glance
1.1 What is a microservice?
1.2 What is a microservices architecture?
1.2.1 Microservice characteristics
1.3 Why microservices?
1.3.1 Enabling continuous delivery
1.3.2 High level of maintainability
1.3.3 Robust and scalable
1.4 Costs and downsides of microservices
1.5 Greenfield vs. brownfield
1.6 Code reuse
1.7 Serving a user request: an example of how microservices work in concert
1.7.1 Main handling of the user request
1.7.2 Side effects of the user request
1.7.3 The complete picture
1.8 A .NET microservices technology stack
1.8.1 ASP.NET Core and MVC Core
1.8.2 Kubernetes
1.8.3 Setting up a development environment
1.9 A simple microservices example
1.9.1 Creating an empty ASP.NET Core application
1.9.2 Adding MVC Core to the project
1.9.3 Adding an MVC controller with an implementation of the endpoint
1.10 Summary
Chapter 2: A basic shopping cart microservice
2.1 Overview of the Shopping Cart microservice
2.1.1 Components of the Shopping Cart microservice
2.2 Implementing the Shopping Cart microservice
2.2.1 Creating an empty project
2.2.2 The Shopping Cart microserviceβs API for other services
2.2.3 Fetching product information
2.2.4 Parsing the product response
2.2.5 Adding a failure-handling policy
2.2.6 Implementing a basic event feed
2.3 Running the code
2.4 Summary
Chapter 3: Deploying a microservice to Kubernetes
3.1 Choosing a production environment
3.2 Putting the shopping cart microservice in a container
3.2.1 Add a Dockerfile to the Shopping Cart microservice
3.2.2 Build and run the shopping cart container
3.3 Running the shopping cart container in Kubernetes
3.3.1 Set up Kubernetes localhost
3.3.2 Create Kubernetes deployment for the shopping cart
3.4 Running the shopping cart container in Azure Kubernetes Service
3.4.1 Set up AKS
3.4.2 Run the shopping cart in AKS
3.5 Summary
Chapter 4: Identifying and scoping microservices
4.1 The primary driver for scoping microservices: business capabilities
4.1.1 What is a business capability?
4.1.2 Identifying business capabilities
4.1.3 Example: point-of-sale system
4.2 The secondary driver for scoping microservices: supporting technical capabilities
4.2.1 What is a technical capability?
4.2.2 Examples of supporting technical capabilities
4.2.3 Identifying technical capabilities
4.3 The tertiary driver for scoping microservices: supporting efficiency of work
4.4 What to do when the correct scope isnβt clear
4.4.1 Starting a bit bigger
4.4.2 Carving out new microservices from existing microservices
4.4.3 Planning to carve out new microservices later
4.5 Well-scoped microservices adhere to the microservice characteristics
4.5.1 Primarily scoping to business capabilities leads to good microservices
4.5.2 Secondarily scoping to supporting technical capabilities leads to good microservices
4.5.3 Tertiarily scoping to support efficiency of work
4.6 Summary
Chapter 5: Microservice collaboration
5.1 Types of collaboration: commands, queries, and events
5.1.1 Commands and queries: synchronous collaboration
5.1.2 Events: asynchronous collaboration
5.1.3 Data formats
5.2 Implementing collaboration
5.2.1 Setting up a project for Loyalty Program
5.2.2 Implementing commands and queries
5.2.3 Implementing commands with HTTP POST or PUT
5.2.4 Implementing queries with HTTP GET
5.2.5 Implementing an event-based collaboration
5.2.6 Deploying to Kubernetes
5.2.7 Building a Docker container Special Offers microservice ====
5.2.8 Building a Docker container for both parts of Loyalty Program ====
5.2.9 Deploy the LoyalProgram API and the Special Offers ====
5.2.10 Deploy EventConsumer ====
5.3 Summary
Chapter 6: Data ownership and data storage
6.1 Each microservice has a data store
6.2 Partitioning data between microservices
6.2.1 Rule 1: Ownership of data follows business capabilities
6.2.2 Rule 2: Replicate for speed and robustness
6.2.3 Where does a microservice store its data?
6.3 Implementing data storage in a microservice
6.3.1 Preparing a development setup
6.3.2 Storing data owned by a microservice
6.3.3 Storing events raised by a microservice
6.3.4 Setting cache headers in HTTP responses
6.3.5 Reading and using cache headers
6.4 Summary
Chapter 7: Designing for robustness
7.1 Expect failures
7.1.1 Keeping good logs
7.1.2 Using correlation tokens
7.1.3 Rolling forward vs. rolling back
7.1.4 Donβt propagate failures
7.2 The client sideβs responsibility for robustness
7.2.1 Robustness pattern: retry
7.2.2 Robustness pattern: circuit breaker
7.3 Implementing robustness patterns
7.3.1 Implementing a fast-paced retry strategy with Polly
7.3.2 Implementing a circuit breaker with Polly
7.3.3 Implementing a slow-paced retry strategy
7.3.4 Logging all unhandled exceptions
7.3.5 Deploying to Kubernetes
7.4 Summary
π SIMILAR VOLUMES
Microservices are responsible for very tightly focused capabilities that are part of a more complex server-side software system. Microservices, when done well, are malleable, scalable, resilient, and allow a short lead time from start of implementation to deployment to production. When using microse
<p><span>Learn to be deliberate and intentional in your design, technology, and pattern choices when developing an application using a microservices architecture.</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Tackle common design problems when developing a microservices application
<p><b>Architect your .NET applications by breaking them into really small pieces—microservices—using this practical, example-based guide</b><p><b>About This Book</b><p><li>Start your microservices journey and understand a broader perspective of microservices development<li>Build, deploy,
<p>At a time when nearly every vertical, regardless of domain, seems to need software running in the cloud to make money, microservices provide the agility and drastically reduced time to market you require. This hands-on guide shows you how to create, test, compile, and deploy microservices, using