SlideShare a Scribd company logo
Building a µservice
with Kotlin,
Micronaut & GCP
Aboutme
Robert
He/Him
Steward of DevConf & Developer User Group
Tech Lead at Equal Experts
DevConf
Full day conference
Swag, 5 tracks, international speakers
You and 800 of your new best friends
www.DevConf.co.za
Agenda
Retrospective
Lets build a µService together
What about that Google secret sauce?
Wherearewe?
Problem: Large retailer who needs to modernize
On prem -> Cloud
Single system -> microservices
Ownership through DevOps and Feature Teams
Platformteam
Builds out common guidance and tooling
Alignment is optional but recommended
• GCP
• K8s & Docker
• Base K8s design which includes normalisation
• JVM stack
Ourchoices?
Language = Kotlin
Framework = Micronaut
WhatisMicronaut?
Welcome
New… like 2018 new
From the fine people who brought you Grails
Embrace the world of 2019
• Use modern JVM features & memory management
• Build a framework for what we build today
• Steal from everyone
Fastisrelative
Fast != Better
Better is also relative
Fast shouldn’t be your only consideration
Fast enough is a good goal to have
What are you trading off…
Coldstart
Goals
Reflection
API Controller
GET /cart
Get list of methods
Do some loops and lookups
…
Profit
Takes time
Aheadoftime
API Controller
GET /cart
Get list of methods
Do some loops and lookups
…
Profit
Compiler
does this
now
Butwhatelse?
Amazing Dependency Injection
Everything you need to build modern services “in-
the-box”, most enabled with a one-line
build.gradle change
Reasonable initial configs
Let’s build a µservice
Go!
Thedemoisalie
I never did mn create-controller in real life
We did everything in an interface
Complaints
HTTP Client
“magic”
Randomness in documentation quality
Wins
Pit of success
StackDriver Output
Prometheus
All the things everyone else has is here
Filters & Interceptors
The escape hatches are awesome
Database?
DataStore
Key/val
Want to work with objects – screw these strings
Objectify
Objectify
Wins/Losses/Lies?
Separate project to hide all the logic
• Makes micronaut DI annoying
Great that I do not need to worry about strings
Great that I can choose async or sync
GettingtoGCP
Gateway
cart.shop.comproducts.beta.shop
.com
cart.beta.shop.com
pod pod
pod pod
pod pod
pod pod
Docker,k8s…ohmy
IwanttoKotlin
Jib
Lies?
This is a build thing for us (GitLab)
Scanning all the items
Wins?
Maven, Gradle & JibCore
Oddsandends?
Testing thoughts
• Run all tests all the time
• Mock sparingly (Mockk & Wirework)
clikt is amazeballs
Wrapup
Micronaut has served us well
• Future proof & easy to work with
• Do not jump to it, solutions like Micronaut for
Spring
Thanks to Jib, now you too can be a SRE
Thanks
www.sadev.co.za

More Related Content

What's hot (20)

PPTX
Introduction to git and Github
Wycliff1
 
PPTX
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Aysylu Greenberg
 
PPTX
Git
letourneauacm
 
PDF
GitHub Actions with Node.js
Stefan Stölzle
 
PPTX
Git Going w/ Git
heyMP
 
PPTX
GitHub Actions demo with mabl
Bertold Kolics
 
PDF
Implementing a command line client to GitHub in Go
Owen Ou
 
PPTX
GitHub Actions - Melbourne UG
Natraj Yegnaraman
 
PDF
Cloud Spin - building a photo booth with the Google Cloud Platform
Bret McGowen - NYC Google Developer Advocate
 
PPTX
CI/CD with GitHub Actions
Swaminathan Vetri
 
PPTX
Up GitLab Presentation 2015
Kumaran Balachandran
 
PPTX
Git n git hub
Jiwon Baek
 
PDF
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
inovex GmbH
 
PPTX
Github in Action
Morten Christensen
 
PPTX
Quick workflow of a nodejs api
Paolo Carrasco Mori
 
PPTX
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
PDF
Distributed systems in practice, in theory (JAX London)
Aysylu Greenberg
 
PPTX
GitLab 8.6 - Release Webcast
GitLab, Inc
 
PPTX
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
PPTX
Git & Github
Aman Lalpuria
 
Introduction to git and Github
Wycliff1
 
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Aysylu Greenberg
 
GitHub Actions with Node.js
Stefan Stölzle
 
Git Going w/ Git
heyMP
 
GitHub Actions demo with mabl
Bertold Kolics
 
Implementing a command line client to GitHub in Go
Owen Ou
 
GitHub Actions - Melbourne UG
Natraj Yegnaraman
 
Cloud Spin - building a photo booth with the Google Cloud Platform
Bret McGowen - NYC Google Developer Advocate
 
CI/CD with GitHub Actions
Swaminathan Vetri
 
Up GitLab Presentation 2015
Kumaran Balachandran
 
Git n git hub
Jiwon Baek
 
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
inovex GmbH
 
Github in Action
Morten Christensen
 
Quick workflow of a nodejs api
Paolo Carrasco Mori
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Distributed systems in practice, in theory (JAX London)
Aysylu Greenberg
 
GitLab 8.6 - Release Webcast
GitLab, Inc
 
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
Git & Github
Aman Lalpuria
 

