the microservices world in. net core and. net framework

32
.NET Conf Learn. Imagine. Build. .NET Conf The Microservices world in. NET Core and. NET Framework Massimo Bonanni [email protected] @massimobonanni

Upload: massimo-bonanni

Post on 28-Jan-2018

124 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: The Microservices world in. NET Core and. NET framework

.NET Conf

Learn. Imagine. Build.

.NET Conf

The Microservices world in. NET Core and. NET Framework

Massimo Bonanni

[email protected]

@massimobonanni

Page 2: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 3: The Microservices world in. NET Core and. NET framework

.NET Conf

Microservices Architecture

Page 4: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 5: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 6: The Microservices world in. NET Core and. NET framework

.NET Conf

Traditional application approach Microservices application approach

• A microservice application

segregates functionality into

separate smaller services.

• Scales out by deploying each

service independently with

multiple instances across

servers/VMs

• A traditional application has

most of its functionality within a

few processes that are

componentized with layers and

libraries.

• Scales by cloning the app on

multiple servers/VMs

App 1 App 2App 1

Page 7: The Microservices world in. NET Core and. NET framework

.NET Conf

Stateless services

with

separate stores

• Single monolithic database

• Tiers of specific technologies

Data in Traditional approach Data in Microservices approach

• Graph of interconnected microservices

• State typically scoped to the microservice

• Remote Storage for cold data

Stateful

services

Web presentation

services

Stateless

services

SQL DB

or

No-SQL

Mobile

apps

Web Tier

Services Tier

Data Tier

Monolithic Databases are shared across services.

Each microservice owns its model/data!

SQL

[…]

Database servers are usually the bottleneck

Cache Tier

Cache doesn’t help much for massive data

ingress (Events, IoT, etc.)

Page 8: The Microservices world in. NET Core and. NET framework

.NET Conf

Is a unit of deploy

that can be

independently

versioned, deployed

and scaled

Has a unique name

that can be resolved

Interacts with other

microservices over

well defined interfaces

and protocols like

REST

Remains always

logically consistent in

the presence of

failures

Hosted inside a

container

Developed by a small

engineering team

Page 9: The Microservices world in. NET Core and. NET framework

.NET Conf

Microservices, Docker & .NET

Page 10: The Microservices world in. NET Core and. NET framework

.NET Conf

Official Docker Imageshttps://hub.docker.com

or

Cluster of

Nodes/Hosts

VM

App 1 App 2 My Docker Images

Page 11: The Microservices world in. NET Core and. NET framework

.NET Conf

https://docs.docker.com/swarm/overview/

Page 12: The Microservices world in. NET Core and. NET framework

.NET Conf

https://mesosphere.com/product/

Page 13: The Microservices world in. NET Core and. NET framework

.NET Conf

https://kubernetes.io/

Page 14: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 15: The Microservices world in. NET Core and. NET framework

.NET Conf

Service Fabric

Page 16: The Microservices world in. NET Core and. NET framework

.NET Conf

Azure Other CloudsOn-Premise

Data centersDev Box

Service Fabric on

Linux in Azure

Preview

Service Fabric for

Linux

Coming 2017

Service Fabric

Windows SDK

Available

Service Fabric on

Windows in Azure

Available

Service Fabric in

Azure Stack GA

Coming 2017

Service Fabric for

Windows Server

Available

Service Fabric on

Linux in Azure

Available

Page 17: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 18: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 19: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 20: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 21: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 22: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 23: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 24: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 25: The Microservices world in. NET Core and. NET framework

.NET Conf

60bn events/day

Page 26: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 27: The Microservices world in. NET Core and. NET framework

.NET Conf

Orchestrator Description Good for Common

workloads

Azure Service Fabric is a distributed

systems platform that makes it easy

to package, deploy, and manage

scalable and reliable microservices

a) Stateful svc & Actors

b) Microservices based

on plain processes

c) Microservices based

on containers

Docker Swarm is a clustering and

scheduling tool for Docker containers.

With Swarm, IT administrators and

developers can establish and manage

a cluster of Docker nodes as a single

virtual system

Microservices based on

containers

Kubernetes is an open-source platform

for automating deployment, scaling,

and operations of application

containers across clusters of hosts

Microservices based on

containers

As a datacenter operating system,

DC/OS is itself a distributed system, a

cluster manager and a container

platform

Microservices based on

containers (Including other

Linux containers, not just

Docker)

More mature:

Less mature:

More mature:

Less mature:

More mature:

Less mature:

Azure Product

Azure Service Fabric

Azure Container Service Docker Swarm

Service FabricProduction-ready &

Microsoft ecosystem

Mesosphere DC/OS

More mature:

Less mature:

Production-ready &

Linux ecosystem

Easy to get started

Dev/Test and Production

Kubernetes

Production-ready &

Linux ecosystem

Page 28: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 29: The Microservices world in. NET Core and. NET framework

.NET Conf

aka.ms/MicroservicesEbook aka.ms/MicroservicesArchitecture

Additional subjects covered in the eBook

Domain Driven Design Patterns• Domain Models (Aggregates, Entity, VO, etc.)• Simplified CQRS

• Dapper MicroORM for queries• Commands and Mediator patter

• Domain Events (within the same microservice)

Microservices• Integration Events (across microservices)• Multi-container docker-compose.yml• Swagger w/ Swashbuckle• Security (Authentication/Authorization) with

tokens from IdentityServer4 wrapping ASP.NET Identity

Page 30: The Microservices world in. NET Core and. NET framework

.NET Conf

dot.net/architecture

Page 31: The Microservices world in. NET Core and. NET framework

.NET Conf

Page 32: The Microservices world in. NET Core and. NET framework