microservices with the playframework
TRANSCRIPT
Microservices with the PlayFrameworkDominik [email protected]
www.playframework.wien
Dominik Dorn
Freelance Software Engineer & “Dev-Lead”
Java 8 & Scala enthusiast
PlayFramework lover
Akka delivery guy
@domdorn
Agenda
What’s a Microservice again?
Microservices with the PlayFramework
Manual, “Controller First” & “API First”
Bonus: Helpful utilities / projects
Bonus: Deployments with Docker, CI / CD
What’s a Microservice again?In essence, just a very “small” application.
Single Responsibility Principle: Does one thing well
Usually exports a “service” through some well defined way aka. “Interface”
Small enough, to be thrown away and replaced within a week or two
Microservices with the PlayFramework
We’ll export a Swagger Specification (Open API) for Clients
Manually create an App
Create a Swagger-Definition from Controllers
API First: Create code from the Spec
Demo API First: Code from Swagger
https://github.com/zalando/api-first-hand
BonusHelpful utilities / projects
Swagger Editor: http://editor.swagger.io/
guardian-management-play: https://github.com/guardian/guardian-management-play
guardian/frontend
Play-Parseq
DockerDon’t create a Play-PID File
Log only to STDOUT & Kibana (not to files)
Don’t write anything to files (except on mounted volumes)
reboot: true
Docker-Compose-Repo + CI-Server + SSH => CD