WIFI
PGS Guest
pgswelcome
Lead Engineer @ Just Eat
Wroclaw <3
explore 'microservices'
practical monolith -> distributed
distributed data
pros / cons
scalability / availability
any other expectations?
Why microservices
First microservice
Introduction to Monolith
Evolution to microservice based architecture
QA / Discussion
git clone git@github.com:mfranc-workshop/wroclaw-pgs-08072017.git
docker pull
microsoft/dotnet
unix - rabbitmq:3-management
win - micdenny/rabbitmq-windows
httpie
windows - https://goo.gl/berTLb
unix - https://httpie.org/#installation
SOA
Microservices
https://setandbma.files.wordpress.com/2012/05/technology-adoption.png
here
https://www.nginx.com/blog/introduction-to-microservices/
https://www.nginx.com/blog/introduction-to-microservices/
dotnet new micro-basic --name micro-email -o micro-email
http POST localhost:5000/email emailAddress=lam.michal.franc@gmail.com message=test -v
RabbitMQ
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
test -> http://localhost:15672/ | guest / guest
<Check Transfer>
<Transfer Received>
dotnet new -i micro-job-rabbit
dotnet new micro-job-rabbit -o micro-transfer --name micro-transfer
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
<ItemGroup> <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" /> </ItemGroup>
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
Read Model
Master
DB
Replay
Messages
Master
DB
Read Model
Read
Model
Read Model
Event
Store
docker build
docker build -t workshop/micro-mail .
docker build -t workshop/micro-shop .
docker build -t workshop/micro-transfer .
docker ps -a docker history docker images docker stop / start docker check logs docker exec -it
docker run --name micro-email -d -p 5001:5001 workshop/micro-email 5001
docker run --link micro-email:email -d -p 5000:5000 --name micro-shop workshop/micro-shop 500