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
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
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
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