万本电子书0元读

万本电子书0元读

顶部广告

Building Microservices with .NET Core电子书

售       价:¥

12人正在读 | 0人评论 9.8

作       者:Gaurav Kumar Aroraa,Lalit Kale,Kanwar Manish

出  版  社:Packt Publishing

出版时间:2017-07-07

字       数:34.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Architect your .NET applications by breaking them into really small pieces—microservices—using this practical, example-based guide About This Book ? Start your microservices journey and understand a broader perspective of microservices development ? Build, deploy, and test microservices using ASP.Net MVC, Web API, and Microsoft Azure Cloud ? Get started with reactive microservices and understand the fundamentals behind it Who This Book Is For This book is for .NET Core developers who want to learn and understand microservices architecture and implement it in their .NET Core applications. It’s ideal for developers who are completely new to microservices or have just a theoretical understanding of this architectural approach and want to gain a practical perspective in order to better manage application complexity. What You Will Learn ? Compare microservices with monolithic applications and SOA ? Identify the appropriate service boundaries by mapping them to the relevant bounded contexts ? Define the service interface and implement the APIs using ASP.NET Web API ? Integrate the services via synchronous and asynchronous mechanisms ? Implement microservices security using Azure Active Directory, OpenID Connect, and OAuth 2.0 ? Understand the operations and scaling of microservices in .NET Core ? Understand the testing pyramid and implement consumer-driven contract using pact net core ? Understand what the key features of reactive microservices are and implement them using reactive extension In Detail Microservices is an architectural style that promotes the development of complex applications as a suite of small services based on business capabilities. This book will help you identify the appropriate service boundaries within the business. We'll start by looking at what microservices are, and what the main characteristics are. Moving forward, you will be introduced to real-life application scenarios, and after assessing the current issues, we will begin the journey of transforming this application by splitting it into a suite of microservices. You will identify the service boundaries, split the application into multiple microservices, and define the service contracts. You will find out how to configure, deploy, and monitor microservices, and configure scaling to allow the application to quickly adapt to increased demand in the future. With an introduction to the reactive microservices, you strategically gain further value to keep your code base simple, focusing on what is more important rather than the messy asynchronous calls. Style and approach This guide serves as a stepping stone that helps .NET Core developers in their microservices architecture. This book provides just enough theory to understand the concepts and apply the examples.
目录展开

Title Page

Copyright

Credits

Foreword

About the Authors

About the Reviewers

www.PacktPub.com

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

What Are Microservices?

Origin of microservices

Discussing microservices

Monolithic architecture

Service-oriented architecture

What is service?

Understanding the microservice architecture

Messaging in microservices

Synchronous messaging

Asynchronous messaging

Message formats

Why should we use microservices?

How does the microservice architecture work?

Advantages of microservices

SOA versus microservices

Prerequisites of the microservice architecture

Understanding problems with the monolithic architecture style

Challenges in standardizing a .NET stack

Fault tolerance

Scaling

Vertical scaling or scale up

Horizontal scaling or scale out

Deployment challenges

Organizational alignment

Modularity

Big database

Prerequisites for microservices

Functional overview of the application

Solutions for current challenges

Handling deployment problems

Making much better monolithic applications

Introducing dependency injections

Database refactoring

Database sharding and partitioning

DevOps culture

Automation

Testing

Versioning

Deployment

Identifying decomposition candidates within monolithic

Important microservices advantages

Technology independence

Interdependency removal

Alignment with business goals

Cost benefits

Easy scalability

Security

Data management

Integrating monolithic

Summary

Building Microservices

Size of microservices

What makes a good service?

DDD and its importance for microservices

Domain model design

Importance for microservices

The concept of Seam

Module interdependency

Technology

Team structure

Database

Master data

Transaction

Communication between microservices

Benefits of the API gateway for microservices

API gateway versus API management

Revisiting the case study--Flix One

Prerequisites

Transitioning to our product service

Migrations

Code migration

Creating our project

Adding the model

Adding a repository

Registering the repositories

Adding a product controller

The ProductService API

Adding EF core support

EF Core DbContext

EF Core migrations

Database migration

Revisiting repositories and the controller

Introducing ViewModel

Revisiting the product controller

Summary

Integration Techniques

Communication between services

Styles of collaborations

Integration patterns

The API gateway

