Микросервисы как съесть слона. · 2019-05-21 · azure. docker. docker...

Post on 27-Jul-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Микросервисы: как съесть слона.DEVPRO, ТОМСК, 20.05.2017

Кто я?

Игорь Бычков

Softwareentwicklungsleiter

Löwenstein Medical Technology

Руководитель разработки, MCC Tomsk

igor.bychkov@mcc-tomsk.de

http://mcc-tomsk.de http://www.loewensteinmedical.de

Microservices?

DefinitionIn computing, microservices is a software architecture style, in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs.

These services are small, highly decoupled and focus on doing a small task.

https://en.wikipedia.org/wiki/Microservices

….. microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.

-- James Lewis and Martin Fowler

Definition

Small (?)Lightweight InterfacesIndependent DeployableAround business Capabilities

Monolith

Presentation

Data

Domain

DB

US1 US2

Any organization that

designs a system

(defined broadly) will

produce a design

whose structure is a

copy of the

organization's

communication

structure.

-- Melvyn Conway,

1967

Done!

Blocker

In progress

Scaling

https://martinfowler.com/articles/microservices.html

Example

Browser Mobile Device

Catalog Service Review Service Order Service

API Gateway

DB DB DB

Lighweight Interfaces

Service 1

Service 2

Service 1

Service 2

MQ

REST Messaging

AsyncSync

Principles of Microservices

%https://martinfowler.com/articles/microservices.html

• Services, not Libraries• Business Domains, not technologies• Products, not Projects • Deployed independently• Smart endpoints and dumb pipes• Decentralized everything• Automatization of everything• Design for failure• Evolutionary Design

Pros and ConsIndependent deployment

Parallel development

2-pizzas possible

Better code ownership

Technology/Platform diversity

Horizontal Scalability

PaaS

Operations Overhead

Automation Required

Implicit Interfaces

Eventual Consistency

Distributed System Complexity

Testing

Logging/Monitoring

Debugging

Why now?

https://martinfowler.com/articles/microservices.html

Infrastructure / OrchestrationLanguagesCloudTools

Our ExperienceDocker.NET CoreAzure

Docker

Docker

http://i1.wp.com/www.chinasmack.com/wp-content/uploads/2013/09/historical-shanghai-photos-early-20th-century-14.jpghttp://www.bbc.com/news/uk-england-suffolk-30700269

DemoHello World ASP.NET Core Web API

Linux on Windows

Pack and Run

Docker vs VM

http://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-normal-virtual-machine

MS loves Containers

DemoDocker for Windows

Images from MS

Nano/SQL Server

Docker Ecosystem

DemoVS 2017

MS Loves Containers

Important WordsDDD

REST – Swagger and Co.

Event Bus

CQRS

Event Sourcing

OAuth 2.0

Q and AСПАСИБО!

top related