Google App Engine
• Build highly
scalable applications on a fully
managed
serverless platform
• Java 8 + Jetty9
• Java 11 (Beta)+Netty
• Sample: Mobile app backend services
Slide 28
Slide 28 text
Google App Engine
• Build highly
scalable applications on a fully
managed
serverless platform
• Java 8 + Jetty9
• Java 11 (Beta)+Netty
• Sample: Mobile app backend services
Slide 29
Slide 29 text
Ktor on App Engine
• Follow the document Follow Ktor Doc
Slide 30
Slide 30 text
Add GAE Manually(1)
Slide 31
Slide 31 text
Add GAE Manually(2)
Slide 32
Slide 32 text
Ktor Good Read
• Mobile Backends (IO 2019)
https://www.youtube.com/watch?
v=zjWOMBdPbsI&t=517s
• KotlinConf Ryan Harter
https://www.youtube.com/watch?v=V4PS3IjIzlw
Slide 33
Slide 33 text
Exception Handling[link]
Slide 34
Slide 34 text
• Don’t make exception a part of your business logic
• Don’t abuse GlobalExceptionHandler
• Use standard Exception
• Kotlin doesn’t have checked exception
• Cleaner code
• Need to look into library method that throws
Exception Handling[link]
Slide 35
Slide 35 text
Exception Handling
• Don’t make exception a part of your business logic
• Don’t abuse GlobalExceptionHandler
• Use standard Exception
• Kotlin doesn’t have checked exception
• Cleaner code
• Need to look into library method that throws
Slide 36
Slide 36 text
(Android Dev)->Backend
Dev
Diff Same
RAM IoC
Async Testing
Killed Application Context
Error
Slide 37
Slide 37 text
Annotation Use-site Targets
•
Slide 38
Slide 38 text
No content
Slide 39
Slide 39 text
Armeria
• HTTP/2 RPC/REST client/
server library
• built on top of Java 8, Netty,
Thrift and gRPC
https://www.youtube.com/
watch?v=hLlctum1pIA
Slide 40
Slide 40 text
No content
Slide 41
Slide 41 text
No content
Slide 42
Slide 42 text
No content
Slide 43
Slide 43 text
No content
Slide 44
Slide 44 text
No content
Slide 45
Slide 45 text
No content
Slide 46
Slide 46 text
No content
Slide 47
Slide 47 text
No content
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
No content
Slide 50
Slide 50 text
No content
Slide 51
Slide 51 text
No content
Slide 52
Slide 52 text
Ktor Route Creation
• Extension functions
Slide 53
Slide 53 text
Ktor Route Creation
• Extension
Slide 54
Slide 54 text
Ktor Route Creation
• Extension
Configure
Slide 55
Slide 55 text
Spring Controller Creation
Slide 56
Slide 56 text
Spring Handling Request
Slide 57
Slide 57 text
Ktor Handling Request
Slide 58
Slide 58 text
Take away
• Ktor
• Introduction
• Request / Respond
• Features
• Firefox Account
• Architecture
• Deploy to Google App
Engine
• Backend development for
Android dev
• Exception Handling
• Annotation Use-site
Targets
• Final / Nullable
• Spring / Armeria / Ktor
Slide 59
Slide 59 text
Suggestions…
• Use Ktor GAE samples
• Use Groovy Gradle build script for now
• Be careful fo Intellij 2019.2 (don’t touch offline mode!)