The event-driven pattern

Event sourcing

Eventual consistency

Compensating Transaction

Competing Consumers

Azure Service Bus queues

Implementation of an Azure Service Bus queue

Prerequisites

Sending messages to the queue

Receiving messages from the queue

Summary

Testing Strategies

How to test microservices

Handling challenges

Testing strategies (testing approach)

Testing pyramid

Types of microservice tests

Unit testing

Component (service) testing

Integration testing

Contract testing

Consumer-driven contracts

How to implement a consumer-driven test

How Pact-net-core helps us achieve our goal

Performance testing

End-to-end (UI/functional) testing

Sociable versus isolated unit tests

Stubs and mocks

Tests in action

Getting ready with the test project

Unit tests

Integration tests

Summary

Deployment

Monolithic application deployment challenges

Understanding the deployment terminology

Prerequisites for successful microservice deployments

Isolation requirements for microservice deployment

Need for a new deployment paradigm

Containers

What are containers?

Suitability of containers over virtual machines

Transformation of the operation team's mindset

Containers are new binaries

It works on your machine? Let's ship your machine!

Docker quick introduction

Microservice deployment with Docker overview

Microservice deployment example using Docker

Setting up Docker on your machine

Creating an ASP.NET web application

Adding Docker Support

Summary

Security

Security in monolithic applications

Security in microservices

Why traditional .NET auth mechanism won't work?

JSON Web Tokens

What is OAuth 2.0?

What is OpenID Connect?

Azure Active Directory

Microservice Auth example with OpenID Connect, OAuth 2.0, and Azure AD

Step 1 - Registration of TodoListService and TodoListWebApp with Azure AD tenant

Step 2 - Generation of AppKey for TodoListWebApp

Step 3 - Configuring Visual Studio solution projects

Step 4 - Generate client certificates on IIS Express

Step 5 - Run both the applications

Azure API management as an API gateway

Container security

Other security best practices

Summary

Monitoring

Instrumentation and telemetry

Instrumentation

Telemetry

The need for monitoring

Health monitoring

Availability monitoring

Performance monitoring

Security monitoring

SLA monitoring

Auditing sensitive data and critical business transactions

End user monitoring

Troubleshooting system failures

Monitoring challenges

Monitoring strategies

Logging

Logging challenges

Logging strategies

Centralized logging

Use of a correlation ID in logging

Semantic logging

Monitoring in Azure Cloud

Microsoft Azure Diagnostics

Storing diagnostic data using Azure storage

Using Azure portal

Specifying a storage account

Azure storage schema for diagnostic data

Introduction of Application Insights

Other microservice monitoring solutions

A brief overview of the ELK stack

Elasticsearch

Logstash

Kibana

Splunk

Alerting

Reporting

Summary

Scaling

Scalability overview

Scaling infrastructure

Vertical scaling (scaling up)

Horizontal scaling (scaling out)

Microservices scalability

Scale Cube model of scalability

X-axis scaling

Z-axis scaling

Y-axis scaling

Characteristics of a scalable microservice

Scaling the infrastructure

Scaling virtual machines using scale sets

Auto Scaling

Container scaling using Docker swarm

Scaling service design

Data persistence model design

Caching mechanism

Redundancy and fault tolerance

Circuit breakers

Service discovery

Summary

Reactive Microservices

What are reactive microservices?

Responsiveness

Resilience

Autonomous

Being message-driven

Making it reactive

Event communication

Security

Message-level security

Scalability

Communication resilience

Managing data

The microservice ecosystem

Reactive microservices - coding it down

Creating the project

Client - coding it down

Summary

Creating a Complete Microservice Solution

Architectures before microservices

The monolithic architecture

Challenges in standardizing the .NET stack

Scaling

Service-oriented architecture

Microservice-styled architecture

Messaging in microservices

Monolith transitioning

Integration techniques

Deployment

Testing microservices

Security

Monitoring

Monitoring challenges

Scale

Component lifespan

Information visualization

Monitoring strategies

Scalability

Infrastructure scaling

Service design

Reactive microservices

Greenfield application

Scoping our services

The book-listing microservice

The book-searching microservice

The shopping cart microservice

The order microservice

User authentication

Synchronous versus asynchronous

The book catalog microservice

The shopping cart microservice

The order microservice

The user auth microservice

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部