Микросервисы как съесть слона. · 2019-05-21 · azure. docker. docker...
TRANSCRIPT
![Page 1: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/1.jpg)
Микросервисы: как съесть слона.DEVPRO, ТОМСК, 20.05.2017
![Page 2: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/2.jpg)
Кто я?
Игорь Бычков
Softwareentwicklungsleiter
Löwenstein Medical Technology
Руководитель разработки, MCC Tomsk
![Page 3: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/3.jpg)
http://mcc-tomsk.de http://www.loewensteinmedical.de
![Page 4: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/4.jpg)
![Page 5: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/5.jpg)
Microservices?
![Page 6: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/6.jpg)
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
![Page 7: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/7.jpg)
Definition
Small (?)Lightweight InterfacesIndependent DeployableAround business Capabilities
![Page 8: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/8.jpg)
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
![Page 9: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/9.jpg)
Scaling
https://martinfowler.com/articles/microservices.html
![Page 10: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/10.jpg)
Example
Browser Mobile Device
Catalog Service Review Service Order Service
API Gateway
DB DB DB
![Page 11: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/11.jpg)
Lighweight Interfaces
Service 1
Service 2
Service 1
Service 2
MQ
REST Messaging
AsyncSync
![Page 12: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/12.jpg)
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
![Page 13: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/13.jpg)
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
![Page 14: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/14.jpg)
Why now?
https://martinfowler.com/articles/microservices.html
Infrastructure / OrchestrationLanguagesCloudTools
Our ExperienceDocker.NET CoreAzure
![Page 15: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/15.jpg)
Docker
![Page 16: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/16.jpg)
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
![Page 17: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/17.jpg)
DemoHello World ASP.NET Core Web API
Linux on Windows
Pack and Run
![Page 18: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/18.jpg)
Docker vs VM
http://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-normal-virtual-machine
![Page 19: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/19.jpg)
MS loves Containers
![Page 20: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/20.jpg)
DemoDocker for Windows
Images from MS
Nano/SQL Server
![Page 21: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/21.jpg)
Docker Ecosystem
![Page 22: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/22.jpg)
DemoVS 2017
![Page 23: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/23.jpg)
MS Loves Containers
![Page 24: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/24.jpg)
Important WordsDDD
REST – Swagger and Co.
Event Bus
CQRS
Event Sourcing
OAuth 2.0
![Page 25: Микросервисы как съесть слона. · 2019-05-21 · Azure. Docker. Docker ... Images from MS Nano/SQL Server. Docker Ecosystem. Demo VS 2017. MS Loves Containers](https://reader034.vdocuments.mx/reader034/viewer/2022043000/5f774800a9ab0f0a5a613caa/html5/thumbnails/25.jpg)
Q and AСПАСИБО!