Slide 1

Slide 1 text

objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) Grails and Google Cloud Greach 2018 Ryan Vanderwerf

Slide 2

Slide 2 text

objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. 2 ● Father of 2 kids ● Members of OCI Grails Team ● other stuff here About Ryan

Slide 3

Slide 3 text

objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. 3 WE ARE SOFTWARE ENGINEERS. We deliver mission-critical software solutions that accelerate innovation within your organization and stand up to the evolving demands of your business. INDUSTRIAL IoT BLOCKCHAIN CONSULTING MACHINE LEARNING CLOUD SOLUTIONS AREAS OF EXPERTISE We equip industrial environments with seamless connectivity and real-time analytics that reduce operating costs and deliver on customer demands. We can modernize your legacy applications and enable scalable, integrated AI capabilities tailored to your unique sets of data. We are at the forefront of blockchain technology, and we have practical, real-world experience with its implementation. We combine software engineering expertise with cloud-native architecture to accelerate innovation within your organization.

Slide 4

Slide 4 text

objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. 4 PARTIAL CLIENT LIST 90% Repeat Clients

Slide 5

Slide 5 text

objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. 5 OUR COMMUNITY OF OPEN SOURCE PARTNERS

Slide 6

Slide 6 text

6 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. 160+ Engineers MS/PHD Advanced Security Clearance 14 Average Years OCI Tenure 19 Average Years Engineering Experience OUR GLOBAL FOOTPRINT

Slide 7

Slide 7 text

7 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. • Google Cloud Overview • Google Cloud Console • Google Cloud SDK • Google Compute • Google Appengine • Grails Application - Push to AppEngine ● Google Cloud SDK ● Cloud SQL ● Cloud Storage ● Bigtable Overview ● Bigtable Grails Examples ● PubSub Overview ● PubSub Grails Examples Agenda

Slide 8

Slide 8 text

8 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Free Stuff • There is now a free tier! Google now competes with AWS 1 year free tier • Also get starter $300 USD credit • Compute - free f1.micro + 3GB HDD instance per month (us regions only) • AppEngine - free 28 instance hours/day • Cloud storage - 5GB • free memcache • 1000 search ops/day • 100 emails/day • 10GB sub/sub messages/mo • and more.. check out https://cloud.google.com/free/ for everything Google Compute Overview

Slide 9

Slide 9 text

9 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. • Why Google Cloud? • You may be asked by your employer to investigate • Your employer may have already adopted • Where does it stand? (Gartner chart) Google Compute Overview

Slide 10

Slide 10 text

10 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Go to https://console.cloud.google.com/home/dashboard • create a project - resources are always tied to context of a project • Next let's install the Cloud SDK Google Cloud Console

Slide 11

Slide 11 text

11 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. This is how you interact with Google cloud remotely • Download the SDK for your operating system at https://cloud.google.com/sdk/downloads • Run 'gcloud init' to set up your SDK • Enter your account, and select the project you will be working with • Next let's use app engine! Google Cloud SDK

Slide 12

Slide 12 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. AppEngine Architecture

Slide 13

Slide 13 text

13 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Run 'gcloud app create' to create the AppEngine • Pick the region/zone you want • It will say use 'gcloud app deploy' but we'll be using the Gradle AppEngine plugin instead • Next we'll set up our Grails App to be able to be deployed • Create Grails App using start.grails.org or SDK man and run 'grails create-app ' Google App Engine

Slide 14

Slide 14 text

14 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. ● Setup App Engine plugin in build.gradle ● Setup App Engine yaml config file app.yaml ● We switch Tomcat out with Jetty as it works better with App Engine Google App Engine

Slide 15

Slide 15 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. CloudSQL Architecture

Slide 16

Slide 16 text

16 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Enable Cloud SQL API • Go to API Manager • Enable Google Cloud SQL API Create Cloud SQL Instance • Datasource using Cloud SQL • Create Instance • Add MySQL jars to build.gradle • Get instance connection name and add to application.yml • Example Grails Application Demo Google Compute Overview

Slide 17

Slide 17 text

