Golioth Output Streams now send events to Google Pub/Sub

Golioth continues to add to Output Stream options so that users of our Device Infrastructure Platform can send rich event data to Google Cloud's Pub/Sub service.
[Google Pub/Sub][1] as a way to export your data into the GCP ecosystem. [In our initial announcement about Output Streams][2], we had exports for [AWS SQS][3], [Azure Event Hubs][4], and WebHooks. The first two act as buffers for the massive amounts of data coming into cloud systems from all over the web. These managed services can help to smooth out bursts of different requests hitting a server, acting as a queuing system so servers and serverless elements have time to “catch up” with the influx of new data arriving, ready to be processed. As deployments grow, they can also introduce redundancy and caching for different regions of the globe, while still acting like a monolithic service to the functions receiving input or providing output to these buffers.
Another cloud?
So why do we need
yet another cloud service to receive data? Well, because users prefer it! With AWS, Azure, and now Google Cloud, we cover roughly 64% of the cloud infrastructure market according to Statista in Q4 of 2021.
][5]
Can I use Pub/Sub Directly?
It might be tempting to think that since you’re using Google’s Pub/Sub service, you could have your device talking directly to the service. It’s there to listen to different events, right? This is a good opportunity to point out how Golioth is optimized to talk to constrained IoT devices. You could take a board using a cellular part like the nRF9160 and have it connect to the internet. If it wanted to talk to Google Pub/Sub, it would need to be making HTTP/2 requests and have authentication on the level that is usually required for one server talking to another. The amount of certificates, data overhead, and bandwidth would be a terrible choice for the nRF9160. Instead, you could have your nRF9160 running a Zephyr application with the Golioth SDK talking to Golioth servers over CoAP, with CBOR encoding on the messages, and sending and receiving secure messages using LightDB. This will save bandwidth (data costs) and power for your cellular device. What’s more, you get great features like fleet management and OTA firmware updates through that same secure connection to your device. As you scale your fleet up to thousands or millions of devices, you’re still talking back to a similar connection provided by Golioth, but you’re piping the resulting data out to your cloud provider. When you’re ready to switch to a different one? Flip a switch! We’ll have even more cloud export options soon. [1]: https://cloud.google.com/pubsub [2]: https://blog.golioth.io/output-streams-are-the-firehose-of-data-to-your-chosen-platform/ [3]: https://aws.amazon.com/sqs/ [4]: https://azure.microsoft.com/en-us/services/event-hubs/ [5]: https://www.statista.com/chart/18819/worldwide-market-share-of-leading-cloud-infrastructure-service-providers/ [6]: https://docs.golioth.io/reference/rest-api/openapi [7]: https://docs.datacake.de/integrations/golioth [8]: https://ubidots.com/ [9]: https://grafana.com/pricing/



