Slide 1

Slide 1 text

Building Applications on Google Cloud Platform

Slide 2

Slide 2 text

Design considerations Where to run? Where to store? How to integrate? Alternate design options 1 2 3 Agenda 4 5

Slide 3

Slide 3 text

Design considerations

Slide 4

Slide 4 text

● Take pictures and share them with friends ● Comment on your friends’ pictures ● Let them know you like them! Abelana Photo Sharing

Slide 5

Slide 5 text

Technical features ● Android app ● Multiple authentication providers ● All image formats accepted ● Only WEBP served ● Fast, scalable, fun

Slide 6

Slide 6 text

Abelana App Storage Image formatter Abelana Server Abelana architecture

Slide 7

Slide 7 text

Abelana architecture Abelana App Storage Image formatter Abelana Server

Slide 8

Slide 8 text

Abelana Server Requirements ● Autoscale - Ready for success ● Rapid development ● Zero management ● Allows for modular App design Abelana Server

Slide 9

Slide 9 text

Google App Engine ● Automatic resource provisioning and configuration ● Fully Managed Platform & Services ● Micro-services Framework ● Just bring your application code / Dockerfile

Slide 10

Slide 10 text

Factor large Apps into micro- services Modules within an App: ● Can share state ● Communicate Securely ● Have individual performance settings and Versions ● Can be written in different languages ● Can be backed by Compute Engine VMs (Managed VMs) Module Module Module Version Version Version Version VM Instance Instance Version Version VM Instance App App Engine Modules

Slide 11

Slide 11 text

Abelana App Storage Image formatter Abelana Server Abelana architecture

Slide 12

Slide 12 text

● Create, edit, compose, or convert bitmap images ● Supports multiple image formats ● Available as a Library and command line tool ● Written in C ImageMagick http://www.imagemagick.org/

Slide 13

Slide 13 text

● App Engine productivity - on VMs ○ More flexible, powerful ● Bring your own ○ Dependencies ○ Runtime (Docker container) ● What’s new? ○ Load Balancing ○ Autoscaling ○ Cloud SDK Integration ● … in Beta today () App Engine Managed VMs now in Beta

Slide 14

Slide 14 text

Abelana App Storage Abelana Server Abelana architecture Image formatter

Slide 15

Slide 15 text

Abelana Server Architecture Endpoints Timeline Manager Notice Abelana ImageMagick

Slide 16

Slide 16 text

Abelana architecture Abelana App Storage Image formatter Abelana Server

Slide 17

Slide 17 text

Storage Requirements ● Storage for Image uploads and processed Images ○ Storage Buckets ○ Direct access from Mobile App ○ Notification of new Images Storage

Slide 18

Slide 18 text

● Bucket based Object store ● Simple HTTP API ● Object notifications Google Cloud Storage

Slide 19

Slide 19 text

Abelana App Storage Image formatter Abelana Server Abelana architecture

Slide 20

Slide 20 text

Storage Requirements ● Storage for Image uploads and processing ○ Notification of new Images ○ Direct access from Mobile App ● Application Level Data: Users, Comments, Photos, etc ○ Scalable, Managed, Easy to Use Storage

Slide 21

Slide 21 text

● Managed NoSQL Datastore ● Native access from App Engine ● Built-in redundancy ● Autoscale Google Cloud Datastore

Slide 22

Slide 22 text

Abelana App Storage Image formatter Abelana Server Abelana architecture

Slide 23

Slide 23 text

Storage Requirements ● Storage for Image uploads and processing ○ Notification of new Images ○ Direct access from Mobile App ● Application Level Data: Users, Comments, Images, etc ○ Scalable, managed, Easy of Use ● Counter for Likes. Storage for generated timelines Storage

Slide 24

Slide 24 text

Redis ● Key-value cache and store ○ Fast, in-memory access ● Values can be rich data types ○ lists, sets & sorted sets, etc ○ Great for Counters ● Click to Deploy on GCP https://redis.io

Slide 25

Slide 25 text