17 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. What is Google Cloud Storage? Google Cloud storage is an network object store like Amazon S3 • Enable Google Cloud Storage API • Create Bucket • Add jars to build.gradle • Add config to application.yml • Demo Grails Application Google Cloud Storage

Slide 18

Slide 18 text

18 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. To Deploy Use Gradle • ./gradlew appengineDeploy • Enable Logging • Logging Grails Demo • Status Console Deploy To App Engine

Slide 19

Slide 19 text

19 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Bigtable is a Hbase cluster on Google Cloud • Wide Column Store • Mapreduce but with Transactions • Powers Google services, including Search, Analytics, Maps, and Gmail • Use Apache HBase Java libraries to access Google BigTable

Slide 20

Slide 20 text

20 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. What is BigTable? • Cloud Bigtable is a sparsely populated table that can scale to billions of rows and thousands of columns, allowing you to store terabytes or even petabytes of data. • What is it good for? • Cloud Bigtable is ideal for applications that need very high throughput and scalability for non-structured key/value data, where each value is typically no larger than 10 MB. • Cloud Bigtable also excels as a storage engine for batch MapReduce operations, stream processing/analytics, and machine-learning applications. Google BigTable

Slide 21

Slide 21 text

21 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Storage Architecture • Stores data in massively scalable tables • The table is composed of rows • Each describes a single entity • Columns contain individual values • Each row is indexed by a single row key, and columns that are related to one another are typically grouped together into a column family • Each column is identified by a combination of the column family and a column qualifier, which is a unique name within the column family. Google BigTable

Slide 22

Slide 22 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. BigTable Architecture

Slide 23

Slide 23 text

23 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. About the diagram • The table contains one column family, the follows family. This family contains multiple column qualifiers • Column qualifiers are used as data. This design choice takes advantage of the sparseness of Cloud Bigtable tables, and the fact that new column qualifiers can be added on the fly • The username is used as the row key. Assuming usernames are evenly spread across the alphabet, data access will be reasonably uniform across the entire table.. Google BigTable

Slide 24

Slide 24 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. BigTable Architecture

Slide 25

Slide 25 text

25 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Storage Components • Nodes are called ‘Tablet Servers’ • Nodes are shared into blocks of contiguous rows called ‘tablets’ to help balance the load of queries • Tablets are stored on Colossus, Google's file system, in SSTable format • An SSTable provides a persistent, ordered immutable map from keys to values, where both keys and values are arbitrary byte strings • Importantly, data is never stored in Cloud Bigtable nodes themselves; each node has pointers to a set of tablets that are stored on Colossus. Google BigTable

Slide 26

Slide 26 text

26 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Setting up Grails • Dependencies, Dependencies • Don’t underestimate library conflicts - google has packaged various grpc libs inside their jars making working with it very difficult • Use Google cloud libs + Apache HBase libs • BigTable Grails App • See https://github.com/grpc/grpc-java/blob/master/SECURITY.md#troubleshooting for a chart to help match library versions Google BigTable

Slide 27

Slide 27 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. Dependency Hell grpc-netty version netty-handler version netty-tcnative-boringssl-static version 1.0.0-1.0.1 4.1.3.Final 1.1.33.Fork19 1.0.2-1.0.3 4.1.6.Final 1.1.33.Fork23 1.1.x-1.3.x 4.1.8.Final 1.1.33.Fork26 1.4.x 4.1.11.Final 2.0.1.Final 1.5.x 4.1.12.Final 2.0.5.Final 1.6.x 4.1.14.Final 2.0.5.Final 1.7.x-1.8.x 4.1.16.Final 2.0.6.Final 1.9.x- 4.1.17.Final 2.0.7.Final

Slide 28

Slide 28 text

28 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Grails Demo Google BigTable

Slide 29

Slide 29 text

29 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. “Enterprise Level Message Oriented Middleware” • Typical Topic/Subscriber/Publisher Model • Supports either push or pull model • BigTable Grails App Google PubSub

Slide 30

Slide 30 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. PubSub Architecture

Slide 31

Slide 31 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. PubSub Architecture

Slide 32

Slide 32 text