Similar to Building a µservice with Kotlin, Micronaut & GCP (20)

PDF
Micronaut Launchpad
Zachary Klein
 
PDF
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Michael Redlich
 
PDF
Microservices on a budget meetup
Matthew Reynolds
 
PDF
Introduction to Micronaut at Oracle CodeOne 2018
graemerocher
 
PDF
Micronaut Deep Dive - Devoxx Belgium 2019
graemerocher
 
PDF
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
Zachary Klein
 
PDF
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
PDF
Grails 4 and Micronaut at Devnexus 2019
graemerocher
 
PDF
Micronaut: Changing the Micro Future
Zachary Klein
 
PDF
Building Microservices Software practics
muhammed84essa
 
PDF
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
 
PDF
Design Patterns para Microsserviços com MicroProfile
Víctor Leonel Orozco López
 
PPTX
Micronaut: A new way to build microservices
Luram Archanjo
 
ODP
micro services architecture (FrosCon2014)
smancke
 
PDF
Getting Groovy with JHipster and Micronaut
Zachary Klein
 
PDF
Microservices with Micronaut
QAware GmbH
 
PDF
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
PDF
2016_04_04_CNI_Spring_Meeting_Microservices
Jason Varghese
 
PPTX
Micronaut brainbit
Michel Schudel
 
PPTX
Discover Micronaut
Riadh MNASRI
 
Micronaut Launchpad
Zachary Klein
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Michael Redlich
 
Microservices on a budget meetup
Matthew Reynolds
 
Introduction to Micronaut at Oracle CodeOne 2018
graemerocher
 
Micronaut Deep Dive - Devoxx Belgium 2019
graemerocher
 
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
Zachary Klein
 
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
Grails 4 and Micronaut at Devnexus 2019
graemerocher
 
Micronaut: Changing the Micro Future
Zachary Klein
 
Building Microservices Software practics
muhammed84essa
 
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
 
Design Patterns para Microsserviços com MicroProfile
Víctor Leonel Orozco López
 
Micronaut: A new way to build microservices
Luram Archanjo
 
micro services architecture (FrosCon2014)
smancke
 
Getting Groovy with JHipster and Micronaut
Zachary Klein
 
Microservices with Micronaut
QAware GmbH
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
2016_04_04_CNI_Spring_Meeting_Microservices
Jason Varghese
 
Micronaut brainbit
Michel Schudel
 
Discover Micronaut
Riadh MNASRI
 
Ad

More from Robert MacLean (20)

PPTX
Deno ...................................
Robert MacLean
 
PPTX
14 things you need to be a successful software developer (v3)
Robert MacLean
 
PPTX
OWASP TOP 10
Robert MacLean
 
PPTX
Looking at the Vue
Robert MacLean
 
PPTX
Kotlin 101
Robert MacLean
 
PPTX
Features of Kotlin I find exciting
Robert MacLean
 
PPTX
JavaScript Gotchas
Robert MacLean
 
PPTX
DevConf Survival Guide
Robert MacLean
 
PPTX
The state of testing @ Microsoft
Robert MacLean
 
PPTX
Visual Studio ❤ JavaScript
Robert MacLean
 
PPTX
What is new in C# 6?
Robert MacLean
 
PPTX
Putting the DOT in .NET - Dev/Ops/Test
Robert MacLean
 
PPTX
A Developer Day 2014 - Durban
Robert MacLean
 
PPTX
Agile lessons learned in the Microsoft ALM Rangers
Robert MacLean
 
PPTX
Hour of code - Train the trainer
Robert MacLean
 
PPTX
Building services for apps on a shoestring budget
Robert MacLean
 
PPTX
3 things your app API is doing WRONG
Robert MacLean
 
PPTX
ASP.NET
Robert MacLean
 
PPTX
LightSwitch
Robert MacLean
 
PPTX
How to build a Mobile API or HTML 5 app in 5 minutes
Robert MacLean
 
Deno ...................................
Robert MacLean
 
14 things you need to be a successful software developer (v3)
Robert MacLean
 
OWASP TOP 10
Robert MacLean
 
Looking at the Vue
Robert MacLean
 
Kotlin 101
Robert MacLean
 
Features of Kotlin I find exciting
Robert MacLean
 
JavaScript Gotchas
Robert MacLean
 
DevConf Survival Guide
Robert MacLean
 
The state of testing @ Microsoft
Robert MacLean
 
Visual Studio ❤ JavaScript
Robert MacLean
 
What is new in C# 6?
Robert MacLean
 
Putting the DOT in .NET - Dev/Ops/Test
Robert MacLean
 
A Developer Day 2014 - Durban
Robert MacLean
 
Agile lessons learned in the Microsoft ALM Rangers
Robert MacLean
 
Hour of code - Train the trainer
Robert MacLean
 
Building services for apps on a shoestring budget
Robert MacLean
 
3 things your app API is doing WRONG
Robert MacLean
 
LightSwitch
Robert MacLean
 
How to build a Mobile API or HTML 5 app in 5 minutes
Robert MacLean
 
Ad

Recently uploaded (20)

PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Python basic programing language for automation
DanialHabibi2
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
July Patch Tuesday
Ivanti
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 

Building a µservice with Kotlin, Micronaut & GCP