SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
使用Google Cloud
從雲到端,動手刻個IoT
Simon Su @ GCPUG.TW
https://goo.gl/QxoSB2
About me
var simon = {/** I am at GCPUG.TW **/};
simon.cloud_gde = true;
simon.blog = ‘http://peihsinsu.blogspot.com';
simon.slideshare = ‘http://slideshare.net/peihsinsu/';
simon.email = ‘simonsu.mail@gmail.com’;
simon.say(‘Give me IV100 Mewtow!!');
From iThome: https://www.ithome.com.tw/news/111022
What is IoT?
The Internet of things (IoT) is the network of physical
devices, vehicles, home appliances, and other items
embedded with electronics, software, sensors, actuators,
and network connectivity which enable these objects to
connect and exchange data.
From Wikipedia: https://en.wikipedia.org/wiki/Internet_of_things
What is IoT…
Device Cloud BigData, ML, AISensor, BLE, NBIoT
microprocessor mips / arm x86 / x64 / unix iaas / paas / saas
Device Cloud
● Connectivity: Async, Sync
● Install & Upgrade: Container,
Package
● AI / ML
● Remote Control / Managment
● Data Cache: Queue
● Data Process: Batch, Streaming
● Data Store: Object Store, Data
Query
● BI: Report, Business Integration
● AI / ML
從Google IoT架構看看Google Cloud Platform上的IoT Family
IoT低加
結合serverless
GCP上的BigData系列
當紅的Machine Learning
我才是主角
Cloud PubSub
● Deliver event data wherever you need it
● Build multi-cloud and hybrid applications on open
architecture
● Scale responsively and automatically
● Bring reliability and security tools to real-time apps
Cloud PubSub
Repo: https://github.com/gcpug-tw/pubsub-example.git
subscription.pull(options, function (err, messages) {
if (err) return callback(err);
// Do something for each message
messages.forEach(handleMessage);
console.log('Pulled %d messages!', messages.length);
// Acknowledge messages
var subscription = pubsub.subscription(subscriptionName);
if(messages && messages.length > 0)
subscription.ack(messages.map(function (message) {
return message.ackId;
}), function (err) {
if (err) {
return callback(err);
}
console.log('Acked %d messages!', messages.length);
return callback(null, messages);
});
});
● Microservices Over Monoliths
● Connect & Extend Cloud Services
● Serverless Economics
● Mobile Ready
● Just Add Code
● Open and Familiar
Cloud Function
Cloud Function
● Enterprise Cloud Data Warehouse
● Speed & Scale
● Incredible Pricing
● Security & Reliability
● Partnerships & Integrations
BigQuery
var bigqueryClient = bigquery({
projectId: 'grape-spaceship-123',
keyFilename: '/path/to/keyfile.json'
});
// Access an existing dataset and table.
var schoolsDataset = bigqueryClient.dataset('schools');
var schoolsTable = schoolsDataset.table('schoolsData');
// Import data into a table.
schoolsTable.import('/local/file.json', function(err, job) {});
// Get results from a query job.
var job = bigqueryClient.job('job-id');
// Use a callback.
job.getQueryResults(function(err, rows) {});
// Or get the same results as a readable stream.
job.getQueryResults().on('data', function(row) {});
From: https://github.com/GoogleCloudPlatform/google-cloud-node#google-bigquery-beta
google-cloud-node for BigQuery
ML APIs - Vision, Speech, Natural Language
Vision Natural Language Speech
google-cloud-node for Vision
var visionClient = vision({
projectId: 'grape-spaceship-123',
keyFilename: '/path/to/keyfile.json'
});
var gcsImageUri = 'gs://gapic-toolkit/President_Barack_Obama.jpg';
var source = {
gcsImageUri : gcsImageUri
};
var image = {
source : source
};
var type = vision.v1.types.Feature.Type.FACE_DETECTION;
var featuresElement = {
type : type
};
var features = [featuresElement];
var requestsElement = {
image : image,
features : features
};
var requests = [requestsElement];
visionClient.batchAnnotateImages({requests: requests}).then(function(responses) {
var response = responses[0];
// doThingsWith(response)
})
.catch(function(err) {
console.error(err);
});
From: https://github.com/GoogleCloudPlatform/google-cloud-node#cloud-vision-beta
Google Cloud - IoT Core
● Make informed decisions at Global Scale
● Securely connect your existing device network
● Establish two-way communication with your
devices
● Get straight to work
const mqttClientId = `projects/${argv.project_id}/locations/${argv.cloud_region}/registries/${argv.registry_id}/devices/${argv.device_id}`;
const connectionArgs = {
host: argv.mqtt_bridge_hostname,
port: argv.mqtt_bridge_port,
clientId: mqttClientId,
username: 'unused',
password: createJwt(argv.project_id, argv.private_key_file, argv.algorithm),
protocol: 'mqtts'
};
const client = mqtt.connect(connectionArgs);
const mqttTopic = `/devices/${argv.device_id}/${argv.message_type}`;
client.on('connect', () => {
//TODO …
}
IoT Core - MQTT example
Google DataStudio
● Build add-ons to extend Google Sheets,
Docs, Slides, and Forms
● A living, breathing platform (well,
metaphorically)
● Free
Apps Script
App Script url monitor example
Reference
● Today’s Demo: https://github.com/peihsinsu/try-cloud-iot.git
● Cloud Function Examples:
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/functions
● Apps Script for BigQuery: https://developers.google.com/apps-script/advanced/bigquery
● Node.js BigQuery SDK:
https://googlecloudplatform.github.io/google-cloud-node/#/docs/bigquery/0.9.6/bigquery
● Cloud IoT MQTT bridge: https://cloud.google.com/iot/docs/how-tos/mqtt-bridge
JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT

Mais conteúdo relacionado

Semelhante a JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT

HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at Nackademin
Robert Nyman
 
The vJUG talk about jOOQ: Get Back in Control of Your SQL
The vJUG talk about jOOQ: Get Back in Control of Your SQLThe vJUG talk about jOOQ: Get Back in Control of Your SQL
The vJUG talk about jOOQ: Get Back in Control of Your SQL
Lukas Eder
 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it means
Robert Nyman
 
Data Mining Open Ap Is
Data Mining Open Ap IsData Mining Open Ap Is
Data Mining Open Ap Is
oscon2007
 
Get Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaround
Get Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaroundGet Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaround
Get Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaround
DataGeekery
 
Get Back in Control of Your SQL - #33rdDegree
Get Back in Control of Your SQL - #33rdDegreeGet Back in Control of Your SQL - #33rdDegree
Get Back in Control of Your SQL - #33rdDegree
DataGeekery
 
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
DataLeader.io
 
Get Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2DaysGet Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2Days
Lukas Eder
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mohammad Shaker
 

Semelhante a JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT (20)

Building Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchBuilding Your First App with MongoDB Stitch
Building Your First App with MongoDB Stitch
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at Nackademin
 
Effective Android Data Binding
Effective Android Data BindingEffective Android Data Binding
Effective Android Data Binding
 
Vaadin7
Vaadin7Vaadin7
Vaadin7
 
The vJUG talk about jOOQ: Get Back in Control of Your SQL
The vJUG talk about jOOQ: Get Back in Control of Your SQLThe vJUG talk about jOOQ: Get Back in Control of Your SQL
The vJUG talk about jOOQ: Get Back in Control of Your SQL
 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it means
 
Data Mining Open Ap Is
Data Mining Open Ap IsData Mining Open Ap Is
Data Mining Open Ap Is
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
 
Get Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaround
Get Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaroundGet Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaround
Get Back in Control of your SQL with jOOQ - GeekOut by ZeroTurnaround
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CN
 
Get Back in Control of Your SQL - #33rdDegree
Get Back in Control of Your SQL - #33rdDegreeGet Back in Control of Your SQL - #33rdDegree
Get Back in Control of Your SQL - #33rdDegree
 
TL; DR: iOS 9R
TL; DR: iOS 9RTL; DR: iOS 9R
TL; DR: iOS 9R
 
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
 
Windows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile WorkforceWindows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile Workforce
 
Get Back in Control of your SQL
Get Back in Control of your SQLGet Back in Control of your SQL
Get Back in Control of your SQL
 
Get Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2DaysGet Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2Days
 
Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling Software
 
Android data binding
Android data bindingAndroid data binding
Android data binding
 
How I make a podcast website using serverless technology in 2023
How I make a podcast website using serverless technology in 2023How I make a podcast website using serverless technology in 2023
How I make a podcast website using serverless technology in 2023
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
 

Mais de Simon Su

Mais de Simon Su (20)

Kubernetes Basic Operation
Kubernetes Basic OperationKubernetes Basic Operation
Kubernetes Basic Operation
 
Google IoT Core 初體驗
Google IoT Core 初體驗Google IoT Core 初體驗
Google IoT Core 初體驗
 
GCPUG.TW meetup #28 - GKE上運作您的k8s服務
GCPUG.TW meetup #28 - GKE上運作您的k8s服務GCPUG.TW meetup #28 - GKE上運作您的k8s服務
GCPUG.TW meetup #28 - GKE上運作您的k8s服務
 
Google Cloud Platform Special Training
Google Cloud Platform Special TrainingGoogle Cloud Platform Special Training
Google Cloud Platform Special Training
 
GCE Windows Serial Console Usage Guide
GCE Windows Serial Console Usage GuideGCE Windows Serial Console Usage Guide
GCE Windows Serial Console Usage Guide
 
GCPNext17' Extend 開始GCP了嗎?
GCPNext17' Extend   開始GCP了嗎?GCPNext17' Extend   開始GCP了嗎?
GCPNext17' Extend 開始GCP了嗎?
 
Try Cloud Spanner
Try Cloud SpannerTry Cloud Spanner
Try Cloud Spanner
 
Google Cloud Monitoring
Google Cloud MonitoringGoogle Cloud Monitoring
Google Cloud Monitoring
 
Google Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKEGoogle Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKE
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試
 
JCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop LabsJCConf 2016 - Dataflow Workshop Labs
JCConf 2016 - Dataflow Workshop Labs
 
JCConf2016 - Dataflow Workshop Setup
JCConf2016 - Dataflow Workshop SetupJCConf2016 - Dataflow Workshop Setup
JCConf2016 - Dataflow Workshop Setup
 
GCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow IntroductionGCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow Introduction
 
Brocade - Stingray Application Firewall
Brocade - Stingray Application FirewallBrocade - Stingray Application Firewall
Brocade - Stingray Application Firewall
 
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Google I/O 2016 Recap - Google Cloud Platform News Update
Google I/O 2016 Recap - Google Cloud Platform News UpdateGoogle I/O 2016 Recap - Google Cloud Platform News Update
Google I/O 2016 Recap - Google Cloud Platform News Update
 
IThome DevOps Summit - IoT、docker與DevOps
IThome DevOps Summit - IoT、docker與DevOpsIThome DevOps Summit - IoT、docker與DevOps
IThome DevOps Summit - IoT、docker與DevOps
 
Google Cloud Platform Introduction - 2016Q3
Google Cloud Platform Introduction - 2016Q3Google Cloud Platform Introduction - 2016Q3
Google Cloud Platform Introduction - 2016Q3
 
Google I/O Extended 2016 - 台北場活動回顧
Google I/O Extended 2016 - 台北場活動回顧Google I/O Extended 2016 - 台北場活動回顧
Google I/O Extended 2016 - 台北場活動回顧
 

Último

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

JSDC 2017 - 使用google cloud 從雲到端,動手刻個IoT

  • 2. About me var simon = {/** I am at GCPUG.TW **/}; simon.cloud_gde = true; simon.blog = ‘http://peihsinsu.blogspot.com'; simon.slideshare = ‘http://slideshare.net/peihsinsu/'; simon.email = ‘simonsu.mail@gmail.com’; simon.say(‘Give me IV100 Mewtow!!');
  • 4. What is IoT? The Internet of things (IoT) is the network of physical devices, vehicles, home appliances, and other items embedded with electronics, software, sensors, actuators, and network connectivity which enable these objects to connect and exchange data. From Wikipedia: https://en.wikipedia.org/wiki/Internet_of_things
  • 6. Device Cloud BigData, ML, AISensor, BLE, NBIoT microprocessor mips / arm x86 / x64 / unix iaas / paas / saas
  • 7. Device Cloud ● Connectivity: Async, Sync ● Install & Upgrade: Container, Package ● AI / ML ● Remote Control / Managment ● Data Cache: Queue ● Data Process: Batch, Streaming ● Data Store: Object Store, Data Query ● BI: Report, Business Integration ● AI / ML
  • 8. 從Google IoT架構看看Google Cloud Platform上的IoT Family IoT低加 結合serverless GCP上的BigData系列 當紅的Machine Learning 我才是主角
  • 9. Cloud PubSub ● Deliver event data wherever you need it ● Build multi-cloud and hybrid applications on open architecture ● Scale responsively and automatically ● Bring reliability and security tools to real-time apps
  • 10. Cloud PubSub Repo: https://github.com/gcpug-tw/pubsub-example.git subscription.pull(options, function (err, messages) { if (err) return callback(err); // Do something for each message messages.forEach(handleMessage); console.log('Pulled %d messages!', messages.length); // Acknowledge messages var subscription = pubsub.subscription(subscriptionName); if(messages && messages.length > 0) subscription.ack(messages.map(function (message) { return message.ackId; }), function (err) { if (err) { return callback(err); } console.log('Acked %d messages!', messages.length); return callback(null, messages); }); });
  • 11. ● Microservices Over Monoliths ● Connect & Extend Cloud Services ● Serverless Economics ● Mobile Ready ● Just Add Code ● Open and Familiar Cloud Function
  • 13. ● Enterprise Cloud Data Warehouse ● Speed & Scale ● Incredible Pricing ● Security & Reliability ● Partnerships & Integrations BigQuery
  • 14. var bigqueryClient = bigquery({ projectId: 'grape-spaceship-123', keyFilename: '/path/to/keyfile.json' }); // Access an existing dataset and table. var schoolsDataset = bigqueryClient.dataset('schools'); var schoolsTable = schoolsDataset.table('schoolsData'); // Import data into a table. schoolsTable.import('/local/file.json', function(err, job) {}); // Get results from a query job. var job = bigqueryClient.job('job-id'); // Use a callback. job.getQueryResults(function(err, rows) {}); // Or get the same results as a readable stream. job.getQueryResults().on('data', function(row) {}); From: https://github.com/GoogleCloudPlatform/google-cloud-node#google-bigquery-beta google-cloud-node for BigQuery
  • 15. ML APIs - Vision, Speech, Natural Language Vision Natural Language Speech
  • 16. google-cloud-node for Vision var visionClient = vision({ projectId: 'grape-spaceship-123', keyFilename: '/path/to/keyfile.json' }); var gcsImageUri = 'gs://gapic-toolkit/President_Barack_Obama.jpg'; var source = { gcsImageUri : gcsImageUri }; var image = { source : source }; var type = vision.v1.types.Feature.Type.FACE_DETECTION; var featuresElement = { type : type }; var features = [featuresElement]; var requestsElement = { image : image, features : features }; var requests = [requestsElement]; visionClient.batchAnnotateImages({requests: requests}).then(function(responses) { var response = responses[0]; // doThingsWith(response) }) .catch(function(err) { console.error(err); }); From: https://github.com/GoogleCloudPlatform/google-cloud-node#cloud-vision-beta
  • 17. Google Cloud - IoT Core ● Make informed decisions at Global Scale ● Securely connect your existing device network ● Establish two-way communication with your devices ● Get straight to work
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. const mqttClientId = `projects/${argv.project_id}/locations/${argv.cloud_region}/registries/${argv.registry_id}/devices/${argv.device_id}`; const connectionArgs = { host: argv.mqtt_bridge_hostname, port: argv.mqtt_bridge_port, clientId: mqttClientId, username: 'unused', password: createJwt(argv.project_id, argv.private_key_file, argv.algorithm), protocol: 'mqtts' }; const client = mqtt.connect(connectionArgs); const mqttTopic = `/devices/${argv.device_id}/${argv.message_type}`; client.on('connect', () => { //TODO … } IoT Core - MQTT example
  • 24. ● Build add-ons to extend Google Sheets, Docs, Slides, and Forms ● A living, breathing platform (well, metaphorically) ● Free Apps Script
  • 25. App Script url monitor example
  • 26.
  • 27. Reference ● Today’s Demo: https://github.com/peihsinsu/try-cloud-iot.git ● Cloud Function Examples: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/functions ● Apps Script for BigQuery: https://developers.google.com/apps-script/advanced/bigquery ● Node.js BigQuery SDK: https://googlecloudplatform.github.io/google-cloud-node/#/docs/bigquery/0.9.6/bigquery ● Cloud IoT MQTT bridge: https://cloud.google.com/iot/docs/how-tos/mqtt-bridge