32 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Setup Topics on Console • Create topic • Grails App - create Subscriber (Cannot do from console) • Subscriber Demo • Runs in continuous polling thread • Publisher Demo Google PubSub

Slide 33

Slide 33 text

33 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Overview • Google Cloud Pub/Sub is a publish/subscribe (Pub/Sub) service: a messaging service where the senders of messages are decoupled from the receivers of messages. There are several key concepts in a Pub/Sub service: • Message • Topic • Subscription • Publisher • Subscriber Google PubSub

Slide 34

Slide 34 text

34 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Grails PubSub Demo Google PubSub

Slide 35

Slide 35 text

35 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Running projects cost money! • If you are using above 28 instance hours you will eat into your $300 credit • Unfortunately no ‘suspend’ or easy off like AWS :( • Delete project • Delete App Versions • Delete Cloud SQL Instances • Delete Cloud Storage Buckets Cleanup

Slide 36

Slide 36 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. There is so much more!

Slide 37

Slide 37 text

Thank You! • There is so much more you can do with Google Cloud. Get out there and make something Great! • Can use Cloud SQL, AppEngine, BigTable, and Pubsub • Thanks to Sergio and Matt for the Grails guide! For step by step instructions see http://guides.grails.org/grails-google-cloud/guide/index.html • Source for these demos available at https://github.com/rvanderwerf/grails-google-cloud/tree/grails-gr8-demos • Dependency troubleshooting at https://github.com/grpc/grpc-java/blob/master/SECURITY.md#troubleshooting • Thank you for attending! objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 38

Slide 38 text

objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. 38 Subsequent Step Question Begin End Step 1 Step 2 Step 3 Subsequent Step No Yes SAMPLE FLOWCHART

Slide 39

Slide 39 text

objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. 39 Process Alternate Process Data Begin No Yes Terminator/ End Connector Shapes Lines Text Boxes Use Insert > Shapes > Flow Chart and Lines for additional shape and line options. Decision FLOWCHART ELEMENTS

Slide 40

Slide 40 text

40 objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved. Hierarchy of text sizes, level 1 • Level • Level 3 • Level 4 Hierarchy of text sizes, level 1 • Level • Level 3 • Level 4 This is a title

Slide 41

Slide 41 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 42

Slide 42 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 43

Slide 43 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 44

Slide 44 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 45

Slide 45 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 46

Slide 46 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 47

Slide 47 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 48

Slide 48 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 49

Slide 49 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 50

Slide 50 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 51

Slide 51 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 52

Slide 52 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 53

Slide 53 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 54

Slide 54 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 55

Slide 55 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 56

Slide 56 text

© 2018, Object Computing, Inc. (OCI). All rights reserved. The revolution is here NOW! 4.0 Cyber-Physical Transformation 1969 3.0 Computer Automation 1870 2.0 Mass Production 1784 1.0 Mechanization

Slide 57

Slide 57 text

Highlighting Percentages and Other Stats Encourage innovation and time-to-market XX% STEP 1 Copy and paste Slide 30 and modify text as needed Or copy and paste the shapes to build a graphic that highlights percentages or other statistics TIPS Build a photo background, or set the layout to Photo Background (blue gradient) Headline text should be sized at 42-48 point Highlighted number should be sized at 30-33 point Neighboring text box should use text sized to 20-22 point, and should be centered under the circle

Slide 58

Slide 58 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 59

Slide 59 text

© 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 60

Slide 60 text

EXTERNAL SHARING – FOOTER (LIGHT BACKGROUND) • Before sharing slides externally (online or printing), OCI copyright and branding should be added. • The footer shown below is formatted for slides with dark colored backgrounds. • Copy the footer from this slide and paste into on your slides before sharing the deck externally. objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved.

Slide 61

Slide 61 text

EXTERNAL SHARING – FOOTER (DARK BACKGROUND) • Before sharing slides externally (online or printing), OCI copyright and branding should be added. • The footer shown below is formatted for slides with dark colored backgrounds. • Copy the footer from this slide and paste into on your slides before sharing the deck externally. objectcomputing.com © 2018, Object Computing, Inc. (OCI). All rights reserved.