coping with iot data - mimming.com...coping with iot data on google cloud platform. google cloud...

129
Jen Tong Developer Advocate Coping with IoT Data On Google Cloud Platform

Upload: others

Post on 19-Mar-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Jen TongDeveloper Advocate

Coping with IoT DataOn Google Cloud Platform

Page 2: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 2

Jen Tong@MimmingCodes

Felipe Hoffa@felipehoffa

Page 3: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Agenda

● IoT Data Challenges● A use case● A recipe● Workshop

○ Setup stuff○ Simulate the activity○ Capture it with Pub/Sub○ Wrangle it with Dataflow○ Analyze it with BigQuery

Page 4: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 4

About you

● Electrical engineers?● Web developers?● Data scientists?● Mechanical engineers?● Not engineers at all?

Page 5: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 5Photo credit: Matt Chan

Data

photo credit - taniwha on flickr

Page 6: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 6

Page 7: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 7Photo credit: Matt Chan

Data

photo credit - wemake_cc on flickr

Page 8: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 8

Data

Page 9: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 9

Big data

Page 10: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 10

Page 11: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 11

Page 12: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 12

Google Research Publications

Page 13: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 13

Google Research Publications

Page 14: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 14

Open Source Implementations

Bigtable

Flume

Dremel

Page 15: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 15

Managed Cloud Versions

Bigtable

Flume

Dremel

Bigtable

Dataflow

BigQuery

Page 16: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 16

Coping with big data

Page 17: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 17

Big data

Page 18: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 18

Really big data

TuesdayWednesday

Thursday

Page 19: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 19

Infinite data

9:008:00 14:0013:0012:0011:0010:002:001:00 7:006:005:004:003:00

Page 20: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 20

Delayed data

9:008:00 14:0013:0012:0011:0010:00

8:00

8:008:00

8:00

Page 21: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 21

Batch Patterns: Creating Structured Data

MapReduce

Page 22: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 22

Batch Patterns: Repetitive Runs

MapReduce

TuesdayWednesday

Thursday

Page 23: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 23

Batch Patterns: Time Based Windows

MapReduce

Tuesday [11:00 - 12:00)

[12:00 - 13:00)

[13:00 - 14:00)

[14:00 - 15:00)

[15:00 - 16:00)

[16:00 - 17:00)

[18:00 - 19:00)

[19:00 - 20:00)

[21:00 - 22:00)

[22:00 - 23:00)

[23:00 - 0:00)

Page 24: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 24

Batch Patterns: Sessions

MapReduce

TuesdayWednesday

Jose

Lisa

Ingo

Asha

Cheryl

Ari

WednesdayTuesday

Page 25: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 25

Streaming Patterns: Element-wise transformations

13:00 14:008:00 9:00 10:00 11:00 12:00 Processing Time

Page 26: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 26

Streaming Patterns: Aggregating Time Based Windows

13:00 14:008:00 9:00 10:00 11:00 12:00 Processing Time

Page 27: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 27

Delayed data

9:008:00 14:0013:0012:0011:0010:00

8:00

8:008:00

8:00

Page 28: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 28

Streaming Patterns: Event Time Based Windows

11:0010:00 15:0014:0013:0012:00Event Time

11:0010:00 15:0014:0013:0012:00Processing Time

Input

Output

Page 29: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 29

Streaming Patterns: Session Windows

Event Time

Processing Time 11:0010:00 15:0014:0013:0012:00

11:0010:00 15:0014:0013:0012:00

Input

Output

Page 30: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 30

The use case

Page 31: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 31

The game

Page 32: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 32

Page 33: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 33

Page 34: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 34

Problem scope

● Intermittent connectivity● Inconsistent data delivery timing● Large, endless stream of data● Multiple input and output streams● Bursts of activity● Integrate and synchronize multiple event streams

Page 35: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 35

Solution requirements

● Keep up with the event streams● Respond in real-time● Scale up and down with demand● Process data once● Accommodate late-arriving data● Detect anomalies

Page 36: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 36

A recipe

Page 37: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

The recipe

Data

Page 38: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

The recipe

Pub/SubData

Page 39: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

The recipe

Pub/Sub DataflowData

Page 40: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

The recipe

Pub/Sub Dataflow BigQueryData

Page 41: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 41

Code time!

Setup stuff

Page 42: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Setup stuff

1. Log into your codelab project2. Install Java, Maven, and the Cloud SDK3. Download the example code4. Setup service account credentials5. Create a Google Cloud Storage 'staging bucket' for Dataflow6. Create a BigQuery Dataset

Detailed instructions: tinyurl.com/cope-iot-data

Page 43: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 43

Cloud Pub/Sub

Page 44: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 44