Redis Click to Deploy ● Configure a Redis Cluster in seconds ● Specify ○ Node count ○ Virtual Machine type [Optional] ○ Number of persistent nodes [Optional] https://cloud.google.com/solutions/redis/click-to-deploy

Slide 26

Slide 26 text

Abelana App Storage Image formatter Abelana Server Abelana architecture

Slide 27

Slide 27 text

How to integrate?

Slide 28

Slide 28 text

Abelana App Storage Image formatter Abelana Server Abelana architecture

Slide 29

Slide 29 text

● Simple API + Minimal Coding ○ Client Library Support ○ Authentication via different providers ● Reliable and highly available ● Scalable Application Backend Integration Abelana App Abelana Server

Slide 30

Slide 30 text

iOS Cloud Endpoints ● Create APIs for Mobile and Gaming Backends ● Decorate client interface application code or generate Endpoint classes from Models ● Discoverable, Restful APIs implemented on top of Google’s API Infrastructure ● Tools for generating mobile optimized Client Libraries for Android, iOS and Web ● OAuth 2.0 support and client key management Cloud Endpoints Abelana Server

Slide 31

Slide 31 text

Java - App Engine @Api(name=”comment” version=”v1”) public class CommentsEndpoint @ApiMethod(httpMethod = "GET", path = "{personid}/{photoid}") public List getComments( @Named("photoid") long photoId, @Named(“personid”) long personId) throws UnauthorizedException, NotFoundException { List results = comments.query(personId, photoId); return results; } } // REST call = /comment/v1/{userid}/{photoid} public class CommentsTask extends ServiceTask { protected void executeEndpointCall() { service.commentsEndpoint().getComments(photoId, personId).execute(); } Android App

Slide 32

Slide 32 text

Firebase: Realtime Application Platform Realtime Database User Management Hosting

Slide 33

Slide 33 text

Abelana App Storage Image formatter Abelana Server Abelana architecture

Slide 34

Slide 34 text

● Automatic notification of new images ● Background Processing - Outside of User Request ● Queue based system ○ Auto retry ○ Rate configurable ● Minimal configuration and management Image Formatter / Storage Integration Storage Image formatter Abelana Server

Slide 35

Slide 35 text

● Allow work to be performed outside of a user request ● Push or Pull based queueing system ● Automatic Retries + Exponential backoff ● Close to zero configuration App Engine Task queues

Slide 36

Slide 36 text

Image Processing Flow Worker Task Queue /process_image?url=http://storage.googleapis.com/images-in/... Abelana Server Uploaded Images Bucket Object Notifications Processed Images Bucket

Slide 37

Slide 37 text

Abelana App Storage Image formatter Abelana Server Abelana architecture VM VM VM Instance Group

Slide 38

Slide 38 text

Alternate Design Options Wix Media Platform http://wixmp.com/google

Slide 39

Slide 39 text

Abelana App Storage Image formatter Abelana Server Abelana architecture VM VM VM Instance Group

Slide 40

Slide 40 text

Abelana Server Abelana architecture Abelana App Wix Media Platform

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Wix Media by the Numbers 55 million 1.5 TB 1.5 billion 35 TB Users Daily Uploads Daily Requests Daily Bandwidth

Slide 43

Slide 43 text

Wix Media Platform ● Real-time Image Manipulation ● Audio and Video transcoding ● CDN ● Media Manager and Playground ● SDKs

Slide 44

Slide 44 text

App Engine Media Manager Compute Engine Runtime App Transcoders NORM Workers Rembrandt Workers Cloud Storage Memcache Task Queue PubSub Datastore Metadata APIs GLB CDN

Slide 45

Slide 45 text

The world’s fastest, most reliable media management system Available today for GCP

Slide 46

Slide 46 text

Primary Design Considerations: ● Where best to run your application components ● Where to store various types of data ● How to effectively integrate the various components of your app Use a Modular Design for flexibility, use Managed Services where possible Wix Media Platform is a collection of services for storing, serving, uploading, and managing image, audio, and video files. Google Cloud Platform has everything you need to design and build applications Key Takeaways

Slide 47

Slide 47 text

Thanks! cloud.google.com