Free email course on building IoT with Cloud IoT CoreCloud IoT Core
Free email course on  
Connectivity in IoT
Thanks for signing up! You'll get the first email soon.
Oops! Something went wrong while submitting the form.
< Back to Blog

Earlier this year, Google announced the offering of its fully-managed IoT device management service, Cloud IoT Core, to add to its suite of cloud platform services. We supported the public beta so we've had a few months to use it and learn.

What is Cloud IoT Core?

Before jumping into a sample architecture and a demo we built here at Leverege, let’s examine what Cloud IoT Core actually offers and when you might use it. Cloud IoT Core gives enterprises a fully-managed solution for securely connecting and monitoring/managing those devices globally. This means that devices can connect to the cloud via IoT Core, instead of being processed by a gateway/another platform and having it forward the data.

Aside from eliminating another layer of the deployment process, IoT Core adds security by default and helps funnel massive amounts of sensor data into its suite of data processing and analytics products. Google's Cloud IoT Core also automatically takes care of load balancing and horizontal scaling as part of being on their serverless infrastructure. Lastly, if you're already on the Android Things platform, the integration with IoT Core will help push out firmware and device updates seamlessly. 

Image Credit: Google Cloud

Google’s blog describes a sample architecture to capture data from the devices, do some analytics in the cloud, and update the config on the device. A simple example would be to turn on a smart fan when the device detects that the room is getting too hot.

While this example is nice, it doesn’t provide an end-to-end IoT deployment architecture, including the UI component. So here at Leverege, we made a quick waste management example to build off one of the more popular IoT use cases. 

Sample Architecture Using IoT Core Using Javascript

To begin, we provisioned a small VM and modified the sample MQTT client code to build a simulator that generates positional and sensor data on a garbage truck and trash bin. After provisioning a registry on Cloud IoT Core, we created simulated devices and started to pass telemetry data onto Cloud Pub/Sub. Next, we routed those messages onto Cloud FireStore and BigQuery for real-time updates to the UI and to show analytics via Google Data Studio. 

Image Credit: Leverege

Having used Azure's IoT Hub before, here are some things we noticed about Cloud IoT Core:

  1. Generating RS256/ES256 keys were very simple. This was a stark contrast to the trouble I had with using the SAS token generator for Azure's IoT Hub.
  2. Some key features are still under development. Currently, device batch creation and deletion are not supported. You can loop through to accomplish this task, but as registries cannot be deleted until all associated devices are deleted, an option for batch actions will be useful for rapid prototyping.
  3. Integration with Pub/Sub is nice and seamless but could be better. Currently, you need to give the Cloud IoT Core account publish access to Pub/Sub before setting up the registries. Automatically creating this access when enabling Cloud IoT Core or giving a programmatic way to let Compute Engine service account this access would remove another point of friction.
  4. There are a couple of other things to watch out for if you opt to use the default settings. There is a quota for 1 configuration/state updates per device per sec. This may come in the way of your demos depending on how you plan to use Cloud IoT Core. There is also a 10,000 devices per list request, so you would need pagination if your demo/use case calls for a bigger device set.

Other than the UI and the simulator to drive the demo, the only other non-Google component we had to build was a router/logic component (message processor). Currently, Cloud Dataflow only supports Java and Python, so we wrote a quick Node.js app to direct device messages to Cloud FireStore and BigQuery.

Next Steps

In this demo, we did not integrate real devices to test how onboarding works for actual hardware. But given the ease of security token generation and support for both HTTP and MQTT, we don't foresee any challenges in enriching the simulation demo with real trucks and smart trash bins.

Have Questions? Talk to an Expert

Yitaek Hwang

From traveling the world solving vision issues in underserved regions through ViFlex to building software to diagnose autism using machine learning, I realized that I like building things. So currently I’m on a path to build an Internet of Things (IoT) platform at Leverege as a Venture for America Fellow.

SHARE

Liked this post? You're gonna love these!

Leveraging Computer Vision for Asset Tracking Solutions
November 28, 2018
Top 3 Best Practices for Designing Geofencing Applications
November 16, 2018
Market Research for Indoor Asset Tracking Solutions
November 15, 2018

Talk with Leverege

What type of use case are you building for? Whichever it is we are looking forward to learning more about your needs.

Have Questions?

Our team of experts is here to help!

Thanks for your submission! Our team is looking forward to connecting with you and will be in touch very soon!
Oops! Something went wrong while submitting the form.