How Pub/Sub works

Topics Subscriptions Subscribers

Push

Pull

Push

Page 45: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 45

OSS alternative

Page 46: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 46

Cloud Pub/Sub features

● Asynchronous messaging● Many-to-many● Push and pull● At-least-once message delivery● REST/JSON API

Page 47: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 47

Nonfunctional stuff

● Globally available● Automatic scaling● Replicated storage● Encrypted on the wire and at rest

Page 48: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 48

Code time!

Pub/Sub injector

Page 49: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 49

Cloud Dataflow

Page 50: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 50

Cloud Dataflow

Cloud Dataflow is a collection of SDKs for building batch or

streaming parallelized data processing pipelines.

Cloud Dataflow is a fully managed service for executing optimized

parallelized data processing pipelines.

Page 51: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 51

How Dataflow works● A direct acyclic graph of data

processing transformations● Dataflow Service optimizes and

executes● Supports alternate runners● Multiple inputs and outputs● Logical MapReduce operations● PCollections flow through the

pipeline

Page 52: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 52

OSS alternative

Page 53: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 53

Features

● Unified model for streaming/batch analysis● Once-and-only-once input element processing● Autoscaling● Toolkit of complex transforms● Support for event-time stream processing

○ Handles of late data● Session windowing● Real-time analytics● Real-time dashboard and alerts

Page 54: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 54

What it's good at

• Filtering

• Transformation

• Movement

• Extract insights

• Batch

• Continuous

AnalysisETL

Page 55: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 55

Dataflow concepts

Page 56: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 56

PCollections -- pipeline collections

● A collection of data in a pipeline● Bounded or unbounded in size● Created by:

○ Building from a java.util.collection

○ Reading from a backing data store

○ Transforming an existing PCollection

{Seahawks, NFC, Champions, ...}

