$30 off During Our Annual Pro Sale. View Details »

Bring Kotlin to Google Cloud - hobby projects to explore the possibility

Toan Tran
December 01, 2019

Bring Kotlin to Google Cloud - hobby projects to explore the possibility

Kotlin - the much love language in Android development work can work out of the scope of your Android phone. With the favor of support from Google, now we can have this language run on Google Cloud. This talk from Toan will be about hobby projects he built on 1 single language - Kotlin to connect components together to see what is possible to build using such a combination of Kotlin and Google Cloud.

Toan Tran

December 01, 2019
Tweet

More Decks by Toan Tran

Other Decks in Programming

Transcript

  1. About speaker
    Hello! I’m Toan
    Android Lead @Inspectorio (check out our opening positions!)
    https://toan.mobi
    toantran-ea
    toan_mobi

    View Slide

  2. View Slide

  3. Agenda
    1. Why would we care about Kotlin?
    2. Context of the talk
    3. Explore the support of Google Cloud for Kotlin
    4. Idea
    5. Implementation (live coding)
    6. What I learn from the journey

    View Slide

  4. Why would we care about Kotlin?
    1. Language fluency
    2. Java + Kotlin inter-ops capability
    3. Great extensibility of the language
    4. Growing community with serious investment from Jetbrains and
    Google

    View Slide

  5. Context of the talk - I’m looking for
    1. Provide the backend capability for the
    Android app with little/no language
    change.
    2. Scalable and easy to deploy
    3. Code sharing between Android app and
    backend app

    View Slide

  6. Context of the talk - I’m looking for

    View Slide

  7. How it’s possible
    KOTLIN JVM
    Google Cloud
    Support

    View Slide

  8. Google Cloud support Kotlin?

    View Slide

  9. Hobby app - Calories Intake tracker
    1. Create a new log entry for food intake
    2. Read all the entries I have
    3. Update a certain log entry
    4. Delete log entry

    View Slide

  10. Pick the stacks
    1. Google App engine as the option to use on
    Google Cloud
    2. Ktor as the framework for my API app
    3. Google Cloud Datastore as the Storage
    Backend (NoSQL - key-value idea)
    ×

    View Slide

  11. Basic setup
    1. Create a local project based on Ktor to start
    2. Create project on Google Cloud Platform console
    3. Enable billing for your project
    4. Install Google Cloud SDK
    5. Install Java 8 or or higher on your local
    development machine

    View Slide

  12. Get some code!

    View Slide

  13. Test it out!

    View Slide

  14. Switch to live code

    View Slide

  15. What I learn from the journey
    1. I should have the project setup with App Engine template to debug the
    app properly.
    2. I had some hiccups with Ktor framework in encoding
    3. Short learning curve
    4. Quick to prototype and show it live
    5. Quick deploy (you see!)
    6. Comfortable work with Kotlin

    View Slide

  16. Step by step guide
    Blog series - Bring Kotlin to cloud — a hobby project to
    explore the possibility - Medium
    https://medium.com/@toantran/bring-kotlin-to-cloud-a-hobby-project-to-explore-the-possibility-part-2-7e96abc6d75f

    View Slide

  17. Thank you

    View Slide