{..., “NFC Champions #Seahawks”, “Seahawks third #superbowl!”, ... “Je suis #12thMan”, “#GoHawks”, ...}

Page 57: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 57

ParDo -- Parallel Do transformation

● Process each PCollection element independently using a user-provided DoFn

● Both map and reduce phases in Hadoop.

{Seahawks, NFC, Champions, ...}

{KV<S, Seahawks>, KV<C,Champions>, <KV<S, Seattle>, KV<N, NFC>, ...}

Key by initial letter

Page 58: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 58

ParDo example

{Seahawks, NFC, Champions, ...}

Lowercase

PCollection<String> tweets = …;

tweets.apply(ParDo.of(

new DoFn<String, String>() {

@Override

public void processElement(ProcessContext c) {

c.output(c.element().toLowerCase());

}));

{seakawhs, nfc, champions, ...}

Page 59: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 59

GroupByKey

{KV<S, Seahawks>, KV<C,Champions>, <KV<S, Seattle>, KV<N, NFC>, ...}

{KV<S, Seahawks>, KV<C,Champions>, <KV<S, Seattle>, KV<N, NFC>, ...}

GroupByKey

{KV<S, {Seahawks, Seattle, …}, KV<N, {NFC, …} KV<C, {Champion, …}}

● Gathers all PCollection elements with the same key

● Shuffle phase in Hadoop

Page 60: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 60

GroupByKey & Combine

● Compute the most common value for each key with GroupByKey and DoFn

● DoFn needs to see all of the elements

● Easier to optimize than CombineFn

GroupByKey

{KV<S, Seahawks>, KV<C,Champion>, KV<S, Seattle>, KV<N, NFC>, ...}

{KV<S, {Seahawks, Seattle, …}>, KV<N, {NFC, …}>,

KV<C, {Champion, …}>}

Combine.groupedValues(TopFn)

{KV<S, Seahawks>, KV<N, NFC>,

KV<C, Champion>}

Page 61: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 61

Windows

● Divide or group elements of a PCollection into windows○ Fixed Windows: hourly, daily, …○ Sliding Windows○ Sessions

● Required for GroupByKey transforms on an unbounded PCollection

Nighttime Mid-Day Nighttime

Page 62: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 62

Composite PTransforms

● Build new PTransforms from existing transforms

● Some utilities are included in the SDK:○ Count, RemoveDuplicates,

Join, Min, Max, Sum… ● Define your own

○ DoSomething, DoSomethingElse...● Why bother?

○ Code reuse○ Easy to monitor

GroupByKey

Pair With Ones

Sum Values Count

Page 63: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 63

Code time!

Start a pipeline

Page 64: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 64

Google BigQuery

Page 65: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 65

OSS alternative

Page 66: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 66

BigQuery

● Scales flat to petabytes● SQL dialect● User defined functions● REST, Web UI, ODBC● 1TB free each month

Page 67: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 67

BigQuery

● Scales flat to petabytes● SQL dialect● User defined functions● REST, Web UI, ODBC● 1TB free each month

Page 68: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 68

Demo: count stuff

Page 69: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 69

SELECT count(word)FROM publicdata:samples.shakespeare

Words in Shakespeare

Page 70: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 70

SELECT sum(requests) as totalFROM [fh-bigquery:wikipedia.pagecounts_20150212_01]

Wikipedia hits over 1 hour

Page 71: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 71

SELECT sum(requests) as totalFROM [fh-bigquery:wikipedia.pagecounts_201505]

Wikipedia hits over 1 month

Page 72: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 72

Several years of Wikipedia data

SELECT sum(requests) as totalFROM [fh-bigquery:wikipedia.pagecounts_201105], [fh-bigquery:wikipedia.pagecounts_201106], [fh-bigquery:wikipedia.pagecounts_201107],

...

Page 73: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 73

SELECT SUM(requests) AS totalFROM TABLE_QUERY( [fh-bigquery:wikipedia], 'REGEXP_MATCH( table_id, r"pagecounts_2015[0-9]{2}$")')

Several years of Wikipedia data

Page 74: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 74

How about a RegExp

SELECT SUM(requests) AS totalFROM TABLE_QUERY( [fh-bigquery:wikipedia], 'REGEXP_MATCH( table_id, r"pagecounts_2015[0-9]{2}$")')WHERE (REGEXP_MATCH(title, '.*[dD]inosaur.*'))

Page 75: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 75

How BigQuery works

Page 76: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 76

Qualities of a good RDBMS

Page 77: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 77

Qualities of a good RDBMS

● Inserts & locking● Indexing● Cache● Query planning

Page 78: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 78

Qualities of a good RDBMS

● Inserts & locking● Indexing● Cache● Query planning

Page 79: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 79

Page 80: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 80

Page 81: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 81

Page 82: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 82

Storing data

-- -- -- ---- -- -- ---- -- -- --

Table

Columns

Disks

Page 83: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 83

Reading data: Life of a BigQuery

SELECT sum(requests) as sumFROM ( SELECT requests, title FROM [fh-bigquery:wikipedia.pagecounts_201501] WHERE (REGEXP_MATCH(title, '[Jj]en.+')) )

Page 84: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 84

Life of a BigQuery

L L

MMixer

Leaf

Storage

Page 85: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 85

L L L L

M M

M

Life of a BigQuery

Root Mixer

Mixer

Leaf

Storage

Page 86: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 86

Life of a BigQueryQuery

L L L L

M M

MRoot Mixer

Mixer

Leaf

Storage

Page 87: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 87

Life of a BigQueryLife of a BigQuery

L L L L

M M

MRoot Mixer

Mixer

Leaf

StorageSELECT requests, title

Page 88: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 88

Life of a BigQueryLife of a BigQuery

L L L L

M M

MRoot Mixer

Mixer

Leaf

Storage5.4 Bil

SELECT requests, title

WHERE (REGEXP_MATCH(title, '[Jj]en.+'))

Page 89: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 89

Life of a BigQueryLife of a BigQuery

L L L L

M M

MRoot Mixer

Mixer

Leaf

Storage5.4 Bil

SELECT sum(requests)

5.8 MilWHERE (REGEXP_MATCH(title, '[Jj]en.+'))

SELECT requests, title

Page 90: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 90

Life of a BigQueryLife of a BigQuery

L L L L

M M

MRoot Mixer

Mixer

Leaf

Storage5.4 Bil

SELECT sum(requests)

5.8 MilWHERE (REGEXP_MATCH(title, '[Jj]en.+'))

SELECT requests, title

SELECT sum(requests)

Page 91: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 91

Code time!

BigQuery

Page 92: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 92

Wrap up

Page 93: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 93

Big data

Page 94: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 94Photo credit: Matt Chan

Data

photo credit - wemake_cc on flickr

Page 95: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 95Photo credit: Matt Chan

Data

photo credit - taniwha on flickr

Page 96: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 96

Thank you!

Jen Tong@MimmingCodes

Felipe Hoffa@felipehoffa

Slides:mimming.com/presos

Page 97: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 97

Page 98: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 98

Bonus stuff

Page 99: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 99

Cloud BigtableCloud Bigtable

Page 100: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 100

Bigness

Page 101: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 101

Google Internal Bigtable in Numbers

• Storage: 100s of PB

• Throughput: 1,000,000s of QPS

• Bandwidth: 100s of GB/sec

Page 102: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 102

How much is that?

Several Datas worthPhoto credit: jdhancock

Page 103: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 103

How much is that?

Millennia of DVD videoPhoto credit: illinoislibrary

Page 104: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 104

Engineering

Page 105: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 105

Engineering

Hundreds of engineer-years worth

Page 106: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 106

Bigtable - The early years

• Jeff and Sanjay decided to build a database service that could scale linearly across thousands and thousands of commodity servers

• Systems will fail, retain performance at scale

• Abandon traditional relational model

• The first generation was about:

• Prototyping and build the service to do its first scaling

• Migrate initial applications to Bigtable

• Figure out replication, and first multi-tenant version of Bigtable

Page 107: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 107

Bigtable - Stabilized

• From batch only, to serving web traffic

• Low latency for 99th percentile of requests

• Polish the Bigtable service

• React better to abusive usage

• Mixed media clusters - mixture of SSD + HDD storage with configurable affinity

• Bring tablet server recovery time from 10s of seconds to 1 second or less

• Easier replication

Page 108: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 108

Google Cloud Bigtable

• A fully-managed service

• Focus more on your business, less on infrastructure

• Straightforward pricing model

Page 109: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 109

Data Model

Page 110: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 110

Data model

Page 111: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 111

Data model

Page 112: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 112

How it works

Page 113: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 113

HBase Architecture

HBase Cluster

Region Server

Region Server

Region Server

Region Server

Master

Region Server

Bloomfilter

Memory Table

WAL

Block Cache

RegionRegion

Region Region

ZooKeeper

HBase Client

HDFS

Page 114: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 114

Bigtable Architecture

Bigtable Cell

Tabletserver

Tabletserver

Tabletserver

Tabletserver

Master

Tabletserver

Bloomfilter

Memtable

Sharedlog

Block Cache

TabletTablet

Tablet Tablet

Chubby

HBase Client

Colossus

Page 115: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 115

Bigtable System Architecture

Bigtable Cell

Tabletserver

Tabletserver

Tabletserver

Tabletserver

Master

Tabletserver

Bloomfilter

Memtable

Sharedlog

Block Cache

TabletTablet

Tablet Tablet

Chubby

HBase Client

Colossus

Page 116: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 116

Bigtable Architecture

Bigtable Cell

Tabletserver

Tabletserver

Tabletserver

Tabletserver

Master

Tabletserver

Bloomfilter

Memtable

Sharedlog

Block Cache

TabletTablet

Tablet Tablet

Chubby

HBase Client

Colossus

Page 117: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 117

Bigtable Architecture

Bigtable Cell

Tabletserver

Tabletserver

Tabletserver

Tabletserver

Master

Tabletserver

Bloomfilter

Memtable

Sharedlog

Block Cache

TabletTablet

Tablet Tablet

Chubby

HBase Client

Colossus

Page 118: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 118

Life of Bigtable data

Page 119: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 119

Life of Bigtable data

Page 120: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 120

Life of Bigtable data

Page 121: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 121

Life of Bigtable data

Page 122: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 122

When it's awesome

Page 123: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 123

Management

Who in the audience have used HBase before?

Things you will not see in Cloud Bigtable:

Compactions

Pre-splitting

Lots of configuration settings

1 minute regionserver outages

Coprocessors (for now)

Page 124: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 124

Throughput

Write Throughput (MB/s)Mixed Read/Write Throughput(MB/s)

Page 125: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 125

Latency

late

ncy

(ms)

at

99%

read

update

Page 126: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 126

Financial ServicesFaster risk analysis, credit card fraud/abuse

Marketing/ Digital MediaUser engagement, clickstream analysis, real-time adaptive content

Internet of ThingsSensor data dashboards and anomaly detection

TelecommunicationsSampled traffic patterns, metric collection and reporting

EnergyOil well sensors, anomaly detection, predictive modeling

BiomedicalGenomics sequencing data analysis

Cloud Bigtable Use Cases

Page 127: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 127

When not to use it

• Relational joins, like for online transaction processing

• Interactive querying

• Blobs over 10MB

• ACID transactions

• Automatic cross-zone replication

• You don't have much data yet

Page 128: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 128

When not to use it

• Relational joins, like for online transaction processing - Cloud SQL

• Interactive querying - BigQuery

• Blobs over 10MB - Cloud Storage

• ACID transactions - Datastore

• Automatic cross-zone replication - Datastore

• You don't have much data yet - Datastore, Firebase, or Cloud SQL

Page 129: Coping with IoT Data - mimming.com...Coping with IoT Data On Google Cloud Platform. Google Cloud Platform Confidential & Proprietary 2 Jen Tong @MimmingCodes ... Asha Cheryl Ari Tuesday

Confidential & ProprietaryGoogle Cloud Platform 129

More bonus stuff

Build one of something with Firebase